[sdiy] Keyboard Encoder Experiments...

Amos controlvoltage at gmail.com
Tue Feb 12 00:43:16 CET 2008


congrats, you've (almost) re-invented the PianoBar!

(Don Buchla designed this as a MIDI-retrofit for real pianos... it
used IR deflection to scan the white keys and IR interruption to scan
the black keys.)  The main difference is that both emitter and
detector are fixed on the PianoBar and use the key as the reflective
surface.

Gross calibration is not hard... you read the min/max values coming in
from the sensors and map your desired output range to that.  However,
getting consistent min/max values, which equates to your effective A
to D resolution, is difficult and requires very good and consistent
alignment of your IR elements.  Otherwise you can have a 100-point
"raw" value range on one key and a 15-point range on the next.  When
both are mapped to e.g. MIDI velocity, you have one very dynamic key
and one not-very-dynamic, even though they can both output the same
MIDI 0-127.

On Feb 11, 2008 5:31 PM, Peter Keller <psilord at cs.wisc.edu> wrote:

> How about an aligned IR emitter/detector pair where the emitter is
> attached to the key and the detector is fixed to the case and one or both
> have a narrow field of power. Then when you move the key, the beam power
> varies as they misalign and can be read as a position sense. Encase the
> tiny contraption in a black box to remove outside light influence.
>
> It would look like this:
>
>
> +---------/\/\---------+                                 fingers go here
> |DETECTOR]     [EMITTER|-----------------------------------------------
> +---------/\/\---------+       ^
>                              fulcrum
>
> the /\/\ isn't a resistor, but instead a bendy part of the box the sensor
> is contained in.
>
> Calibration would kinda suck though.... A) If when the key is up the beam
> is fully on, you'd have to ensure that when the key is down, you wouldn't
> have marked fully off before the key actually touched the bottom--this is
> a physical effect.  B) after ensuring A is correct, you'd have to then
> read the position when the key is up, and then when the key is down,
> for each key and then store the information (after ADC conversion) in a
> bank somewhere--this is an electrical effect since the IR pairs might
> be slightly different so you can't use a single calibration value for
> all of them. If you sealed the IR sensors right and were *sure* about
> mechanical tolerances, you'd probably only have to calibrate it once if
> you stored the original results in NVRAM or something.
>
> Hall effect sensors have the nasty habit of picking up stray fields and
> your speakers might cause your board to think it has depresed the keys. :)
> I think it is easier to shield the IR emitter than the magnetic source.
>
> Later,
> -pete
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>



More information about the Synth-diy mailing list