Hi, I am checking the audacity’s sound detect algorithm like an user, an works fine. Where can I find more information about his internal mathematical algorithm, how it’s works? etc.
I have found some information about authors of this feature
http://www.jeremy-brown.com
http://www.alexsbrown.com
I hope some of them visit this forum an could help me.
The algorithm is pretty simple (though the code is a bit messy).
It converts stereo tracks to mono and resamples to a low sample rate (about 100 samples per second).
It then loops through the (low sample rate) samples and compares the value of each sample with a threshold* value (* set by the value set by the “Treat audio below this level as silence” slider).
When the sample values cross the threshold level, the sample number is converted to a time value (by dividing the count number by the sample rate) and stored in a list.
The labels are created by returning a list of lists to Audacity.
The plug-in is written using the Nyquist programming language, which is a scripting language based on XLISP (a variant of LISP).
The Nyquist language is relatively easy and convenient to use because plug-ins are written in plain text, so they can be read and edited in a plain text editor such as NotePad or NotePad++ (for Windows users I would recommend NotePad++ for working with Nyquist files).
You can view the code for the Sound Finder by opening the SoundFinder.ny file (in the Audacity Plug-Ins folder) in a plain text editor (don’t use a word processor - the file must be plain text or it will not work).
If you are interested in writing plug-ins, Nyquist provides a good platform for rapid development (though the GUI capabilities are rather restricted). There is some information about Nyquist in Audacity here: http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference
We also have a forum board specifically for Nyquist plug-ins and Nyquist programming: http://forum.audacityteam.org/viewforum.php?f=39
Thanks for your help, I understood the algorithm…I suppouse it…I will try apply this idea on MATLAB.
Thanks a lot.
PD: This post maybe will be erased by the webmaster because the right place for it is on NYQUIST forum.
That’s ok, I’m one of the forum administrators. I’ll just move this topic to the Nyquist forum and delete your duplicate post.
As a possible enhancement you could consider measuring the rms level rather than the peak level.