-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improved export dialogs for sointu and protracker (#98)
* improved export dialogs for sointu and protracker * wasm-git 0.0.11 * sointu editorcontroller test * v0.0.39
- Loading branch information
1 parent
7d2255f
commit d9aa076
Showing
8 changed files
with
822 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ export function isSointuSong(song) { | |
return song.instruments.findIndex(instr => instr.sointu) > -1; | ||
} | ||
|
||
export async function getSointuWasm(song) { | ||
export async function getSointuYaml(song) { | ||
if (!scriptspromise) { | ||
globalThis.exports = {}; | ||
scriptspromise = loadScript('https://cdn.jsdelivr.net/npm/[email protected]/index.js'); | ||
|
@@ -66,13 +66,16 @@ export async function getSointuWasm(song) { | |
}, | ||
patch: song.instruments.map(instr => instr.sointu) | ||
}; | ||
return jsYaml.dump(sointusong); | ||
} | ||
|
||
export async function getSointuWasm(song) { | ||
const wat = await fetch('https://sointu-server-c6w7hd53ia-uc.a.run.app/process', { | ||
method: 'POST', | ||
headers: { | ||
'content-type': 'application/json' | ||
}, | ||
body: JSON.stringify({ content: jsYaml.dump(sointusong) }) | ||
body: JSON.stringify({ content: await getSointuYaml(song) }) | ||
}).then(r => r.text()); | ||
|
||
const wabt = await exports.WabtModule(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.