I know it's a bit gross. I made this on stream and just wanted to share :)
...I'll see myself to the door :)
[1] http://www.pouet.net/prodlist.php?platform[]=JavaScript&page...
To describe it fast : I keep an history of frequency (size customable) and compare the subscribed frequency range to its relative history max / min value. I get a percentage out of it that i give to the dance function associated to this specific class.