Real-Time "Beat Detective" Effect Desired


    Mar 11 2010 | 4:34 pm
    I would like to be able to record live sound (piano) into a buffer in MaxMSP, and have some way to access the individual notes within the buffer by some automatic process that looks for large changes in sample value. This is basically the same effect as Beat Detective in ProTools, or the Beat Machine mode in Kontakt. I think it would be sufficient to have messages receive points in the sample where notes begin, and then play back from the same buffer starting at those values. I'm not sure how to do this at all, really. Any help?

    • Mar 11 2010 | 7:20 pm
      Here is a patch I just mashed up that sort of does a real-time beat detective-ish thing. It records 10 seconds of audio into a buffer, while bonk~ (you'll have to d/l it to use the patch) detects "events" in the incoming audio stream and stores their start times in a coll. You can then play specific segments back by selecting them from the coll.
      I've only tested it by whistling into my laptop mic, and you'll have to do some tweaking of the parameters of bonk~ for it to pick up the start of every note (it sometimes misses them). This kind of method will never be 100% accurate either, but I'm sure you can tweak it to be useable.
      It's just to demonstrate though, there are better ways of doing most parts of the patch really. Also there is no windowing of the playback, so it sounds quite glitchy.
      Also check out el.buffet~ from Eric Lyon, it can be used to analyse a buffer and detect event start points.
    • Mar 11 2010 | 8:46 pm
      hmmm I just tried the patch I posted and it keeps recording crackles........don't know why, so sorry aboot that if it happens to you!
      ------ scratch that, it's my laptop mic, it seems to be screwed--------
    • Mar 11 2010 | 9:13 pm
      There's also [lbyl] (look-before-you-leap, check maxobjects.com) which detects changes in value, but won't "believe" them until a certain threshold of events has passed. the parameters are settable. So you could probably hack together something with that if you're using [peek~] to find your changes in sample amplitude, and tweak the parameters to avoid seeing transients as actual notes.
      You could definitely hack something together with standard Max objects too, maybe peak/thresh/trough? Probably there are a million ways to do it, but again, there will be some "slop" in the accuracy.