Previous Up Next

15.1.7  Extracting samples from audio clips: channel_data

The channel_data command gets samples from an audio clip.


Example.
Assuming that the directory sounds contains example.wav, a wav file with three seconds of stereo sound:
Input:

s:=readwav("/path/to/sounds/example.wav"):;
L,R:=channel_data(s,range=1.2..1.5)

Output:
A list L resp. R containing the data between 1.2 and 1.5 seconds in the left resp. right channel of the original file.


Previous Up Next