Chris Ball: Projects

Freelance Creative Technologist

Another Midi Gizmo – Continued

So, the above device (Arduino powered again) is intended to detect (via a microphone) different kinds of taps on a surface, and convert them into midi messages. It’s intended use is for laying down Midi drum tracks quickly and easily, without the need for expensive V-kits or drum pads. However, there are few problems with it at the moment – it works, but not too well. It may only be about 95% accurate at detecting the difference between two different instantaneous sounds, and that gets worse the more sounds you add to it’s memory. I think the concept is good, but it may need to be realised on something more powerful than an Arduino! I will be bringing it along to the MOSI mini maker fair this week, so if you want to have a go, come on down.

Next Post

Previous Post

2 Comments

  1. mattfors 27th July 2012

    What’s the code like for detecting the taps?

    • chrisballprojects 30th July 2012

      It’s something like:

      -keep audio samples taken from the mic in a constantly updating array
      -if there’s a “loud” sample (at a chosen point in that array)
      -take an fft of the samples
      -if a button is pressed, store the fft in an array (as a reference)
      -else compare the fft to all the stored ffts, and send a midi message that corresponds to the “best match”

      I’m going to be switching to a piezo mic as this the sparkfun breakout I have clips (a lot) and after that I may well change the code entirely, but haven’t decided yet. I’ll see what the piezo response is like.

      I may also add some kind of adaptive noise compensation to the code – so (hopefully) it will get better at recognising which frequencies are more important while comparing.

© 2024 Chris Ball: Projects

Theme by Anders Norén