Sei sulla pagina 1di 12

Home Sign Up!

Browse Community Submit


All

Art

Craft

Food

Games

Green

Home

Kids

Life

Music

Offbeat

Outdoors

Pets

Photo

Ride

Science

Tech

A position sensitive midi drum pad


by ganglion on March 9, 2010

Table of Contents
A position sensitive midi drum pad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Intro: A position sensitive midi drum pad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 1: Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 2: Tools and Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 3: Cutting the plywood and aluminium sheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 4: Drilling the bolt holes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 5: Soldering the piezos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 6: Making and gluing the rubber mounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 7: Assembling the pad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 8: Building the circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 9: Software setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Step 10: Final thoughts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

Intro: A position sensitive midi drum pad

The SynPad is a position sensitive midi drum pad that you can build yourself using simple materials and tools for around 50 UK pounds (depending on what materials
you already have, and how many pads you want to make.) The pad can detect where you have hit it as well as how hard, so that the synth it is driving can change the
sound continuously as you strike the pad in different places.
The software I have written to make the sounds is currently linux based, but would not require much work to adapt to a windows or mac environment.
The skills you need are basic wood and metal work (cutting and drilling), enough electronics knowledge to build a simple circuit from the schematic, and a moderate
amount of experience with making music on the linux operating system. You don't need any programming experience to start making sounds under linux, but would if you
want to create your own synths to make different sounds, or to port the program to another OS.
If you have built one of these pads, or are thinking of building one, it would be good to hear from you. There is a mailing list
at http://ganglion.me/mailman/listinfo/synpad_ganglion.me which you can join if you want to help with developing the project in any way.
Hope you enjoy making and playing this instructable!

Step 1: Design
The project is still in early prototype stage. The current design uses a 30 cm square aluminium sheet as the active surface, with piezo sensors mounted under each
corner to pick up the pressure pulse caused when you hit the pad with a stick or your fingers. The pad is supported on closed cell foam rubber discs, inside a plywood
frame. When you hit the pad, the sensors in each corner respond differently according to where you have hit it.
The signals from each sensor are captured by an arduino micro-controller board, which then sends the raw signal strength from each sensor to a computer over its usb
cable. When the sensor data reaches the computer, it is interpreted by a python program which calculates the coordinates and velocity of the strike from the raw figures,
and then maps this information onto midi note and controller values.
What happens next is up to you - if you want, you can feed the midi data into any Linux softsynth just as you would for any other midi source like a keyboard. To make the
most of the position sensitivity of the pad, though, you want a synth that will change the sound produced according to the x and y position of the strike. The simplest way
of doing this is to use one of the music programming languages like supercollider, csound, or pure data. Some example supercollider synths are in the archive attached to
the final step of this instructable.
Unfortunately I forgot to take proper photos of each step as I was building the pad - the ones that I have attached are really assembly photos that show the main parts
before you bolt them together. They should give you enough of an idea though to build one yourself.

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

Step 2: Tools and Materials


You will need the following materials:
a 30 cm square sheet of 3mm thick aluminium.
a 30 cm square of thick plywood (e.g. 10mm) for the base.
a 30 cm square sheet of thin plywood (e.g. 5 mm) for the top frame.
a small amount of 10mm closed cell foam rubber (enough to make 8 * 35mm discs). I bought some online, but you could probably use the rubber from something
like a camping mat or old style mouse pad. Soft (open cell) foam of the sort you get in cushions probably wouldn't work.
8 * 5mm machine screws, around 55 mm long (and matching nuts and washers). If you can, get the kind where the nuts have a plastic insert to stop the nut from
loosening.
4 * 35mm diameter piezo transducers.
4 small metal discs a bit smaller than the inner contact of the piezo. (E.g. 4 one pence coins).
Some 30 Awg wire (i.e. v. thin) to wire the piezos.
Some shielded 1 core cable to carry the signal from the piezos to the arduino.
Contact adhesive which will stick rubber, wood and metal.
Epoxy adhesive.
Gaffer tape.
4 * 1 MOhm resistors.
2 * 10 KOhm resistors.
1 * 100 Ohm resistor.
1 * TS912 Op-amp.
1 * 2N3904 npn transistor.
A breadboard or piece of stripboard to build the circuit on.
Solder.
Miscellaneous jumper wires.
An arduino board and usb cable. Any of the arduino boards will do - you just need 4 analogue inputs.
Magic marker for marking the aluminium sheet.
and the following tools:
Saw to cut the plywood sheets to size.
Pad saw / fret saw with metal and wood cutting blades. This is for cutting the central hole in the top frame. You only need the metal cutting blade if you need to cut
the aluminium sheet to size.
Electric drill.
5 mm wood drill bit.
10 mm metal drill bit.
Large wood drill bit for making the initial hole to use the pad saw through.
Screwdriver.
Soldering iron.
Wire strippers.

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

