[sdiy] MIDI velocity

sleepy_dog at gmx.de sleepy_dog at gmx.de
Wed Apr 6 22:08:17 CEST 2016



As for "what's the difference" (1 GPIO per switch vs. matrix):
Matrix switching does cost some extra time, no? I don't know how much to 
make sure it all settled enough to do clean measurements... but with 
somewhat lengthy traces or even wires of an existing keybed PCB (and 
diodes also adding penalty?), perhaps significant, I haven't done the 
math or sufficient experience to tell off the cuff.
Maybe you could comment.
So, with GPIO approach, you would have a few cycles each for reading anc 
testing ports. With matrix, you have extra cycles for switching the 
matrix, then perhaps 1..2 cycles waiting, to make sure the probably 
slower than your MCU switching of the external mux ICs is done, before 
reading the ports...
Maybe it doesn't really make a practical difference :-)

Wiring 122 dedicated wires:
Sure, I wouldn't have done that, use actual wires & connectors for that 
approach. If it was possible / easy enough, I'd have replaced or 
attached to the PCB in the keybed, maybe with 4 small 48pin MCU boards 
in 4 places along the keybed, tapping onto the PCB with managable connctors.
No manual wiring, and no actual wires. My end connector would have been 
serial I/O, that'd be a small enough connector :-)

I might get back here if, some day, I have time (TM) to build my own 
Allmighty MIDI Monstrosity with the Fatar bed and all the Alps faders I 
have lying around :-D

Steve

Am 06.04.2016 um 20:30 schrieb rsdio at audiobanshee.com:

> As for the idea of hooking each key to its own GPIO, that approach is counter-productive if you think about the actual firmware. Even with a 32-bit processor, the largest GPIO port that you can read would only be able to deal with 16 keys (velocity needs two switches). Then the firmware would loop through each port and would still need 4 iterations to handle all keys. How is that any different from having 4 columns in a keyboard matrix? Then, if you consider an 8-bit processor instead of a 32-bit ARM, your GPIO ports get smaller and the loop iterations increase to 16. Basically, from a firmware point of view, it's no more efficient to loop through separate GPIO ports than it is to write the column bits and read the same GPIO port on each iteration. I realize that someone already pointed out that standard key beds are already wired for matrix access, but I wanted to illustrate how both approaches require a loop that processes only a subset of keys at a time.
>
> There's also the consideration of wiring between PCBs. Discrete GPIO would require 122 dedicated wires for a 61 keys with velocity, whereas the matrix can be done with 24 wires (16x8) or even 23 (12x11). DIY may not matter, but commercial designs probably want a 24-pin ribbon between boards rather than a 122-pin ribbon!




More information about the Synth-diy mailing list