aubio_onset_do method
execute onset detection
\param o onset detection object as returned by new_aubio_onset() \param input new audio vector of length hop_size \param onset output vector of length 1, containing 0 if no onset was found, and a value equal or greater than 1 otherwise
When no onset was detected, the first element of the output vector onset
is set to 0.
When an onset is found, the first element of the output vector onset
is set
to offset = 1 + a
where a
is a number in the range[0, 1]
.
The final onset detection time, in samples, can be obtained with
aubio_onset_get_last(). It can also be derived from offset
as
follows:
\code t = total_frames + offset * hop_size - delay \endcode
where total_frames
is the total number of frames processed so far, and
delay
is the current delay of the onset object, as returned by
aubio_onset_get_delay().
Implementation
void aubio_onset_do(
ffi.Pointer<aubio_onset_t> o,
ffi.Pointer<fvec_t> input,
ffi.Pointer<fvec_t> onset,
) {
return _aubio_onset_do(
o,
input,
onset,
);
}