Step 3: Cutting the plywood and aluminium sheets


The first thing is to mark out the plywood and aluminium sheets and cut them to size. The whole pad is 30cm square from edge to edge, and all the sheets need cutting to
this size first. You will need a pad saw with a blade for cutting metal if you can't buy aluminium cut to size.
Next you need to cut a square hole in the top plywood sheet (the thinner sheet) to make a frame. I was using 35mm piezos (any smaller probably wouldn't work as the
rubber would squash too much), and a gap of 5mm around these, making the width of the border of the top frame 45 mm. So the next step is to cut the top sheet into a
frame with 45mm width left around each edge. To do this, mark out a line 45mm in from each edge, then drill large holes inside the corners of this square. Then use the
padsaw with a wood cutting blade to cut out the central part.
You may want to sand the edges of the plywood sheets at this point to make it look neater.

Step 4: Drilling the bolt holes


Now you need to drill holes for the bolts that will hold the pad together. The important point is that the holes in the metal sheet are 10 mm whereas the ones in the
wooden frame are 5mm, so the metal sheet is held in place just by the pressure of the rubber mounts, and is free to move up and down.
Each hole is in line with the centres of the piezos, 10 mm from the piezo's edge. This translates to 22.5 mm x 50mm from each corner. There are 2 bolt holes at each
corner.
It is easiest if you start with making the holes in the aluminium (which are 10mm), and then use this as a template for the top frame and the base. This way, any mistakes
in drilling the aluminium won't matter so much as the holes will still line up. The top frame and base need 5mm bolt holes to match the machine screws. Mark each sheet
with an arrow on one edge before drilling to show the alignment, so you will be able to line them up the same way each time.

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

Step 5: Soldering the piezos


The next thing is to solder up the piezos. You want to use quite thin wire for the actual connection, then solder this to the thicker shielded cable that takes the signal to the
arduino. The smaller disc on top of the piezo is ground, and the larger one underneath is the positive. Ideally, solder the shield of the cable to the piezo's earth and the
inner core to the positive.
If you get to the end of the project and find that you have the polarities wrong, don't panic! The current firmware on the arduino only deals with absolute values not
positive and negative, so it shouldn't make too much difference.
Once this is done, use epoxy to glue a small metal disc (e.g. a 1 pence coin) to the top of each piezo to provide a bit of clearance above the wires and make a solid
contact with the bottom of the aluminium sheet. Make sure the disc, and the glue you use, are only on the top, inner disc of the piezo's ground electrode, not touching the
outer disc.

Step 6: Making and gluing the rubber mounts


Now you can cut the 8 rubber mounts. They can be cut fairly roughly from the sheet to the same diameter as the piezos. These should be glued in the corners of the base
board and top frame using contact adhesive, 5mm from the edge. Make a thin film of glue on both surfaces and let it go to touch dry before putting them together.
Then glue the piezos on top of the ones on the base board (again using contact adhesive). Mark the cables so you know which sensor they come from. Top left is 1, top
right is 2, bottom left is 3, and bottom right is 4. Tape the cables from the sensors to the base board with gaffer tape, so that they come out on one side.

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

Step 7: Assembling the pad


