rorywalsh / CsoundUnity

GNU Lesser General Public License v2.1
70 stars 19 forks source link

Can't get output from CsoundUnity as .wav with -o #70

Closed koenfrontatie closed 1 month ago

koenfrontatie commented 2 months ago

Hey, I've been trying to get a wav file as an output from my CsoundUnity class. I've been using this example:

-o output.wav ;Example by Alex Hofmann instr 1 aSin poscil 0dbfs/4, 440 out aSin endin i 1 0 1

Sadly, an audio file never appears in any environment folder. Could you help me?

koenfrontatie commented 2 months ago

https://forum.cabbageaudio.com/t/unable-to-create-output-file-solved/985

i've come across this back and forth. i think this is leading me in the right direction, i suppose im not knowledgeable enough yet. is there no way to run non real time stuff from csoundunity without having to do command line stuff or somethign? i'd like to render certain effects on android ideally

giovannibedetti commented 2 months ago

The suggested approach using fout should work. Be sure to set the SFDIR for Android in the CsoundUnity Environment settings. Point it to the PersistentDataPath folder and you should find a file there after running the csd. Report here if you have problems

giovannibedetti commented 1 month ago

just tested the basic approach using fout, it works fine on macOs. It's important to set the SFDIR, for example like this: image attached the csd used to test this. Press play in editor, and wait until you see "Score finished in csoundPerformKsmps() with 2." being logged. You should then find a 3 seconds aif file in the persistent data path folder. testRec.csd.zip