A source object represents a source of audio.
Functionality | Function that does that thing |
---|---|
constructor | make-source |
get samplerate | samplerate |
get number of channels | number-of-channels |
get duration (in frames) of the source | duration |
seek source to a particular position | seek |
read source | read-source |
close source and cleanup memory | clean |
A call to read-source
will return two values:
- The array of samples in the representation of an aubio
float-vector
orfloat-matrix
(it depends whether you specified the input as monophonic or polyphonic via themonophonic
keyword argument) to serve as an input to othercl-aubio
functions, or as a simple lisp array (you can control this with the key argument:as-lisp-vector
) - The number of samples actually read
with-source
: It creates ansource
object and cleans it after it is useddo-source
: calls the body for every sample vector returned by aread-source
call. I thought it would be a common enough use case to include it here.