The final step is to assemble the pad. Put the machine screws in from the bottom, then rest the aluminium sheet on the base board so the machine screws come through
the centre of the holes with plenty of space around them. Then put the top frame on.
At this point you need to decide how you are going to mark out the playing surface of the pad for calibration later. The pad is calibrated by striking it in different places
while running the calibration program. These places are defined in the program as 13 specific points placed on a 5x5 grid (5 lines not 5 spaces). I started by using 1.5cm
clearance from the inner edge of the top frame, but if you want to play with sticks (I am now using timpani sticks), you may want to make the clearance a bit bigger.
When you have decided how much clearance you'll need when playing, take the top sheet off again and mark it up with magic marker. You need a 5x5 grid with enough
clearance round the edges for you to strike the pad at each corner. It's also handy to label the corners 1,2,3, and 4 the same as the sensor cables.
Now put the sheet back on, put the washers and nuts on the bolts, and tighten the nuts to finger pressure. Check again that there is good clearance around each of the
bolts where it goes through the aluminium sheet. You may want to cut the machine screws down to the exact size with a hacksaw at this point. Be sure to do this with the
nuts on, or you'll find it hard to put them on afterwards. It would also be wise to blunt any sharp edges afterwards with a small file.
Finally, tighten each of the bolts by the same amount - 3 whole turns works for me. The pad itself is now finished!

Step 8: Building the circuit


The pad uses a very simple electronic circuit to feed the sensor signals from the pad into the arduino. All this really does is make a false ground at half the 5v power
supply produced by the arduino. The circuit diagram is attached below - I don't want to describe every step you need to take to build this on breadboard or stripboard, but
it's not too hard.

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

Step 9: Software setup


Once you have built the pad and the electronics to work with it, the next thing is to attach it to a computer and start making some music!
I have attached all the necessary software to do this under linux in a .tgz archive. If you have trouble downloading this, the latest version is always available here .
If you want to use windows or mac, it shouldn't be too hard to convert the programs if you have some programming experience. (The only system specific bit is the part of
the midimapper program which deals with serial input from the arduino and midi output to the internal midi bus. This program is in python.)
Please bear with me and take the time to work through these instructions. The software is in an early development state at the moment, so not as easy to use as it could
be.
There are three main bits of software:
The arduino firmware reads the analogue signals produced by the 4 piezos and turns them into raw readings for each strike.
The midimapper receives the strike data from the arduino and converts it into x-y coordinates then feeds these to a software midi port as note on and controller messages
(using controllers 70 and 71). The x coordinate is also duplicated in the midi note number of the note on message. The program is in a pretty crude state at the moment it is a command line program in python which you control using short commands:
The midi messages are read by the supercollider software (which is basically one program but currently in 2 separate files) and turned into sounds which depend on the
position and velocity of the strike.
At the moment, you need to start all these programs separately.
First, load the arduino sketch piezodrum2 onto the arduino. You can find instructions on how to do this on the arduino site. You can test it is working by hitting the pad - it
should print a string of numbers on the usb serial device every time you hit the pad.
If you have rebooted the computer since you loaded the firmware, you will need to run the script resetty to put the serial port into the right mode to run the midimapper.
You also need to install the pyseq python library for the midimapper to work. There may be a package for your distro, or else see here .
Then edit the midimapper file (mmap.py) if necessary to set the right usb serial port device. Now start this program from the command line. The commands are as
follows:
midi - start sending midi events.
stop - stop sending midi events, or stop calibration.
calib - go into calibration mode.
save - save calibration coefficients.
load - load calibration coefficients.
saveraw - save raw calibration data.
calfile - recalibrate from saved raw data.
quit - leave the program.
You have to calibrate the pad at least once before you can use the midi mode. When you start the calibration, the program will ask you to strike the pad several times (5
is good) in a series of points on the grid you have marked out. The names of these points are mostly self explanatory except for 'top left mid', which is half way between
the top left corner and the centre of the pad. Same for 'top right mid' etc.
Once you have calibrated the pad, use 'save' to save the calibration data for next time you run it, then 'midi' to go into midi mode. (You only need 'saveraw' if you are
thinking of modifying the formula used to map the raw readings into coordinates). At this point you can check the midimapper is working by watching its output in the
terminal - every time you strike the pad it should print out the x and y coords of the strike.
Next you can start up the supercollider programs. See the supercollider site for instructions on installing and using this programming language. The easiest way I have
found to use it in linux is to use the plugin for gedit. You will probably also need the jack sound system for outputting sounds.
The program 'drummidi.sc' just reads the incoming midi signals and sends them to a synth called 'MidiDrum'. 'synpad.sc' has various suitable synth definitions
('synthdefs') to work with this. First choose a synthdef you like the sound of from the description and evaluate it (i.e. select it in the editor and press ctrl-E). Then evaluate
all the code in 'drummidi.sc' - this will start the program running.
The final step is to connect the midi out port from the midimapper to the midi in port for supercollider, using a program like qjackctl or aconnectgui.
Once you have done this, your pad should start making sounds. Celebrate, try making some music, do a rain dance, whatever works for you!

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

