midi transport messages with Teensy LC

Status
Not open for further replies.
Hello,

I'm new in the microcontroller world.
I would like to build a midi foot controller to START/STOP my DAW while I'm playing guitar.
Actually, I sennd a CC message and I use a vst to translate this message in a transport message, through a midi learn process.

It works, but I'm not satisfied with it. I really would like to use a realtime message. I thought I could use this one... usbMIDI.sendRealTime(usbMIDI.Start);
But apparently I do not use it properly since my DAW (actually REAPER, but I also want to use it in Cubase Elements 10) does not react.

Any help would be welcome.

Merry Christmas and Happy New Year !
 
Is Reaper supposed to react to that message? Do you have any other gear sending the message? I mean, the problem could be something on the Teensy side... but if your DAW doesn't respond the way you want to that message, no amount of work on the Teensy side is going to change that reality!
 
Hello Paul ,
I'm pretty sure that both Reaper and Cubase can receive that message since my master keyboard (nektar gx61) can send this message with succes. The fact is that nektar generated different files for each DAW to have a perfect integration. So, I don't know which kind of message I must send, and how.
I've been able to use faders and buttons with teensy lc, but apparently, start/stop messages are differents... so that's why I thought that may not use the comand inthe good way.
Anyway, thanks for your help !
 
Any chance you can run something like MIDI-OX that shows the actual MIDI messages your PC is receiving?

Maybe there's something wrong with Teensy's code for those messages? Or maybe there's something special about the messages themselves. A utility that captures the actual messages would really help shine some light on this.

Please remember I'm not a musician or DJ, so I don't really use MIDI. If there's something wrong in the code, I can probably fix it... but I'm going to need your help on a clear test case. And if the code is fine but there's something special needed on the messages, hopefully viewing the actual data will make that difference clear.
 
Thanks for your help PAul.
I use Midi-ox to check my messages.
I first start to send CC messages (ex : CC 07, value 115 on channel 02) and midi-ox see it and REAPER receive it without any problem.
When trying to send the START message, Midi-ox doesn't display anithing but I can see that REAPER receive something... but what ? That's the problem.
here is my code :

// include the Bounce library for 'de-bouncing' switches -- removing electrical chatter as contacts settle
#include <Bounce.h>
//usbMIDI.h library is added automatically when code is compiled as a MIDI device


const int channel = 1;

Bounce button1 = Bounce(1, 5); // 5 = 5 ms debounce time
// which is appropriate for good
// quality mechanical pushbuttons

void setup() {
pinMode(1, INPUT_PULLUP);
}

void loop() {
button1.update();

// Note On messages when button is pressed
if (button1.fallingEdge()) {
usbMIDI.sendRealTime(usbMIDI.Start); // Send start message to DAW
}

// Note Off messages when each button is released
if (button1.risingEdge()) {
}

// MIDI Controllers should discard incoming MIDI messages.
while (usbMIDI.read()) {
}
}
 
Ok. So apparently, I just have to send different midi messages then go through a remote control definition with a midi learn process. Why not.....
That's not really satisfying to me but if it works, that's the most important....
Thanks!
Happy New Year !
 
Ok. So apparently, I just have to send different midi messages then go through a remote control definition with a midi learn process. Why not.....
That's not really satisfying to me but if it works, that's the most important....
Thanks!
Happy New Year !
I don't own Cubase and didn't read all of the pages on remote control.

Not clear what you're saying in this post.... what isn't satisfying?
 
Hello Oddson,
I've start working on a new computer, re-type my code and, I don't know why, now, MIDI-OX displays start and stop messages... Cubase does not react, but I think I have to declare my Teensy LC as a controler.

ATTACH=CONFIG]15447[/ATTACH]

The idea is to be able to launch a backtrack when needed while I'm playing guitar on stage.

Happy New Year ![
 

Attachments

  • MIDI-OX.PNG
    MIDI-OX.PNG
    20.5 KB · Views: 80
Last edited:
Hello,

I'm new in the microcontroller world.
I would like to build a midi foot controller to START/STOP my DAW while I'm playing guitar.
Actually, I sennd a CC message and I use a vst to translate this message in a transport message, through a midi learn process.

It works, but I'm not satisfied with it. I really would like to use a realtime message. I thought I could use this one... usbMIDI.sendRealTime(usbMIDI.Start);
But apparently I do not use it properly since my DAW (actually REAPER, but I also want to use it in Cubase Elements 10) does not react.

Any help would be welcome.

Merry Christmas and Happy New Year !

usbMIDI.Start will not accomplish what you are looking to do, there is a standard that most DAWs as well as keyboards use for transport control called MIDI Machine Control, I know these work in Reaper and Cubase (Pro only).

MIDI Machine Control is sent through Universal Real Time System Exclusive messages and not System Real Time Messages.

Here's a short article about it: http://midi.teragonaudio.com/tech/mmc.htm

Long story short:
  • This is start
    Code:
    F0 7F 7F 06 02 F7
  • This is stop
    Code:
    F0 7F 7F 06 01 F7
 
Hello !
I found a solution with the help of Brent Edstrom (the author of "ARDUINO for Musicians, a complete guide to Arduino and Teensy Microcontrollers").
The easiest way to implement the play function is to add this single peace of code like the following one:

Code:
void PlayButtonFunction()
{
  byte PlayCommandArray [6] = {0xF0, 0x7F, 0x7F, 0x06, 0x02, 0xF7}; 
  usbMIDI.sendSysEx(6, PlayCommandArray, true); //Send an array of 6 bytes representing the play command
}

for Stop function, change the sixth byte value by 0x01. For pause, use 0x09.
 
Status
Not open for further replies.
Back
Top