spiral0ut83
YaBB Newbies
Offline
Posts: 7
ProMidi MidiKeyboard Template Project
Jan 19th , 2009, 7:45am
Download Link http://csam.montclair.edu/~lieba/MidiKeyboardProject.zip This is an implementation of proMidi that will build a virtual midi keyboard based on a text definition file. This requires a little bit of setup for it to work. You will need: 1. About 15 minutes of time (to setup) 2. A midi keyboard of some model plugged in etc.. 3. Setup the gfx path variable relative to your sketch (KEYBOARD_GFX_PATH) 4. Make sure the keyboard config files are located in: sketchpath/data/source (more about these later) 5. A general familiarity of proMidi (import it into your sketch project) Keyboard Config Files: These are written in a definition language that is used to turn your keyboard into a collection of MidiPart instances. I have included a config file that matches up to the Oxygen-49 keyboard. It was written in such a way, that with a little work, you should be able to set up a new config file for any other keyboard as well. To do this, save out a new keyboard config file with just the info panel line to start: info,,100,25 The info panel will provide you with a feed of what midi values are firing off when you press keys or move a controller. You can use this to figure out how to write a new config file for your specific model of keyboard. the source code comments elaborate further on this config file format. Its pretty simple: keys are represented in a range, knobs/slider/wheels are added in semicolon delimited lists, and buttons are added in a midiVal|graphicIndex; style delimited list. Then just follow each block of controllers/keys by specifying the x,y relative to the keyboard and that's it. So basically, have the text file open, press keys, figure out the range of keys, figure out your controller values, and input them in the correct format in your new config file. Save out your file, and run the sketch pointing to this file. Tweak your x and y's until the layout looks like your keyboard. ---- I hope this is useful to someone else. I am writing a project where I want the user to be able to configure a midi control group where certain keys and controllers are configured to carry out various roles. I want them to visually see how each group is configured without needing to know midi pitch or controller values manually (like some other softwares where you tell it to link such and such effect to controller XX -- lame). This gets this process started by showing the curently selected key or controller with a glowing tint.