Closed gogins closed 3 years ago
This should work:
https://github.com/emscripten-core/emscripten/blob/main/tools/file_packager.py
The resulting file should be loaded before loading Csound.
Silly mistake, packaged the samples on the browser side instead of the audio worklet side.
No, not a silly mistake, so far I simply fail to find out how to set up a local filesystem and load assets in the AudioWorklet context.
Examples that I have seen of getting data into and out of the AudioWorklet context use XHR. This does not promise a magic join with the Emscripten "filesystem."
I should add a button for running the examples with regular Csound on the computer. Or perhaps it's better to use NW.js on the existing index.html.
Indeed NW.js works fine.
Steven Yi has a working example using csound/browser. The code that implements the filesystem exists and runs in the AudioWorkletGlobalScope.
Developers for csound/feature/webaudio: @kunstmusik at https://kunstmusik.com/. @andy-fillebrown at https://github.com/andy-fillebrown?tab=repositories. @hlolli at https://www.hlolli.com/. @hfmanson at https://github.com/hfmanson?tab=repositories.
As specified here: https://emscripten.org/docs/porting/files/file_systems_overview.html. I do this for the CMask samples in the csouind-extended-cmask repository.