Teensy 2.0++ internal pull-down? ambitious midi controller

Status
Not open for further replies.

ulph

Member
I was wondering if there's a technical limitation as to why the 2.0++ has no INPUT_PULLDOWN. I sorely need it for my 88-key fatar controller, lest I want to solder 22 resistors (or I'm stupid) because of how the diode matrix is wired on the actual keyboard.

I'm happy to share the code once it's done, of course, but right now there's nothing to show for. My plan was to do release velocity, and add at least 4 jacks for continous pedals :) (for controlling soft synths such as PianoTeq which supports this sort of madness).

I have a 3.6 en-route and as far as I can tell, that one can do INPUT_PULLDOWN, but that one is weeks away and I'm curious.

fyi; this is the schematics for the keyboard bed connectors
Matrix_88.jpg
 
Last edited:
Thanks for taking the time to find that and post the link, since yes it looks like this micro took the simple choice of offering only a single variety of pull resistors, tossed a coin and went for pullups.

Design wise having two sets is more than twice as complicated so it's a gimme if shaving silicon for cost to delete one.

is this something that can be read using the keypad library, or have that got more complex than that?

https://www.pjrc.com/teensy/td_libs_Keypad.html
 
Thanks for taking the time to find that and post the link, since yes it looks like this micro took the simple choice of offering only a single variety of pull resistors, tossed a coin and went for pullups.

Design wise having two sets is more than twice as complicated so it's a gimme if shaving silicon for cost to delete one.

is this something that can be read using the keypad library, or have that got more complex than that?

https://www.pjrc.com/teensy/td_libs_Keypad.html

Possibly I can use the key library. I suppose if it has debouncing and precise timing it'll serve my purposes.

88 keys means 88x2 switches, and the precise timing between pairs of these is how the velocity (how hard you strike, or release) is calculated, so precise timing and clever debouncing (if needed) is crucial.
 
If trying to monitor this many keys for velocity the final total cost in time+money may come out lower if your design uses sub controllers to move the time critical stuff into the digital domain soonest. So using a Teensy LC per 10 keys directly monitoring the keys in a fast loop and then outputing the data onto some form of bus.

Though looking at the wiring again suspect this isn't an option without major mods to an existing perfectly good wiring harness, so the 3.6 may be the right hammer for this one.
 
No need to solder 22 resistors. There are resistor arrays available with 8 identical resistors in a 9 pin SIL package. 3 of these would easily solve your problem in an elegant way.
 
If trying to monitor this many keys for velocity the final total cost in time+money may come out lower if your design uses sub controllers to move the time critical stuff into the digital domain soonest. So using a Teensy LC per 10 keys directly monitoring the keys in a fast loop and then outputing the data onto some form of bus.

Though looking at the wiring again suspect this isn't an option without major mods to an existing perfectly good wiring harness, so the 3.6 may be the right hammer for this one.

I could split the job up in the lower and upper banks but I'm hoping the 3.6 can do the sense job and usb (midi) well enough.

No need to solder 22 resistors. There are resistor arrays available with 8 identical resistors in a 9 pin SIL package. 3 of these would easily solve your problem in an elegant way.

Ah, I'll keep it in mind! Much appreciated.

There's a lot of components I ought to know about I feel, but as a hobbyist there's only so much time to research. In another usb/midi project I did e-drum sensing, and figured if there was any ready-built peak detector circuits it'd save me a lot of soldering headache...
 
I've now had the time to sit down for a bit and get to work with a Teensy 3.6.

The project is alive, and I'm rather happy already with the response I get from my keybed - I think it's better than the original. More dynamic range and also the release velocity works. It is plenty fast! I had to make sure to not scan too quick in fact or I'd get ghost readings from keys (as voltage did not have time to drop to LOW ranger before sensing it - saw that using an oscilloscope), so nor jitter or latency will be a problem from what I can tell! Brilliant.

I've used most of the easy accesible I/O now from the 3.6 and there's wires everywhere...

I'll share some pics+the code later.

I'm now adding in 4(!) pedal jacks. Not surprisingly, Roland and Yamaha wire their continous pedals differently and I of course have both types, so jacks will have to be specific for each pedal I guess (easier than soldering external adaptors, heh)... Modwheel and pitchbend if I can cram it into the case, on top of that.

Bonus goals is to figure out how to do polyphonic aftertouch inside that Fatar keybed, seems (FSR is one option) but I always find the mechanical aspects the hardest; how to mount it in this case.

Failing that, I suppose I could go for the 2nd price with a heap of rotary encoders + rgb leds and other silliness.

Or, since there's a DAC - a (simple) onboard polyphonic digital synth perhaps...
 
Last edited:
I'm now adding in 4(!) pedal jacks. Not surprisingly, Roland and Yamaha wire their continous pedals differently and I of course have both types, so jacks will have to be specific for each pedal I guess (easier than soldering external adaptors, heh)...
A double-pole/double-throw switch can flip the hot/wiper leads so the same jack can work with either.
 
Last edited:
I may incorporate that once i settle on the features. The lid is closed literally and 4 continous pedlas, 2 wheel and 88 keys wired up. Added some sillyness for fuzzying the pitch bend signal as well as adding "droop", like pitch reference is dropping for each simultaneous voice. Turned out rather cool.

I have an issue tho that sometimes note-ons are sometimes sent duplicate. (identical from what i can tell). Symptom is stuck notes on certain synths. I do not think there is a problem with my code (but may well be, this is late night coding shifts with minimal testing) but something going wrong on the usb side of things. I am using the usbMidi library for convenience.

I think I will have to get some better toolong to debug, and/or try and provoke the dupe message behaviour.
 
Hi Ulph,
Nice project. I am also new to this kind of stuff and have the exact same project ongoing, with the small but significant difference that I am using a fatar 37-keybed, not 88.
How did you finally solve your pull-up/ pull down problem ? I use a teensy++ 2.0 and did solder10 resistors in ;-)
Still I have some signal flow problem that I get no signal from the keys, but suppose I did some wrong wiring (??).
Would be great to see your code, I am currently breaking my head about efficiency & effectiveness to read velocity ...
Christian from Germany
 
Last edited:
Hi Ulph,
Nice project. I am also new to this kind of stuff and have the exact same project ongoing, with the small but significant difference that I am using a fatar 37-keybed, not 88.
How did you finally solve your pull-up/ pull down problem ? I use a teensy++ 2.0 and did solder10 resistors in ;-)
Still I have some signal flow problem that I get no signal from the keys, but suppose I did some wrong wiring (??).
Would be great to see your code, I am currently breaking my head about efficiency & effectiveness to read velocity ...
Christian from Germany

Hi!

I plan to publish the source code and a corresponding readme..

Well, how useful it is for you depends on the wiring of the keybed.

Just as a fyi, I believe doepfer sells ready made diy kits for various fatar keybeds. Not as fun of course :)
 
I completely forgot about this.

I haven't touched the project in a long while (I'm happy with the feature set) and while the code is still rather hacky and there are a few bugs on hysteresis for the continous pedals, I choose to open source this now anyway...

https://bitbucket.org/ulph/fatar88lux/
 
Status
Not open for further replies.
Back
Top