File Downloads

synpad-software.tgz (58 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'synpad-software.tgz']

Step 10: Final thoughts


I've enjoyed making the pad and playing about with different sound effects.
Timpani mallets, which are felt headed bamboo sticks, work nicely with the pad if you don't want to use your fingers.
The midimapper program is a bit crude at the moment, and I'm hoping to develop this further to make it easier to use and add some more features.
The position sensing is reasonably good - about 5% accuracy which is enough to make some interesting variations as you play a rhythm.
I would also like to make a few more pads and work out a way to connect more than one to the computer at the same time.
For playing, I have been putting the pad on a flat square piece of soft packing foam to reduce the amount of interference from external vibrations. This might get
incorporated into later designs. It would also be nice to tidy up the general look and feel of the pad, by painting it and putting the electronics in a proper box.
I would like to thank Alaric Best for his ideas on the design, which set me off on the track the current pad is based on.
If you make one of these yourself, it would be nice to know how it went - you can get in touch by sending me a private message.
For more information, and any software updates, see:
ganglion.me/synpad/
Good luck!

Related Instructables

Velocity
Sensitive Drum
Trigger from
Old
Headphones by
cheft

rock band drum


kit (WITHOUT
MIDI) :D by
er1k213

Ripping Drum
Tracks from
MIDI files by
jdlink

Electronic
Drums Lingo by
doggyd69b

