| sokratesla wrote:
> # How can I write the realtime output of Csound to a file? I use -o dac6
> flag to realtime audio (6 is my asio4all driver). And have tried
> soundout opcode and outs opcode in same instrument:
>
> instr 1
> ...
> soundout asig, "c:\\song.wav"
> outs asig, asig
> endin
>
> But mediaplayer didn't play this wav file.
soundout and soundouts write a raw sound file without a header.
If you use
fout "C:\\song.wav", 2, asig
instead, it will write the file in the same format as the one specified
for -o (that is, WAV if the -W command line flag is used); also, fout
can write more than 2 channels. It does have disadvantages, though,
because it can only write 16 bit files with a header (this limitation
may be removed easily), and is somewhat slower than soundout/soundouts. |