how do midi keyboard keys work?...and how to replicate a keys function.

Started by deadastronaut, July 06, 2010, 08:10:05 AM

Previous topic - Next topic

Gurner

Quote from: deadastronaut on July 08, 2010, 07:05:21 AM
cheers gurner..

would i be able to trigger more than one too?...using that method....

be nice to have a few triggers if  attempting to go down that path.....

dont suppose you have schematic or dare i say layout for that idea? as ive never dealt with pic's....... :icon_redface:

sounds like a greeat idea though...and simple-ish...
thanks man..rob.

You can have as many triggers as the PIC has pins/AD channels - lots of PICS have in excess of 8 AtoD pins - if you use a language like picbasic, then PICs are incredibly easy to learn how to make sing & dance ....most of the hard (low level) work is done for you, for example one simple command like


ADCIN 8,Signal_In

will convert whatever voltage is present on the nominated input pin to a digital level reading (the 8 is just telling the PIC to use a particular AtoD channel/pin). therefore you whack your trigger hard, you might get say a level of 240, whack it softly a level of 40 etc. You then just divide 'signal_in' by two, for example

Signal_In = Signal_In/2

...this is necessary to get a max velocity of 127 (ie midi standard) & then integrate this 'level' into a midi signal elocity (again, constructed by the PIC - a lot of PICS have a Usart for serial comms)

I don't have a schematic, but it'd be as simple (In part -nicked/modified from Google images!) as this...

