Closed gogins closed 2 months ago
csb64enc doesn't exist on my MacBook. The base64 utility does:
base64 -i 01hpschd.sf2 -b72 -o 01hpschd.txt
This definitely does work!
A big SoundFont would be a huge amount of text. It is awkward to combine the parts, possibly the makecsd utility can do it. But of course, makecsd does not exist on my MacBook.
I can write a Python utility to do the job, e.g.
python3 add2csd.py existing.csd midi_score.mid sample1.wav sample2.ogg soundfont1.sf2 soundfont2.sf2
In theory, embedding a Base64 encoded file in the .csd will automatically be saved to the runtime directory, which for CsoundAudioNode would be the sandbox's filesystem, and the sf opcodes should then be able to read that file.