DIY Electronic
Drums (Drum
Module Req'd)
by
geekboxjockey

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

How to build a
Right Hand
Drum Stick by
pedropete1

Comments
45 comments Add Comment

H4T says:

Nov 28, 2010. 2:13 PM REPLY


I was wondering if you could generally explain how your circuit works? Am I correct in thinking that your circuitry on the left is basically a fancy diode / oneway valve? It looks to me like it is supplying a constant 5V power to all piezo sensors when none of them are in use, and uses the op-amp to supply voltage
directly from the piezo sensors themselves if they are hit with enough force to overcome the 5V battery.
But I was just wondering, why not just use a diode?

ganglion says:

Nov 28, 2010. 3:24 PM REPLY


The reason for using that circuit is because I wanted to be able to track negative going as well as positive going pulses from the piezo. When you hit it, it
starts going positive, then oscillates both negative and positive. If the negative terminal of the piezo was just connected to the ground of the arduino, the
negative part of the pulse would be below ground, and wouldn't be picked up by the ADCs.
What this circuit does is to halve the input voltage using a voltage divider, then use an opamp / transistor buffer to provide a constant voltage at that level
(roughly 2.5 volts). Then when the voltage from the piezo goes negative, it's relative to that 2.5 volt false ground, not to the ground of the arduino.
The program on the arduino does a short calibration when it starts up to work out what the resting voltage from each piezo is. That value is then
subtracted from each reading.
There might be better / simpler ways of doing this, but that's the way I did it in my first version, which I'm still using, and it seems to work ok.

H4T says:

Dec 12, 2010. 2:47 PM REPLY

cool, thanks!
I've taken another look at the circuit and brought up the datasheet for the TS912 and noticed a problem. In your schematic you have your ~2.5V
output of the voltage divider section going into pin 1 of the TS912. According to the datasheet below, pin 1 is for output....are the pin numbers just
incorrect in your schematic, or did you use a slightly different chip?
http://www.st.com/stonline/products/literature/ds/2325/ts912.pdf

ganglion says:

Dec 12, 2010. 4:46 PM REPLY


P.S. I can't get the circuit designer I'm using (GNU EDA) to remove the wrong pin numberings from the op amp, so I've just put up a new version
with no numbers. The '+' and '-' signs on the inputs should be enough for people to read the schematic, I think.

H4T says:

Dec 12, 2010. 5:27 PM REPLY

Thanks, things make a little more sense now! :P


Did you also happen to change the resistor values across each piezo from 10M to 1M? Or am I remembering it wrong?

ganglion says:

Dec 13, 2010. 2:41 AM REPLY

They were always 1M as far as I remember.

ganglion says:

Dec 12, 2010. 4:35 PM REPLY


Sorry about that. You are right that the pin numberings are wrong on my circuit. I'll put up a corrected version in a minute.
The 2.5v divider should be feeding into the non-inverting input of the op-amp (pin 3), the feedback from the resistor should be on the inverting
input (pin 2), and the output to the piezos should be on pin 1. It wouldn't hurt as well to put a high value electrolytic capacitor (100 uf?) across the
100 ohm resistor to make sure that the current into the piezos isn't drawing the ~2.5V rail up or down in voltage.

brendanmccloskey says:

Dec 2, 2010. 4:23 AM REPLY

Hi ganglion
this looks deceptively simple, but as engaging as Randy Jones' physical drum model:
http://vimeo.com/2433260
before I try to emulate your hardware system, am I right in assuming you are using the Z-axis (force/velocity) from the piezo's as well as X/Y location? I
wonder if four FSRs (under foam, then perspex) in each corner would work just as well?

ganglion says:

Dec 2, 2010. 6:15 AM REPLY


Yes, the velocity value is worked out from the sum of values in each corner. For the position, I use a least squares curve technique to fit an equation to a
set of calibration data.
Not sure about FSRs (force sensitive resistors?). They might be worth trying, and could work perfectly well because really it's just sensing the transferred
pressure at each corner, but I don't know much about their properties.
I guess the thing would be to go ahead and try it - it would be good to have someone experimenting with a different physical construction, so let me know
how you get on.
andy

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

brendanmccloskey says:

Dec 2, 2010. 6:23 AM REPLY

Thanks
I'll have a prototype ready in the new year

jsandeef says:

Jun 9, 2010. 12:51 AM REPLY


This seems like it could work in a circular form, to simulate a multi-zone snare or cymbal. How accurate are the coordinate calculations? I'm a n00b to
Arduino and my only experience with programming is a few C++ classes, but based on the code I've read, this might be something I could try. I'm still waiting
for my first board to arrive next week, though.

zen.webb says:

Jun 15, 2010. 7:58 PM REPLY


You may have good luck constructing a square pad but overlaying a round frame on top of it. Then you can modify the code to ignore all piezo signals or
coordinates that are from strikes in the corners of the device that you don't want to be active.

ganglion says:

Jun 9, 2010. 1:09 AM REPLY


A round pad might be possible - the question would be how many piezo sensors to use and where to put them? The advantage of a square pad is that
you can map the x and y coords easily onto 2 independent midi controllers, whereas for a round one it's hard to see how you would bring in the second
dimension.

jsandeef says:

Jun 9, 2010. 12:58 AM REPLY

Oh, I just read that the accuracy is within 5%, which is pretty good, given what you worked with. Great job!

ganglion says:

Jun 9, 2010. 1:10 AM REPLY

Thanks! :)

ganglion says:

Apr 16, 2010. 3:35 PM REPLY

If you make one of these, it would be nice to know how you got on, so feel free to send me a private message.

XsavioR says:

Mar 18, 2010. 9:43 AM REPLY


