filelenSignal I/O:Soundfile Queriesfilelenfilelen
Returns the length of a sound file.
Description
Returns the length of a sound file.
Syntaxir filelen ifilcod, [iallowraw]Initializationifilcod -- sound file to be queried
iallowraw -- Allow raw sound files (default=1)
Performancefilelen returns the length of the sound file ifilcod in seconds. filelen can return the length of convolve and PVOC files if the "allow raw sound file" flag is not zero (it is non-zero by default).
Examples
Here is an example of the filelen opcode. It uses the file filelen.csd, fox.wav, and drumsSlp.wav.
Example of the filelen opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
The mono audio file Mathews.wav is about 2.8 seconds long, and the stereo file drumsSlp.wav is 4.0 seconds. So filelen's output should include a line for the mono and the stereo file like this:
lenght of sample = 15.598 seconds
lenght of sample = 4.000 seconds
See alsoSound File QueriesCreditsAuthor: &namematt;July 1999New in Csound version 3.57