[

just slap a preamp (eg one jfet) in front of it.

deadastronaut

cheers gurner

nice that dont look to difficult at all....looks like a cool project...im not au fait with programming though....

thinking about it, if im going to go this far down this route for one trigger it

would be nice to have a full 10-12 piece piezo drum kit  if that is possible then..(being greedy lol..).

that would be great if it could....but i bet its more complicated than this im guessing..

i like the idea of it...looks relatively simple-ish...#

..cheers.



hmmmmmm.....rob..
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

Quote from: deadastronaut on July 08, 2010, 08:30:51 AM

i'll check out that pic too...cheers.

hmmmmmm.....rob..

I wasn't advocating that PIC - that was the first hackable image I found with google images!

a 10-12 trigger drum kit would be difficult, because with PICs, the AtoD is just really one multiplexed AtoD converter - you need to have a few milliseconds pause between successive AtoD samples......with something as 'time dependent' as a drum kit, this would not be a good way to go about it!

deadastronaut

Quote from: Gurner on July 08, 2010, 08:38:05 AM
Quote from: deadastronaut on July 08, 2010, 08:30:51 AM

i'll check out that pic too...cheers.

hmmmmmm.....rob..

I wasn't advocating that PIC - that was the first hackable image I found with google images!

a 10-12 trigger drum kit would be difficult, because with PICs, the AtoD is just really one multiplexed AtoD converter - you need to have a few milliseconds pause between successive AtoD samples......with something as 'time dependent' as a drum kit, this would not be a good way to go about it!

oh i see..im just being greedy then lol...

so that design will trigger only one thing then?...which is still good..and usable...


would you know the answer to my original question how a midi key works..

it hits a little black round grid...and that grid is what i need to know how that works..pressure/resistance etc...

and replicate it somehow.....rob.

i read somewherethat they might be' force sensitive resistors'
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

Quote from: deadastronaut on July 08, 2010, 08:51:38 AM

oh i see..im just being greedy then lol...

so that design will trigger only one thing then?...which is still good..and usable...


would you know the answer to my original question how a midi key works..

it hits a little black round grid...and that grid is what i need to know how that works..pressure/resistance etc...

and replicate it somehow.....rob.

i read somewherethat they might be' force sensitive resistors'

Someone earlier mentioned how they *normally* work - which utilizes two switches.....when the first switch is activated (key pressed) start a timer running, when the second switch is activated (key fully depressed), stop the timer - calculate the time between the two - this is your velocity info.

But that's excessive for your needs & therefore I'm suggesting going all basic - buy something like a piezo mic, preamp it - this will give you a voltage level when it is hit - feed that analogue voltage 'level' into a PIC AtoD pin & establish the level digitally - no fancy timings involved.

the design I'm proposing allows many triggers, all I'm saying is that it wouldn't be good for extremely time sensitive cozy powell-esque tom tom paradiddles ...this being due to the pause necessary when moving between the input pins for successive tigger input samples, for example (& simplistically)


start Pin 1 'sample level' (ie AtoD)
pause 10 milliseconds
now pin 2 'sample level'
pause 10 milliseconds
now pin3 'sample incoming level'

the more triggers you have the longer it will be between getting around them all and back to pin 1 again.

deadastronaut

right i think ive got what your saying..so there will always be a delay if being greedy lol...

yours is a great idea..thanks i'll look into that further..

however.

on the midi key function again..if the key hitting the grid circuit thingy 'fsr' is putting out a tiny voltage
when hit..couldnt i just measure that voltage soft/hard etc...then replicate with a piezo and a resistor say, being hit as they also put
out voltage when hit?.or is this too simple..sorry im being dumb again lol.... :icon_redface:..just curious....
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

Gurner

A short saunter over to Google shows this link which pretty much has everything you need for the sensor/trigger aspect (I forgot about the diode - also, apparently you don't even need a preamp as the piezo output can exceed 5V ...so you actually need to attenuate it, though I guess this comes down to how hard you whack your piezo, how big it is, what you whack it with etc)...

http://petervieth.com/projects/midi-drum-pad/

deadastronaut

excellent...funny i was just hitting a piezo..it was putting out 1.8v..its a tiny one..just to play with...

thats more than i thought it would.....mad...now to pull my midi keyboard apart...i need to anyway i dropped an led in

it..and it rattles around. :icon_rolleyes:.good excuse to have a look...cheers gurner..for your patience with a dumbass lol.... :icon_redface:

i'll whack a key and measure it hard/soft....and then post results...
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

deadastronaut

bumpy...bumpy....(i know its old, but i need to get this going )
especially now i  have ezdrummer pro.... :icon_twisted:

anyone else got any ideas on how a midi key works...and how to replicate it?...
how to replicate the part the key hits?....

there is absolutely no info around on this that i can find....... :icon_neutral:
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

slacker

Going from this

Quote from: deadastronaut on July 06, 2010, 08:49:20 AM
and how does that work?....is it 2 grids inner and outer...?..how does it work with a  piece of rubber hitting it..?

The piece of rubber is impregnated with carbon so it conducts electricity, when you press the key it connects the 2 grids together completing a circuit. I don't think it's pressure sensitive, it's just a switch.
The velocity sensitivity is normally done how Ben explained using 2 switches per key.

deadastronaut

right.gotcha... but how can i replicate that grid...what is it? whats it made of?..

it must be more than just 2 switches surely?...or is it..?
https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//

slacker

It's probably just acting like a SPST switch.
Easy to find out though just measure the voltage or resistance across it when you hit the key and see if it's different depending on how hard you hit it.

Loads of things like computer keyboards, remote controls, mobile phones etc have this sort of switching in them.

deadastronaut

yeah ive pulled many things apart that have them in...

yep, i think your right, ill have to measure the hit voltage/resistance....

mmm...may have to buy a crappy midi keyboard to mess with on this..
or butcher mine on the top end key....be really cool if i can get this to work properly..
with piezos (ideally)giving out the same voltage etc... maybe....hmmm...a 61 piece drum kit... :icon_mrgreen:
with 61 rca plug sockets in my keyboard..theres plenty of room in it.ha ha...



https://www.youtube.com/user/100roberthenry
https://deadastronaut.wixsite.com/effects

chasm reverb/tremshifter/faze filter/abductor II delay/timestream reverb/dreamtime delay/skinwalker hi gain dist/black triangle OD/ nano drums/space patrol fuzz//