Path for fout

How can I set the path for fout opcode in order to record my wav file directly inside the same .csd file directory?
I tried to set:

--env:SSDIR+=../
--env:SFDIR+=../

and than send this instruction to my fout instrument: schedule "mnemosine", 0, -1, "./corfile.wav", but it did not work, it still record inside my home directory.

I don’t bother with any SSDIR flags, but simply pass the filename to fout, i.e.,

fout "output.wav", 15, asig

For me this results in the file going to the current csd directory.

p.s. I’m talking about running Csound outside of a frontend…

Yap, u’re right. I mean, I just had to open csound inside the directory and not with the absolute path:
e.g.
Here, it’ll save inside home dir:
csound path/path/path/csound.csd
And here it’ll save in the desired dir:
cd path/path/path/ & csound csound.csd

Thank you!

the pwd() opcode can perhaps also be useful?

1 Like