Perhaps using multiple PIC micro controllers one per "zone". If you like I have code examples of ASM serial driven midi, and USB2.0 midi using Microchip
demo code. You could get quite a few PIC for the price of an arduino, and it would lend to multi tap ability. Also it would be directly plug and play with apps
like reason, virtual dj , (those are the two I use to test)

ganglion says:

Mar 18, 2010. 12:15 PM REPLY


I don't see how you could do this and keep the continuous x-y controllability. The idea of this pad is that the x and y coordinates vary smoothly as you
tap in different places across the pad, so splitting it into zones would spoil this.
You could make a pad with an array of piezos controlled like you say, but that would be a different project.

XsavioR says:

Mar 18, 2010. 1:12 PM REPLY


Like a kaos pad I see. Then shouldnt some code make it read 2 taps. Some maths. All two taps on a kaos pad is is an average of the x y coordinates.

zen.webb says:

Mar 18, 2010. 7:50 PM REPLY


I was just going to ask about that. If you hit the pad with two fingers simultaneously do you indeed get an XY value at the midpoint or average of
the two points (i guess that would depend on whether or not both fingers strike with the same velocity)?
XsavioR: your idea later in this thread about using a master and slave PICs to speed up the process is interesting, you should pursue the idea.
ganglion: You don't have to believe in patents for someone else to take the idea out from under you. This project introduces some tech that has
some pretty awesome potential and if you apply it in the right area (buttonless drum pads for instance) audio geeks with eat it up like crazy. But
luckily for all us hobby enthusiasts you put it out there in the public domain, which I can definitely appreciate.

XsavioR says:

Mar 18, 2010. 10:09 PM REPLY

Im working on a web based , rfid , security / monitoring / control device. :) ive got my hands full :)

ganglion says:

Mar 18, 2010. 2:48 PM REPLY


I think the code I already have would do that, because it's just based on working out the distribution of pressure on the sensors between the 4
corners.

XsavioR says:

Mar 18, 2010. 1:16 PM REPLY


PS what i meant was use some small PIC for each input, then poll them all at one time using a master PIC , basically out put binary from the 8
pics , then poll the results, do some math on the master and output the MIDI signal. It should be fast enough to surpass the 10ms the human ear
can hear, given the right oscillator on the master pic. Definitely another project but interesting no less.

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

ganglion says:

Mar 18, 2010. 2:56 PM REPLY


At the moment I'm happy with the arduino - it's easy to work with and quick enough to send the raw sensor data to a computer for further
processing. What you are talking about might be good if you wanted the whole thing to be self contained and just send midi data, but I'm
happy with that side of it the way it is at the moment.
The thing I want to do next is clean up the physical design a bit, and maybe paint it, and then work on making it possible to have several pads
running at the same time.
What I'm planning to do is drill holes in the base to bring the cables to the bottom of the base, then add some thick foam rubber to lift it high
enough up to fit an arduino pro-mini with a mini-usb connector on a bottom edge. That way you just need a usb hub to plug in several pads at
the same time.

spydercanopus says:

Mar 18, 2010. 10:38 AM REPLY


If you can find a shop to make you a sleek chassis to house the components, you could sell them if they're a good price. Let people tweak the sound effects
and you'd have one cool computer peripheral instrument.

ganglion says:

Mar 18, 2010. 12:16 PM REPLY


I'm thinking thati when I have improved the design a bit, I might sell a few to people who are interested, but I'm not planning on doing this in a big way.

spydercanopus says:

Mar 18, 2010. 1:09 PM REPLY

Inventors rarely see the value of their brain childs. You have something really cool here.

ganglion says:

Mar 18, 2010. 2:45 PM REPLY


