Skip to content

Commit

Permalink
fix params
Browse files Browse the repository at this point in the history
  • Loading branch information
josStorer committed Jul 28, 2023
1 parent d2928e5 commit 94ca70e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/pages/Composition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const CompositionPanel: FC = observer(() => {

const setSoundFont = async () => {
let soundUrl: string;
if (params.useLocalSoundFont)
if (commonStore.compositionParams.useLocalSoundFont)
soundUrl = 'assets/sound-font';
else
soundUrl = !commonStore.settings.giteeUpdatesSource ?
Expand Down Expand Up @@ -117,7 +117,7 @@ const CompositionPanel: FC = observer(() => {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'text': params.prompt.replaceAll(/<pad>|<start>|<end>/g, '').replaceAll(' ', '').trim()
'text': commonStore.compositionParams.prompt.replaceAll(/<pad>|<start>|<end>/g, '').replaceAll(' ', ' ').trim()
})
}).then(r => {
r.arrayBuffer().then(midi => {
Expand Down Expand Up @@ -168,7 +168,7 @@ const CompositionPanel: FC = observer(() => {
scrollToBottom();
if (e.data.trim() === '[DONE]') {
commonStore.setCompositionGenerating(false);
generateNs(params.autoPlay);
generateNs(commonStore.compositionParams.autoPlay);
return;
}
let data;
Expand Down

0 comments on commit 94ca70e

Please sign in to comment.