onsets
onsets(
@alpha 0.1
@delay 5
@framerate 86.1328
@silencethreshold 0.02
) -> llll
Generates audio descriptor to compute the onset positions in a buffer. See analyze
.
The resulting buffer will be updated with the following keys:
onsets
info
onsets
is a mirror implementation of the same algorithm in the Essentia library.
For more details on the algorithm, please check the Essentia Algorithms reference.
Arguments
@alpha
[float]: proportion of the mean included to reject smaller peaks—filters very short onsets. (default:0.1
).@delay
[int]: number of frames used to compute the threshold—size of short-onset filter. (default:5
).@framerate
[float]: frames per second. (default:86.1328
).@silencethreshold
[float]: threshold for silence. (default:0.02
).
Output
onsets descriptor [llll]
Usage
onsets
is meant to be used with the analyze
function:
$buffer = importaudio('singing.wav'); ## input buffer
$descr = onsets(); ## generate onsets audio descriptor
$buffer.inspect('before analysis');
$buffer = $buffer.analyze($descr); ## apply analysis
$buffer.inspect('after analysis')