Thanks :) . It's just that I went through all this in my head when I was working on it and considered various options. One thing was all the issues
about patents (which I don't really believe in) versus open hardware, but the main thing is I'm not really up for trying to run a business at this point
in my life.
Also if I was trying to make something like this for a mass market, I probably wouldn't do it that way - I would spend time researching something
like surface acoustic wave touchscreen technology, and do it in a more sophisticated way.
The point of this project for me (apart from having fun making something I could play myself) was to make something simple that anyone could
build themselves out of simple components.

yeehacmh says:

Mar 11, 2010. 2:01 PM REPLY


I always wanted a system like this on my car's steering wheel. Maybe a couple buttons on the free foot on the floor too. You know how you're bopping down
the road and you're beating on the wheel to your favorite tune. This could be added to the audio output speakers and you would become part of the
playback.

rattyrain says:

Mar 18, 2010. 1:12 PM REPLY

Haha, that would be too awesome!

zen.webb says:

Mar 12, 2010. 7:40 PM REPLY


Have you considered using the Arduino itself to extrapolate the sensor data and output MIDI notes directly, perhaps through a true MIDI cable?

I see the Python code has some potentially CPU intensive math so it may introduce an unacceptable amount of lag if ported to the Arduino, but maybe not,
especially if you upgrade to a more powerful Arduino or clone.
In practice do you find that the calibration functions you have written help much? Or did you introduce that because you noticed noise in the system? I would
like to see if this device can be optimized into a more plug-and-play package. This sucker has some fantastic potential.

zen.webb says:

Mar 12, 2010. 8:49 PM REPLY


Also, what is the equation you use to integrate the the piezo signals into an XY position? I'm just going to copy the code, but was just curious if its a wellknown equation, maybe there is a reasonably analogous alternative function out there for CPU calculations.

ganglion says:

Mar 14, 2010. 7:02 AM REPLY


I just made the equation up, based on having thought about what the likely form of the relationship should be from the physics, and then used
calibration and curve fitting to fill in the detailed coefficients (e.g. to allow for some sensors being more sensitive than others)

ganglion says:

Mar 13, 2010. 3:51 AM REPLY


I did try running it with some simpler equations and less calibration, and it didn't work so well. (less consistent x-y coords). You could probably put at
least some of the python code onto the arduino - I wrote it that way for the convenience of python as much as anything else. One way to do this
would be to keep the calibration code on a computer, but once it is calibrated you could upload the coefficients to the 'duino and just feed the strikes
into the equations and generate midi data that way.
Personally I'm happy to have it split like this because the synth at the end is in supercollider so needs a computer to run on anyway. Also I am
planning to add some extra functions to the midimapper which would be hard to do on a 'duino just because of speed and memory constraints.

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

zen.webb says:

Mar 11, 2010. 6:31 PM REPLY

Now THIS is a sweet project, can't wait to try this myself; I love the simplicity of it! :)
Does your pad handle simultaneous taps at all? I'd imagine that multiple simultaneous taps may cause dampening of the vibrational waves, but maybe in
practice its not too bad.
And using Python on Linux for 'duino serial data? That's f*cking hardcore, lol :P

ganglion says:

Mar 12, 2010. 1:46 AM REPLY

Thanks. :)
It can't do simultaneous taps but the retriggering delay is quite short (15 msec), so sometimes it almost sounds like it can.

EnigmaMax says:

Mar 10, 2010. 5:58 PM REPLY

can it detect flams?

ganglion says:

Mar 10, 2010. 9:56 PM REPLY


It depends how close they are in time. It can only detect one simultaneous strike, but the trigger resets itself after 15msec, so if you play carefully you
might be OK.

EnigmaMax says:

Mar 11, 2010. 5:47 PM REPLY

i think the flam is around 80msec, so I guess it should work!

kaiseb says:

Mar 11, 2010. 2:24 PM REPLY

CLICK HERE:

deqaxwer says:

Mar 11, 2010. 10:53 AM REPLY

Great=) nice thing.. .

dazirius says:

Mar 10, 2010. 6:41 PM REPLY

Awesome work!
Very sweet build and nice use of a 'duino :D

ganglion says:

Mar 10, 2010. 9:57 PM REPLY

Thanks :)

LkArio says:

Mar 10, 2010. 8:56 PM REPLY

Awesome! I think it would be a good idea to make a keyboard controller using a similar procedure...

Bongmaster says:
now thats nice :)

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/

Mar 10, 2010. 4:51 AM REPLY