Custom Control Surface: MCU NoteOn NoteOff behavior


I’m actually working on a custom Control Surface.
My developpement board is a Teensy 4.0, and I use this great library:

The Control surface is well recognized as a Mackie Control device type.

First question here, when I disconnect and reconnect the board, the device is not recognized.
A workaround is to switch the Device Type to Mackie Control Universal Pro for example, and reselect Mackie Control and my device can be seen in Surface sends/receives via menu.

In the librairy I can use the NoteButton class witch:

A class of MIDIOutputElements that read the input of a momentary push button or switch, and send out MIDI Note events.
A Note On event is sent when the button is pressed, and a Note Off event is sent when the button is released."

I use it for example to Enable/Disable Mute on a track (here an example with a note)

// Instantiate a NoteButton object
NoteButton mute = {
5,               // Push button on pin 5
{MCU::MUTE_1 },  // Mute

So when I push the button, MUTE is enabled on the track (NodeOn), but when I release the button, MUTE is disabled (NoteOff).

MIDI Tracer:

I tested the code with an other DAW, and it react only on the NoteOn and seems to ignore the NoteOff.

There is an other class on the library called NoteButtonLatched, which works just fine, because it doesn’t send a NoteOff.

A class of MIDIOutputElements that read the input of a momentary push button or toggle switch , and send out MIDI Note events.
It latches the input, so press once to enable, press again to disable (toggle).

2nd question:

Do I have to deal with commands that doesn’t send a NoteOff, is that the right behavior from Ardour?

Let me know if you need extras informations.

Many thanks for your help
Have a great day.

I haven’t played with this for a while, so I am not sure. How is the controller connected to the ardour box? Does the port type show up as “Physical” (If they are jack ports then jack_lsp -p will show this)

If you are using this as an MCP cxontroller then all note on off are seen as one event and most things will toggle. Generic midi is mostly the same but has a parameter that can change it. The mackie control is based on the logic control and is the same for most things. the place to find that is: midibox LC the link there that has the “Old Manual” shows what should work in ch13. Start on page 109 as the first bit about handshake does not really apply (the mackie control is different and ardour can work without hand shake)

Hi @lenovens,

Thanks for your time.

The controller is USB connected. But I don’t use Jack.
I’m on Mac and I use CoreAudio as Audio System, and MIDI System. In Linux I usually use Jack but don’t know if is it better too on Mac…

For the 2nd point, I have to dig more but if I understand well, I have to use a NoteButtonLatched.

Many thanks!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.