Show Posts
Pages: [1]
1  Using Arduino / Audio / Re: MIDI Keyboard Encoder - Arduino Piano/Keyboard (question) on: August 10, 2012, 11:11:07 am
Ah, indeed; rather a large oversight on my part. Thank you for pointing this out mstanley and of course, thanks for writing such a useful library smiley
2  Using Arduino / Audio / Re: MIDI Keyboard Encoder - Arduino Piano/Keyboard (question) on: August 05, 2012, 01:48:08 pm
If you *really* want all the details about scanning key matrices:
http://www.openmusiclabs.com/learning/digital/input-matrix-scanning/

(Convinced me pretty thoroughly that Arduino was the way to go, but it brings up some interesting stuff nonetheless...)
3  Using Arduino / Audio / Re: MIDI Library Reading Pitch Bend (Not Send) on: August 05, 2012, 12:57:56 am
Pointer; you probably want to multiply your frequencies by the bend amount, not simply add, otherwise you'll end up with varying bend ratios for different notes. (The relationship between pitch and frequency is geometric, e.g. an octave is a doubling / halving)
4  Using Arduino / Audio / Re: MIDI Keyboard Encoder - Arduino Piano/Keyboard (question) on: August 05, 2012, 12:53:04 am
This is precisely what the Keypad library does smiley - take a look at the tutorial. The wiring diagram you posted is a keyboard matrix, which significantly reduces the number of required IO pins. To achieve step 3, you need matrix scanning code (which is what the Keypad library is). As a bonus, the way it is written eliminates the need for the diodes in your wiring diagram, hence the simpler diagram: http://arduino.cc/playground/uploads/Main/keypad_pin_diagram.png Of course, instead of a keypad, you have a musical keyboard, but the principle is exactly the same, just with all the keys laid out in a single line instead of rows. There is plenty of info about scanning keyboard matrices on the web, but I suspect it'll just show you that using pre-built Arduino libraries will make life much easier smiley

Step 4 will be your own code to define which midi signals are sent out for which keys.

Step 5 MIDI signals themselves are dealt with by the MIDI library and whichever USB MIDI solution you choose to use. (Suggest you get it working on normal MIDI first, before getting caught up in USB MIDI stuff...)
5  Using Arduino / Audio / Re: MIDI Keyboard Encoder - Arduino Piano/Keyboard (question) on: August 03, 2012, 03:36:36 am
I'm actually just about to start a similar project to convert an old organ console into a MIDI controller for my computer. Magician is right; you have two problems to tackle here: the (hardware) controller and the synthesis. Disclaimer: I'm also a complete newbie to Arduino, but I've done a fair bit of programming and I'm currently studying audio engineering.

Outputting MIDI via USB on the Arduino itself seems perfectly plausible, and also more sensible than wasting serial pins when you're already gifted with USB output smiley That SpikenzieLabs link looks like it could already have it sorted for you...

There is a library that reads switch matrices here: http://arduino.cc/playground/Code/Keypad and it comes with its own tutorial: http://arduino.cc/playground/Main/KeypadTutorial#Notes. It may need a little modification to handle large matrices (I need to read in 200 odd switch inputs!) but it looks like a very good start. The Arduino MIDI libraries look like they can handle all the MIDI output needs you'd ever want, so all you'd need to write is some code to map the output returned by the Keypad library into input for the MIDI library. The Keypad library has both key press and key release handling which you'd use to send your note-on and note-off messages. Handily, there's a built in event listener, which you'd probably want to use to call your own code.

Let me know how you get on; if I come up with anything handy, I'll be sure to stick it up on the Playground.
Pages: [1]