Analog inputs for trigger-to-midi capability


#1

Hey guys,
Just finished up a build project with axo, will post pictures and build notes soon. :smile: Anyway, it got me thinking about different ways to use the same controller layout I already have, and I realized it would be perfect for a drum machine or digital drumkit brain. I have some old simmons SDS pads laying around, so I tried connecting them to the analog input pins and couldn't get signal to register. I assume that's because the analog ins have a VREF of 3.3v for use with potentiometers or touch controllers or what have you. The signal out from the pad registers at about 0.1v maximum on my oscilloscope, and only for a tiny duration.

In looking at some schematics for other diy trigger-to-midi boards, it looks as though people are mostly using some op amps (LM324) and diodes (BAT85) to amplify and clean up the signal for PIC type and/or arduino ADCs. Does this seem like it would work with the axoloti? Would the signal read-in be fast enough to use for playing drums in realtime? Any other hardware pitfalls I should consider?

Thanks!


Piezo trigger question?
#2

I think you need a bias, because the signal coming from such pads is AC (+ and -).
I made a board for this with a 4 channel op-amp for 4x "audio-to-GPIO".
It adds 1.65v bias and results in silence reading as a value around 32.
I use it for other audio signals, but tested with piezo disks successfully too.
The onset detection I tried is rather primitive but works surprisingly well:

note that in this screenshot the disp/chart doesn't show the bias offset because the op-amp board is not attached, it's just a 'floating' gpio pin...


#3

Biasing and then feeding into a GPIO analog in, has the risk of undersampling the piezo signal, as it will be sampled at only 3kHz.
After a rectifier, a (simple) analog low pass filter can be used to limit the bandwidth and avoid undersampling.
A half-wave rectification may miss the energy coming from the negative excursion, resulting in a uneven response, so I think a full wave rectifier would be better.
I'd avoid potentiometers for sensitivity control at the input, it is better to adjust this in the patch if the dynamic range allows.
Independent from direct, half- or full-wave rectified input, some patchwork is needed to extract velocity in a robust way, I don't know what feature is the most robust.

Anyway, just some thoughts here, not a tested solution. It is fairly simple to make working triggers, it takes a bit more research to get consistent velocity response. For in-depth research, recording the response at different velocities and inspecting the time-domain and spectral response would be a good start. Probably someone has already done this, I did not find a good article on the internet but only searched briefly.


#4

Thanks a lot for this, exactly what I was looking for!
I'm trying to make Axoloti convert input from piezos into MIDI note triggers for a drummachine:

When I tap the piezo it sends only "Note Off" messages rather than "Note On".
I can't figure out what I'm missing here... any ideas?


#5

Scratch that! I just needed a value for velocity. Silly me! xD


#6

if you don't use the velocity from the piezo reading, you can also use a digital input.