Ideas
Support for Backround Audio for the WASM version
Sadly spin effects and pulse effects dont work because there is no backround audio support in the WASM version yet.
3 replies
ruanklein replied
In fact, background support has been available in the WebAssembly version since the feature was introduced.
However, the behavior is different. You need to host your WAV audio file somewhere and provide the URL using the
@backgroundoption, for example:@background https://hub.synapseq.org/packages/synapseq-pink-noise.wav spin-one background spin 400 rate 10 intensity 45 amplitude 50 tone 300 binaural 10 amplitude 15 spin-two background spin 200 rate 5 intensity 75 amplitude 50 tone 300 binaural 5 amplitude 15 00:00:00 silence 00:00:15 spin-one 00:02:00 spin-one 00:03:30 spin-two 00:04:30 spin-two 00:05:30 spin-one 00:07:00 spin-two 00:09:30 spin-one 00:10:00 silenceKeep in mind that SynapSeq can read up to 10MB of the provided WAV file, whether it is 8-bit, 16-bit, or 24-bit.
XenoxYT replied
Is there a way to change this behavior and to allow using local files in the same directory?
ruanklein replied
Is there a way to change this behavior and to allow using local files in the same directory?
At the moment, the WASM version only allows http and https URLs for
@backgroundand@presetlist, since the browser environment does not provide direct access to local filesystem paths.In a future version, I plan to extend the whitelist to also allow blob URLs. This would make it possible to upload a local file in the browser, generate a Blob URL (e.g. using
URL.createObjectURL()), and reference it in the sequence like this:
@background blob:...However, this is mainly intended as a convenience for browser-based experimentation. The recommended approach remains hosting the audio externally (for example via
http://localhostor a storage bucket) and referencing it through a regular URL. That keeps the behavior consistent between CLI and WASM versions and avoids browser-specific coupling.So direct local filesystem paths (like
./rain.wav) will not be supported in the WASM version due to browser security constraints, but Blob URLs will likely be supported in a future release.
This is a static mirror of the SynapSeq GitHub Discussions.