Control Surface with Teensy for Beginners

Status
Not open for further replies.

newman

Member
Hi -

I'm new to Teensy, but I have some familiarity with programming and soldering. I apologize if I'm posting in the wrong thread - this is a little bit of a beginner question, a little bit of an audio question, and a little bit of a "guidance" question.

I'd like to make a stand-in for a "Control Surface" - they cost too much, it doesn't make sense to me why.
Searching around on the forum, I've noticed two things about this subject - first, posters tended to feel strongly about also producing the motorized faders and secondly, I'm finding myself a little uncertain about the protocol (do control surfaces just use MIDI?)

Considering these damn things are $500, I'm wondering what the best route to my DAW's sliders might be. My thinking is that I don't really need the motors, but it seems like it might be worthwhile to use a resolution higher than MIDI messaging, if left to my own human-interface devices. There are some major questions about

Can anyone help get me started down this path? Thank you.
 
Well, after looking into this subject more - it seems that the most popular approach is to use the Mackie HUI, which I believe is also called "Mackie Control Universal" - and that this is a MIDI-based protocol.
There are a bunch of specs available here: https://forum.cockos.com/showthread.php?t=101328

Having never used Teensy before, though, I am still hoping there might be some example code that implements this.

Thanks.
 
Teensy does have a MIDI library. You would need to make a board to hold your Teensy and add midi output circuitry (it's not complicated). Make sure you pick a Teensy that will have enough analog inputs for your pots or sliders. the pins label Ax on Teensy pinouts are Analog capable pins. E.g. A0, A1, A2, etc.
 
I am using a Teensy 4.1 - and I have effectively managed to pass MIDI from it to other applications on my computer, via the USB. I am wondering, though, if it's possible to have it recognized as a Control Device in a DAW, since it seems to be a slightly different system of address?
 
Is it the proprietary protocol for a specific product you're asking for?

I'm not specifically familiar with how those devices are recognised but there are a few possibles, all of them an interface+driver, and a protocol over that interface.

If the control surfaces are are using a MIDI interface, then its technically possible for you to have a Teensy act as one, if you know exactly what the protocol is. ie. what the all the commands are, their format, etc.

If they are using some other USB Class compliant profile (serial, etc.) then it's really the same thing, just using a different interface, but you still need to know the product's protocol.

If the control surface is relying on the host using some custom USB driver, then you would have to re-implement on the teensy the higher level protocol, as well as the low level USB level stuff, but this case is less likely.

If you know EXACTLY what protocol you need, and cant' figure out how to get the Teensy to drive it, people here will be able to help you. But if you do not know what protocol you need or how the control surfaces you're trying to mimic operate, you might need to go find out this information on your own first.

You might have better luck getting those product-specific details on forums dedicated to those products, then get help integrating it from people here.
 
Last edited:
You might be interested in the Control Surface library for Arduino and Teensy that I maintain. It comes with many building blocks for creating MIDI controllers and control surfaces and has support for the Mackie Control Universal protocol (MCU).

Control surfaces usually use the MIDI protocol. Many offer some level of compatibility with the MCU, as do many DAWs. This is not really an advantage, because the MCU protocol is very limited, it only really supports the hardware and configuration of the original Mackie control surfaces.
Other than that, I'm not aware of any “standard” control surface protocol. Control surface manufacturers (and DAW developers) seem to make up specific protocols for specific purposes. You can often find the MIDI implementation in the manual or online.

MIDI controllers with just buttons and potentiometers are the easiest, since most DAWs have some kind of “MIDI learn” mode where you can just map any control.
If you want feedback from the DAW (e.g. to have “mute” or “solo” LEDs on your control surface, or a display with level meters, track names or time code), that's more difficult, because most DAWs don't send any data back to the control surface when using the MIDI learn mode.
If you select a specific commercial control surface in the DAW's settings, you will get feedback, but you have to work within the restrictions of that particular control surface. E.g. when selecting a Mackie Control Universal, you cannot simply add more than 8 volume controls, because the MCU only has 8 (unless you're using extenders). Specific control surfaces are usually incompatible with the MIDI learn mode.

Some DAWs do allow you to write custom MIDI control surface scripts that define which MIDI messages map to which controls, and which events cause MIDI messages to be sent to the control surface. This is often the most useful and flexible approach, but not all DAWs support this and the documentation isn't always that good.

MIDI control change messages usually have a 7-bit resolution, which is not great. The MIDI spec defines 14-bit control change messages, but this is not supported by most DAWs. For higher resolution, you usually use pitch bend messages, these are 14-bit as well (you usually only use the 10 most significant bits), but there are only 16 channels in total.
MIDI USB has up to 16 virtual cables, so you can use 16×16 pitch bend controls in total. The downside is that these show up as 16 different MIDI devices.
If you're using your own custom MIDI script, you can do whatever you want, you can use 14-bit control change, use the key pressure commands, or even system exclusive with arbitrary resolution.

Pieter
 
@Pieter I have a MIDI controller project that I am working on that uses the Teensy MIDI library (forty seven effects).

Do I understand correctly that your control surface library has a wrapper for this library? My project is hardware serial-based and does not use usbMIDI.

I also want to incorporate a push button rotary encoder to have menu navigation for CC based controls and an i2c OLED that will provide visual feedback.

I am just now looking over the doxygen for the control surface library and it looks possible to implement all of these features, correct? Very excited to explore!
 
Do I understand correctly that your control surface library has a wrapper for this library? My project is hardware serial-based and does not use usbMIDI.
There is a wrapper, but you don't need it, Control Surface supports MIDI over hardware serial out of the box. For example:
Code:
HardwareSerialMIDI_Interface serialmidi = Serial1;
This line replaces the line “USBMIDI_Interface usbmidi;” that you'll find in most examples.
I also want to incorporate a push button rotary encoder to have menu navigation for CC based controls and an i2c OLED that will provide visual feedback.
The library has some classes to draw VU meters, rotary encoder positions, bank selectors etc. to an OLED display.
If you want a true menu with navigation etc. you'll have to write the logic yourself, that's not something that the library does for you (and it's not something I'm likely to add in the future, because I think it's better to leave this kind of customization to the user).
 
There is a wrapper, but you don't need it, Control Surface supports MIDI over hardware serial out of the box. For example:
Code:
HardwareSerialMIDI_Interface serialmidi = Serial1;
This line replaces the line “USBMIDI_Interface usbmidi;” that you'll find in most examples.

The library has some classes to draw VU meters, rotary encoder positions, bank selectors etc. to an OLED display.
If you want a true menu with navigation etc. you'll have to write the logic yourself, that's not something that the library does for you (and it's not something I'm likely to add in the future, because I think it's better to leave this kind of customization to the user).

Thank you for the clarification @Pieter , very much appreciated!
 
Status
Not open for further replies.
Back
Top