Making MIDI CC's editable on a Teensy 2 based project

Status
Not open for further replies.

oddson

Well-known member
I've made a very simple three-button, two-pot MIDI project using Teensyduino and Teensy 2 (actually it supports foot pedals and switches through 1/4 inch plugs).

I'd like to make a simple Windows editor that would allow me to select which CC each of the five pins is translated to.

I know there is adequate and accessible EEPROM memory (and the 100K reuse 'limit' is not a major issue for such an occasional usage) and I figure I'll be able to sort out the read and write parts once I figure out how to talk to my sketch (or write directly to the EEPROM).

I'm familiar with SynthMaker/FlowStone (which has MIDI tools available and now has Ruby support in FlowStone) so I figured I could make the editor in that very easily.

I assumed having it transmit small blocks of SysEx would be the simplest way of triggering the writes and transmitting the few bytes of data I would need but FlowStone has a bunch of IO tools too so I thought I asked if anyone has a better idea or any advice before I stumble through trial and (lots of) error.

Any assistance or warnings of potential pitfalls will be greatly appreciated.
 
I'm kinda sad don't know the tools you are talking about, but on the Teensy side you might want to check out a similar project to bypass some of that trial and terror. Also: perhaps peruse the program he mentions that inspired him, if you can find it.
http://echolevel.tumblr.com/post/49737964614/knobber-usb-midi-controller-by-echolevel

He hijacks a very-unlikely device maker's ID (Fairlight), which is going to be OK IMO 99.999% of the time. Though he is changing the values very "close to the metal" (hex editing the .syx file!), there's no reason you couldn't just expand the Teensy code to 5 pots and craft / send the tiny Sysex file another way using your PC tools.
 
Nice! I'll just keep my Fairlight in the closet with my Pong game and all will be well.

The PC side will be no probs but I would have stuggled with some of the MIDI read stuff.

Thanks Doc:)
 
If you can get your software to send MIDI Sysex, that's probably the cleanest solution. Or at least it's as good as the ease (or difficulty) of whatever type of user interface that software has.

Another alternative might be using the Arduino Serial Monitor. You can send messages from the serial monitor, and check for arrival with Serial.available() and grab the data with Serial.read(). The downside is of course needing to run the Arduino IDE to make changes. But if your music software turns out to be too limited in what it can send, or too difficult to configure, or just more trouble than it's worth, at least this other way exists.

Or you could add hardware like knobs, buttons, a rotary encoder, even an LCD for adjusting parameters without the PC at all.
 
Thanks Paul...

I think I'll just do SysEx for this iteration. FlowStone (formerly SynthMaker) is a graphic programing environment that is really quick and easy for UI and MIDI tasks. So it should be no problem to come up with a very simple-to-use UI that sends a few btyes of SysEx.

I have an LCD shield kicking around that I plan on playing with to see about a hardware approach at some later date.

The serial method seems too much trouble. But it's interesting and I'll keep that in mind if I need to talk to a Teensy without MIDI.

There is one line of code from the project reference above that has me puzzled:
byte * sysbytes = usbMIDI.getSysExArray();
I get what it does... in this case it fills an array 'sysbytes' with eight values 0-7
But I don't know why it works. Why '*'?
How is it that sysbytes didn't have to be decalred?
I've seen some on-line documentation that it's just part of how the MIDI library works but it seems strange to me.:confused:
 
Last edited:
I think you're correct but I guess what threw me was the space.
I would expect to see "byte *sysbytes = ..."
 
Last edited:
Status
Not open for further replies.
Back
Top