MIDI Keyboard w/buttons & pot's.

I want to make a midi keyboard from scrap synth parts using my Arduino Duemilanove.
It should support velocity (how fast the keys are pressed) and in addition some potentiometers and buttons.
I want to use it as a studio midi-only keyboard to play my virtual instruments in Logic Pro 9.

I haven't looked too much into the interfacing part on midi yet,
so what I'm wondering is if there is a limitation to how many buttons/pot's the arduino can handle without compromising on signal.

Have i overlooked any previous projects like this?
I have seen similar, but not with keys/buttons/pots at the same time.

I am also worried if the coding will be more advanced by adding more variables.

Thank you for your time.

I am also worried if the coding will be more advanced by adding more variables.

Yes it will, the more you have to do the more involved the coding will be.

is if there is a limitation to how many buttons/pot's the arduino can handle without compromising on signal.

What do you mean by compromise? The more stuff you have to do the longer the latency will be. There is no sudden cut off point it just gets longer the more the code has to do.

It should support velocity

This is the trickiest part of the design. To do this you need some special change over keys that break before make. You then have to measure the time between a key breaking the normally closed contact and connecting to the normally open contact. That time can then be converted into a MIDI velocity. This is sometimes done by an extra chip but you will need special keys designed to do just this job. I would source those before you worry about how many knobs you can have.

What do you mean by compromise?

I am thinking about latency yes. If there will be so much that i will notice it while playing live is what i am after.
Of course this may be hard for you to guess, but i'm sure you are more familiar with the arduino's processing power than me.

I would source those before you worry about how many knobs you can have.

I will be using keys with velocity sensors, but i don't know if they already calculate the velocity or
if that happens in the synth PCB (which i will not be using)

Concerning the number of knobs, i thought that the midi cc string is the same size wether or not im using all of the control channels.
Is this true?

Thank you very much.

Concerning the number of knobs, i thought that the midi cc string is the same size wether or not im using all of the control channels.
Is this true?

Yes the CC string is the same but it will take longer and more code to go round and check the value of 30 knobs than it would to check one.

If there will be so much that i will notice it while playing live is what i am after.

Well that is down to you some people can detect shorter latency than others, some say that no MIDI system is good enough because of the latency. Also the latency depends on things other than the MDI controller like your software and tone generator.

but i don't know if they already calculate the velocity

They don't, it will be down to the way you wire it up. In that case you will need two arduino inputs for each key, how many keys do you want?

how many keys do you want?

I'm thinking at least three octaves, so I'm guessing that will be a problem.

So 12 keys per octave, 3 octaves, 2 inputs per key = 72 arduino inputs.
Yes that is a problem.
While you can use port expanders to get more inputs you are looking at a major project. Especially as you are wanting to time the very small delay associated with a velocity on a key.

Time I think to scale back your ambitions to match your skill level.

Maybe try thinking outside the box? A creative and inexpensive way to accomplish this project?

Anything thing would be getting a very cheap keyboard that has MIDI OUT and just hack the thing away. :wink:

What if you used a mini piezo for each key? Then you use multiple analog multiplexers to check for values. Not sure if this would work for more than 3 octaves = 3 * 12 = 36 keys. But that doesn't look bad, I think it would work. I have done 16 analog inputs with a single Arduino while doing other things and there was no noticeable latency, so I don't see why there would be with a bit over double that. 8)

Wk

Check this out:

http://www.dipmicro.com/store/7BB-12-9

I got a few of those, and they are very tiny, but I don't know what sort of abuse they would take, as I broke one trying to solder some pins to it, its very fragile. But then if you do the mechanical part just right, it wouldn't be a problem. There is still cross-talk problems, but nothing software couldn't handle, I think.

But again, I'm NUTS, most of the things I try doesn't work, so ignore me if you want... :blush:

Wk