Miles posted May 18, 13:11:
I'm hoping to make a digital hang/hand drum as a gift for my partner. I've got SamplerBox running on a Pi 3 A+ (this is amazing software by the way, so great that it's openly available!). I want to use an Analog Zero by RasPiO to connect piezo triggers to the Pi, and trigger SamplerBox, with velocity sensitivity. Has anyone done this before? I found a project called eXaDrums, which uses the Analog Zero to make a drum machine, but I don't have the expertise to mix this with SamplerBox. Any ideas would be gratefully received!
HansEhv posted May 20, 00:18:
It hasn't been done, but it's an interesting idea to use the Analog Zero as input instead of MIDI.
I think you should drive this device directly, with an approach similar the GPIO buttons (using the analog approach of the AnalogZero) and the note-on logic directly called from the GPIO thread. Since you want to drum, you don't need the note-off logic (this has a caveat on notes cleanup, but I think it that's fixable as I did so in my alternative fork in the midi callback which you now skip).
Alternative way is to have a separate thread running for the Analog Zero handling and let that generate midi signals via the MIDI-through of the PI so you can use the standard note-on/note-off handling of the midi callback. This is a bit cleaner, but blocks the way for other usage of the the midi through.
Since samplerbox takes care of sound generation, mixing with eXaDrums makes no sense.
Bottom-line: I called it "interesting" with the undertone of "a bit complex".
Eric posted Jun 3, 10:12:
A ESP32 could be a choice too. I has 10 touch-sensitive inputs and a lot of analog inputs. I believe, it would be possible to create a small device which outputs normal MIDI-Signal which You could feed into the samplerbox without any modification of the code of samplerbox. I had used it already in another project but I didn´t create MIDI-Events and as far I could remember, it was possible to identify how fast You touch something when comparing the current tocuh-values with the average of the last values. The bad thing: the values from one touch-sensitive pin differed totally from one pin to the next one. In my case more than 70%. I measured each and then I put these values directly into the code. Perhaps other developers try to implement a calibration-routine into it when You start your application and store the calibration in the EPROM. I used adhesive copperfoil to create small touchsensors.