filenchnlsSignal I/O:Soundfile Queriesfilenchnlsfilenchnls
Returns the number of channels in a sound file.
Description
Returns the number of channels in a sound file.
Syntaxir filenchnls ifilcod [, iallowraw]Initializationifilcod -- sound file to be queried
iallowraw -- (Optional) Allow raw sound files (default=1)
Performancefilenchnls returns the number of channels in the sound file ifilcod. filechnls can return the number of channels of convolve and PVOC files if the iallowraw flag is not zero (it is non-zero by default).
Examples
Here is an example of the filenchnls opcode. It uses the file filenchnls.csd, fox.wav, and drumsSlp.wav.
Example of the filenchnls opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
The audio file fox.wav is monoaural (1 channel), while drumsSlp.wav is stereo (2 channels) So filenchnls's output should include lines like this:
number of channels = 1
number of channels = 2
See alsoSound File QueriesCreditsAuthor: &namematt;July 1999New in Csound version 3.57