Forums > MaxMSP

Onset detection

January 12, 2010 | 5:13 pm

I’m attempting to build a system that will take a live feed from a drum kit. The system will then act as a beat slicer on specified segments which I specify it to record. I want to include onset detection so that the slice positions occur correctly. I have been studying Jean-Francois Charles paper "A Tutorial on Spectral Sound Processing Using Max/MSP and Jitter" which can be found at
http://www.mitpressjournals.org/doi/abs/10.1162/comj.2008.32.3.87
along with Curtis Roads "The computer music tutorial" to get to grasp with FFT’s.
If anyone could suggest alternative or further methods or papers which may help me to obtain a better understanding in this area it would be greatly appreciated!

Thanks
A


January 12, 2010 | 9:09 pm

All that said, and all of it true, for drums, a simple envelope follower with thresh~ is quite efficient as the transients are quite sharp… I used that in my drum extravaganza (la rage) with great success.

pa


January 13, 2010 | 2:19 pm

Yes, slicing with FFT might be fun (a basic example is the patch 10-sliced-playback, now on http://www.cycling74.com/share.html ), but might not be the "best" way to shuffle beats, depending on what you want to achieve. Since diving in spectral domain implies compromise on time resolution, you might get "better" results with a time-domain method, as suggested by PA. Especially since you work with a drum kit.
Jean-François.


January 13, 2010 | 5:49 pm

Cheers guys,

I have read most of Collins’ papers, very interesting, he’s the daddy alright! Im not too worried about the slicing at the moment, I have messed about with some patches already with some success. As part of my project it is the onset detection which is causing me some problems. Cheers Jean-Francois, your section in the cycling74/share section is very helpful. I wish to find the transient times in millisecs through the fft’s and sonogram before slicing the recorded buffer based on these points through the waveform~ object. Is it possible do ye think, and how would I go about creating a list of these onset times by this method that can be stored in a lookup table for reference? If this fails for me I’ll try look at an option of an envelope follower but since I’ve spent the last 2 weeks trying to get my head around fft’s I might stick to this way for a little bit longer.

Thanks
A
A


January 13, 2010 | 10:12 pm

There’s a paper:

Stephen Hainsworth and Malcom Macleod. Onset detection in music audio signals ICMC 2003

That I found very useful for this – proposes a modified Kullback-Leibler distance measure – that paper used to be freely available somewhere online, but I can’t find it right now. I did find a reference in an online PhD that I didn’t have time to go through but may give you all the info you need :

http://www.elec.qmul.ac.uk/research/thesis/Brossier07-phdthesis.pdf#40

There’s quite a bit on onset detection here, but you may need to go back to the original papers to get the real detail. I was able to get very good accuracy for piano using this method, which i more sophisticated that more simple spectral flux difference calculations for example – I can’t remember exactly what methods the Jean-Francois Charles stuff uses. Drum kit is pretty easy for volume triggers, but I have used a spectral technique for this too. I’d have to agree though that for standard beat fare, FFt techniques might be a lot more sophisticated than you really need, as they tend to excel in situations where the amplitude envelope is not so clearly defined…

Regards,

Alex


January 14, 2010 | 4:51 pm

Once again thanks for all your help guys! Jean-Francois cheers for pointing me to the 10-sliced-playback, it helped me understand exactly what I was looking to implement! Hopefully it should be plain sailing from here on out


February 18, 2010 | 1:12 pm

Hey Jean-Francois,

I have implemented part of your patch into my system successfully. However,I’m trying to get a full understanding of what is actually happening. The problem which is giving me problems are three of the objects in the sum along columns section. Is there any documentation describing what is happening here, or anywhere to give me a better understanding of the arguments within the objects?

Many thanks
Aaron

– Pasted Max Patch, click to expand. –

Viewing 7 posts - 1 through 7 (of 7 total)