# Algorithm used by mironsets

I was curious to know which algorithm(stepwise) is used by the mironsets function of the MIRToolbox library to find the onsets in the audio signal. I am talking about the default functionality when we use mironsets.

Example: o = mironsets('audio.wav')

Here o is the output onset strength envelope and looks like this There are some questions like - Where is the negative part of the signal gone? Why not all local maximas are considered as onsets?

• You can take a look into the MIRToolbox manual p. 88. Not all local maximas considered as onsets to avoid an overdetection. This is caused typically by an adaptive threshold, e. g. the median $m$ is computed in the enviroment and the condition is $y[n] > b + c\,m$, where $b$ is the base threshold and $c$ is a weighting factor. To the negative part of the signal: If mironsets takes the envelope as the onset curve, the enevelope can be simple computed by takting the abs. values of the signal. Apr 3, 2015 at 11:38
• Thanks for the help. I still could not find the details of the median in the manual. Where did you find it? Apr 3, 2015 at 19:40
• @Vertex could you please let me know? Apr 4, 2015 at 8:43
• I told you only one possible explanation for this phenomenon. I don't took this out of the manual :) As the manual's flow chart tolds, mirpeaks is called for finding peaks. See at p. 65. Take a look on the Contrast parameter: a local maximum is only considered as a peak, if the amplitudes diff. to the previous and successor local maxima are higher than a given threshold. Apr 4, 2015 at 18:59