Csound Csound-dev Csound-tekno Search About

Re: [mpoirier@virtu.sar.usf.edu: 2 real-time Csound questions]

Date1999-10-08 07:32
FromPaul Winkler
SubjectRe: [mpoirier@virtu.sar.usf.edu: 2 real-time Csound questions]
I don't know about your second question, but as to the first:

> From: Marc 3 Poirier 
> Subject: 2 real-time Csound questions
> 
>         1)  Is it possible to have real-time sound output during instrument
> rendering & have that sound written to a file at the same time?

I just started playing with this using the soundout opcode. It works.
The current limitation seems to be that you can only write
single-channel files, so you have to use 2 soundout statements to
separate files if you want stereo. Also, you can only save "raw"
(un-headered) files. Combine the files later in a sound editor or
something.
Quick example:

instr 1 
            ; Save realtime input to a file, silently
adummy init 0
a1, a2 ins
soundout a1, "left", 4 ; works, but cannot make
headered                                 ; files.
            ; Note also that "soundouts" is NOT working yet.
		; so we can only do mono.
soundout a2, "right", 4
outs adummy, adummy ; change this to a1, a2 if you want to hear
		    ; realtime output
endin



I just noticed G. Maldonado's "fout" family of opcodes which seem to do
the same thing with much more flexibility, including writing .wav files.
They are included in very recent versions (not 3.54 which I have.)