Replies: 9 comments 31 replies
-
That's an interesting finding. But since the contact of the stick to the pad is so short, I hardly believe that the signal you see is purely coming from the pad. Maybe some Teensy ADC cross talk is also taking place here. Or the switch in the pad sticks to the contact for a short time after the strike. Anyway, can you please share a screen shot of these signals? If the rim signal looks like the normal pizeo signal, in that case it may be beneficial to use |
Beta Was this translation helpful? Give feedback.
-
I really don't understand this. The two channels (piezo-> tip / switch-> ring) are isolated from each other and only share ground. What the switch does is short its input to ground. When it does that, it's telling the module "hey, a switch input was hit, trigger my MIDI note and not the bow note". I thought it would be easy to distinguish whether an analog input was shorted to ground through a resistor or not (to know which switch has closed), but it doesn't seem to be the case. Then, to assign a velocity to the hit, the module uses the signal from the piezo. If you're seeing weaker signals on edge and bell hits, it's likely because those hits are further away physically from the piezo. But there's no way you're seeing a piezo signal on a switch input - at most it's the switch bouncing. |
Beta Was this translation helpful? Give feedback.
-
Hi again @ignotus666 . It's much appreciated that you're joining this thread! My understanding of rim switches comes from https://hub.yamaha.com/drums/d-electronic/how-do-electronic-drums-work/, which indicates that a rim switch switches the piezo signal to a different output, when hit ("diverts the spike down a different part of the cable"). Since my signal looks like this However I also already confirmed that the input impedance goes to 31k and 36k depending on which switch is hit. Unfortunately that seems to be too insignificant of a difference to be observable with the 10 bit ADC. |
Beta Was this translation helpful? Give feedback.
-
On 11/21/23 22:42, Volker Fischer wrote:
Maybe it's worth looking at the HelloDrum library since it claims to fully support such pads.
According to [1]:
bow = (velocity > Threshold && firstSensorValue < edgeThreshold && lastSensorValue < edgeThreshold)
edge = (velocity > Threshold && firstSensorValue > edgeThreshold && firstSensorValue < cupThreshold && firstSensorValue > lastSensorValue)
cup = (velocity > Threshold && firstSensorValue > cupThreshold && lastSensorValue < edgeThreshold)
choke = (firstSensorValue > edgeThreshold && lastSensorValue > edgeThreshold && lastSensorValue >= firstSensorValue)
So apparently HelloDrum uses two different thresholds and two measurements (peak & last measurement at the end of the scan time).
[1] https://github.com/RyoKosaka/HelloDrum-arduino-Library/blob/master/src/hellodrum.cpp#L497
Do you have an Arduino available for testing?
No, just the Teensy. Maybe I'll try the 10k when I have some spare time to see whether the voltage doesn't drop to 0V with that.
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
On 12/8/23 21:08, Volker Fischer wrote:
I am still thinking that it makes sense to find out why a simple threshold works for the HelloDrum library but not for you.
So you tested the simple threshold without capacitor and it worked for you?
Imho hellodrum is just some other open source software where the author possibly got it to work with one particular piece of hardware s/he owned. Just because s/he got it to work once doesn't mean it works for everyone or could even be considered as some sort of reference implementation.
Anyway as I've said:
It would work with the capacitor circuit for me as well, but only if the capacitor value is chosen specifically for the respective piece of hardware. So if you insist on that particular implementation, I can get it to work for me as well. It's possibly just not the best way of doing it.
|
Beta Was this translation helpful? Give feedback.
-
On 12/9/23 09:32, Volker Fischer wrote:
> It would work with the capacitor circuit for me as well
What about the latency you get with your algorithm?
What algorithm? The ones I mentioned so far are obviously wrong as per my later findings.
This discussion doesn't look constructive to me anymore. Feel free to close it.
|
Beta Was this translation helpful? Give feedback.
-
On 12/11/23 18:20, Volker Fischer wrote:
What I actually do not understand is that [your calculations in Spice showed that the 10k cannot be detected with the ADC if using 22k and 100k resistors](#89 (comment)). But my measured numbers tell a different story. So some difference between your theoretical calculations and the real system much exist.
Shorting an effective Rs=110k vs Rs=100k to GND with Rp=22k is 13 mV (16 points in a 12 bit ADC / 4 for 10 bit) difference according to my simulation. This looks pretty much in line with your practical results. The link you were referring to was talking about my situation with an effective Rs=131k vs Rs=136k (the input impedance of my pad is 31k-36k), which results in 4mV difference only.
|
Beta Was this translation helpful? Give feedback.
-
More samples at #133 (comment) - unfortunately making both approaches questionable. |
Beta Was this translation helpful? Give feedback.
-
After our discussion I had another look at the edge/rim vs bell signal of such a pad and observed the following key points:
Based on these observations I believe that a possible algorithm to support these kind of pads could work as following:
|[channel 1] - [channel 2]|
. If that difference is above a certain threshold, the piezo signal represents the edge. If it's below that threshold, it represents the bell. It may be the other way around for other pads (depends on where the vendor places the additional resistor).If that doesn't work, it may be necessary to amplify the difference in hardware. Anyway I think the difference is the key here.
Another option from looking at the signals may be to decide based on the length of the power ripple, but I'm not sure whether that works for all of these pads.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions