Csound Csound-dev Csound-tekno Search About

[Cs-dev] questions on soundout opcode

Date2006-03-16 14:55
FromDave Seidel
Subject[Cs-dev] questions on soundout opcode
[I would have posted this on the regular Csound list but it seems to be 
dead lately.  I've received nothing from the list in a while, and the 
last two post I attempted to make never appeared.  jpff, can you comment?]

I'm trying to use soundout for the first time, and am somewhat confused. 
   I have four asigs and would like to write them to four separate files 
for mixing in a different program.  So I did something like this

         instr   1
aL, aR  reverbsc gaL, gaR, p4, p5, sr/1.5, p6, 0
         soundout  aL,  "Left-Reverb.wav", 6
         soundout  aR,  "Right-Reverb.wav", 6
         soundout  gaL, "Left-Dry.wav", 6
         soundout  gaR, "Right-Dry.wav", 6
gaL     =       0
gaR     =       0
         endin

If I clear out the  section, I get no output at all, and the 
console states:

     winmm: opening output device 0 (SB Audigy 2 [FEC0])
     winmm: error: failed to open device
     Failed to initialise real time audio output

If I put back my previous options (-g -W -o foo.wav), I get an empty 
foo.wav, and I get the four output files specific in the soundout calls,
but they are apparently raw files (this actually makes sense, but seems 
like it should be called out explicitly in the docs).

So my questions are:

1. Should a "-o ..." argument be necessary for soundout to work?  Am I 
missing some other (undocumented) prerequisite setting for soundout?

2. Is there any way for soundout to output anything other than a raw 
file?  If not, no problem, I'm just wondering.

- Dave



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-03-16 15:22
FromIstvan Varga
SubjectRe: [Cs-dev] questions on soundout opcode
AttachmentsNone  

Date2006-03-16 15:59
FromDave Seidel
SubjectRe: [Cs-dev] questions on soundout opcode
Thanks, Istvan, that's very helpful.  I hadn't noticed fout before, but 
it does just what I want.

- Dave


Istvan Varga wrote:
> On Thursday 16 March 2006 15:55, Dave Seidel wrote:
> 
>> If I clear out the  section, I get no output at all, and the 
>> console states:
>>
>>      winmm: opening output device 0 (SB Audigy 2 [FEC0])
>>      winmm: error: failed to open device
>>      Failed to initialise real time audio output
> 
> This simply means that your sound card (at least when using MME) does
> not support the sample rate, buffer sizes, sample format, or number of
> channels you want to use, and has nothing to do with the soundout opcode.
> Without an -o option, real time output is used instead (probably set as
> default in .csoundrc).
> 
>> If I put back my previous options (-g -W -o foo.wav), I get an empty 
>> foo.wav
> 
> Which is not very surprising without any 'out' opcodes.
> 
>> and I get the four output files specific in the soundout calls, 
>> but they are apparently raw files (this actually makes sense, but seems 
>> like it should be called out explicitly in the docs).
> 
> soundout and soundouts always write raw (headerless) files, although
> only the newer soundouts has correct documentation.
> 
>> 1. Should a "-o ..." argument be necessary for soundout to work?  Am I 
>> missing some other (undocumented) prerequisite setting for soundout?
> 
> No, see above why you get the error without -o.
> 
>> 2. Is there any way for soundout to output anything other than a raw 
>> file?  If not, no problem, I'm just wondering.
> 
> Well, it is possible, just not with soundout, but rather with fout.
> For a floating point WAV file, use a format code of 16 (i.e. 10 for WAV
> + 6 for floats); note that this is not supported by old 4.xx versions.




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net