Csound Csound-dev Csound-tekno Search About

Re: [Csnd] soundout question

Date2005-08-22 15:09
FromLuis Antunes Pena
SubjectRe: [Csnd] soundout question
Thank you. It is not working for me with fout and 4.23f03, so I'll try
csound 5.
Another thing:
I am having an error when trying to pass a string to a i-variable
something like:
ifilcod = "file1.aiff"
is this impossible in csound?

and:

when using fout: the number of channels of the fout must be the same than
the global variable nchnls?

Thanks again.

Luis



Istvan Varga schrieb:

> Luis Antunes Pena wrote:
>
>> I have two questions concerning soundout:
>> - is there anyway to create AIFF files or is it always headless file?
>
>
> You can use the fout opcodes which allow for using the same header
> type as the output file (-o), so with the -A flag fout would write
> an AIFF file. Not sure if this feature works in older versions of
> Csound, though.
>
>> - is it possible to create a stereo file using soundout? if not, which
>> opcode can be used for it?
>
>
> There is a soundouts opcode, but it is only implemented in Csound 5.
> Other than that, fout can also write stereo files.



-- 
Send bugs reports to this list.
To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk

Date2005-08-22 15:31
FromIstvan Varga
SubjectRe: [Csnd] soundout question
Luis Antunes Pena wrote:

> I am having an error when trying to pass a string to a i-variable
> something like:
> ifilcod = "file1.aiff"
> is this impossible in csound?

No, you cannot assign a string to an i-rate variable, but Csound 5 has a
variable type 'S' for this purpose:

Sfilcod = "file1.aiff"

Alternatively, you can add something like this to the orchestra header:

strset 1, "file1.aiff"

and then most sound I/O opcodes will open "file1.aiff" if you set ifilcod
to 1:

ifilcod = 1
a1 soundin ifilcod
a2 soundin 1
a3 soundin "file1.aiff"
a4 soundin Sfilcod

in the above example, all soundin opcodes will read "file1.aiff".

> when using fout: the number of channels of the fout must be the same than
> the global variable nchnls?

No, it does not need to be the same as nchnls.
-- 
Send bugs reports to this list.
To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk