I am using a raspberry pi and puredata to make a drum kit. I have sounds which are read through soundfiler and I activate them by using Gpio inputs via wiringPi.
Now I am trying to use an arduino to read analog values from the peizoelectric sensors, map them to midi value, and send them via a usb midi cable to puredata.
That is done, but how will I be able to play back sounds with a volume that is equal to the velocity in the midi packet?
Example- If I strike the sensor hard, the arduino sends 127 as midi value and puredata should play back a sound at full volume, and if I strike the sensor softly, the sound should play back at less volume.
Note that I am thinking of having velocity sensitivity, and not aftertouch (would be cool to add later on).