MIDI pitch bend with center tap potentiometer?

Status
Not open for further replies.

oddson

Well-known member
I've learned that the pitch wheel on many MIDI controllers use a pot with a center tap (fourth pin).

To utilize the pin I'm guessing you would connect the center tap to ground and the alternately source and sink the two ends to read pitch-up and -down positions separately.

This would give you an extra bit of resolution and would avoid having to calibrate a center voltage but uses at least one extra digital pin.

Does this sound right or do commercial controllers have a different (better?) means of using the center tap?
 
Using a grounded center tap would mean having a bipolar voltage supply (positive end negative) at the ends of the potentiometer which is good for analog synths working on +/-15V.

With an Arduino or Teensy, you are on unipolar supply and sending negative voltages to the ADC input would kill the chip.

Thus, forget about that, and remain unipolar without center tap. The "center pos. calibration" is easier to do in software.
 
Not a bipolar power source...

If the center is grounded, as well as one of the two ends, then there is a voltage divider between the center and the hot side and a zero voltage segment on the opposite side.

If the wiper is on the hot side there is a non zero voltage proportional to how far from center the wiper is. If the wiper is on the other side the voltage is zero.

Now reverse the end voltages (digital write) and read again... a non zero voltage will be read if the voltage was zero before... and vise versa. The side that was hot when you got a non zero reading tells you the pitch change direction.

(Near) Zero on both reads means the wiper must be at (near) the center tap.

You would have N+1 bits of data when you map the two readings to the 14 bit output value because you would map the non zero reading to half the output scale based on which side was hot when the non zero reading was obtained.

Otherwise all you get from the centre pin is a centre voltage calibration that corrects for non equal resistance values across the two sides. But this is a static value so there's no point reading it on each pass... maybe just once during startup. And you need a second analog pin (or a switch to take the calibration reading) and you don't improve on the resolution... you just split the N bits of resolution to the two (unequal) sides.

I don't have a pot with such a tap to test on right now... but the logic seems sound to me.

I was curious if there is some other scheme that is simpler to implement (one pin only?) or that gets more than a static mid-point correction value.

One thing I considered is a voltage divided source (possibly an active one) to the center tap to pull it closer to 0.5 of the supply voltage rather than software recalibration.
 
The problem which you'll see is that you write a pin digital low, it will never be exactly ground potential since there is the series resistance of the CMOS transistor which internally pulls the pin down. Same for the high level potential. Depending on the potentiometer's resistance, there might remain uncertainties...
 
Thanks... that did sort-of occur to me but I didn't think the voltage would be significantly off... might make my idea unfeasible (but without the part I don't think I will know for sure).

It has since occurred to me that the center-tap wheels I've seen may be normally found in synths -- where the voltage difference from the center is needed to modulate oscillators and so the tap is to compare via an op amp.

Then it occurred to me this that just connecting the tap and the wiper to a differential op amp and reading the output would be the obvious solution for MIDI too IF there is any real advantage to using the center tap at all for a MIDI controller at all... but I'm now thinking there is no advantage....

..so nevermind ;)
 
... but I'm now thinking there is no advantage....

That's exactly what I tried to tell you... ;)

Under normal usage conditions, the pitch bend wheel allows +/- 2 semitones, so 2 of the native 12bits of the Teensy ADC go for that, then there are 7 bits for the cents and there remain 3 for the centcents. Thus, you get a resolution of roughly 1/16 cent which should be more than ok.
And even if you tweak your synth or your plugin to go +/- 16 semitones which is covering almost 3 octaves (5bits), you'd still have 7bits for the cents, and thus unnoticeable steps.
 
yeah ... I was trying to figure out both the how and why they would have a center tap...

Because I didn't understand the 'why' (because it makes modulating oscillators on a hardware synth easier) I went down a blind alley on the 'how'.

Thanks again.
 
Status
Not open for further replies.
Back
Top