[LAU] midi drum pad project

andy baxter andy at earthsong.free-online.co.uk
Sun Nov 22 06:47:46 EST 2009


hello,

I am working on a project to build a position and velocity sensitive 
midi drum pad. The idea is to make a pad which can tell where you have 
hit it in two dimensions, as well as how hard, and then use these 3 
parameters to synthesise a sound which varies according to the position 
of the strike on the pad.

So far I have built a prototype pad which is looking promising. It 
consists of a 30 cm square aluminium sheet with piezo transducers under 
each corner. Each sensor sits on top of a small circle of closed cell 
plastic foam, which is in turn mounted on a plywood base. The sensors 
are hooked up to an arduino board, with firmware which detects when a 
signal has been received, measures the strength of the signal from each 
piezo, and sends the signals from each piezo to a computer over its USB 
cable.

This part of the project is working well so far - I have found that the 
total of the signals from each sensor is a good measure of the velocity 
of the strike, and that the share by which each of the sensors 
contributes to this total remains pretty stable in a characteristic 
pattern for different points on the pad, which hardly varies when you 
hit the pad harder or softer.

The next thing to do is find a way to map the series of 4 sensor 
readings coming in from the pad into midi events representing the 
position and velocity of each strike. Velocity is easy - it's just the 
total value from all sensors - but mapping the 4 readings into an x-y 
position looks harder, and I thought I would ask to see if anyone has 
any suggestions on how to go about it before I go any further. My 
thought at the moment is to use an approach based on least-squares curve 
fitting and lookup tables. I have some ideas about how I would go about 
this, but it looks complicated (and probably computationally slow), so 
it would be good to know if anyone has any other suggestions.

I have done some preliminary testing and measured the response at a 
series of 9 points in a square grid on the pad surface. The results from 
this are in the attached spreadsheet (open office format). The pattern 
that comes out from this is that each sensor responds strongest when the 
strike is in its own corner, and weakest in the diagonally opposite 
corner. But the response of each sensor is different, and doesn't vary 
in a linear way according to the position of the strike, so I need some 
kind of mapping algorithm which takes account of this.

Thanks,

andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calibration-readings.ods
Type: application/vnd.oasis.opendocument.spreadsheet
Size: 19419 bytes
Desc: not available
Url : http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20091122/1077623d/attachment.ods 


More information about the Linux-audio-user mailing list