New to MTP - can I translate MIDI on/off sequences into latch messages?

I have heard of MTP for years, but have just installed it for the first time about an hour ago. I’m hoping someone can point me in the right direction to get started building a translator.

I have a Midi Fighter 64, which is just 64 MIDI buttons, no velocity sensitivity. Pressing a button sends 92 pp 74 and releasing a button sends 82 pp 7f. Simple enough.

I want to convert the on/off sequence into a latch, so the first on/off sends an on message, and the second on/off sequence sends an off message.

I have made the tiniest bit of progress :slight_smile: I’ve managed to create a translator that recognizes an on/off sequence and translates it to an on message:

// incoming
92 pp 7F
82 pp 7F

// outgoing
92 pp 7F

So the question is, how do I send an off message for the second sequence? Critically, I need to track latch state for each button via the second byte. So I want to produce something like this (I hope it makes sense):

92 25 7F 82 25 7F -> 92 25 7F // C#2 ON
92 26 7F 82 26 7F -> 92 26 7F // D2 ON
92 25 7F 82 25 7F -> 82 25 7F // C#2 OFF

So that’s the big one I’d like to figure out. I would really appreciate guidance here.

Hi and welcome to the Bome Forum!

First of all, did you know that the MIDI Fighter Twister has a latch mode (Toggle), built in. You can change the behavior of your press encoders using the MIDI Fighter Utility.
It sounds like you have them set for momentary (Note Hold).

With that said, if you want to do it instead with Bome MIDI Translator, you can toggle the value of a global variable with note on, thereby turning your momentary into a toggle. Each encoder push would need it’s on encoder variable or a different bit of the same variable.
The below example toggles bit 0 of global variable ga to produce your desired results for note 37 (0x25).

You can expand this by either adding translators for each note or using rules, to manipulate the note number and which bit of ga you toggle (if you want to use only 1 global variable for up to 32 notes).

In the tips and tricks of this forum, there is a posting that discusses how bit manipulation works.
Toggle-Note-37-example-2020-12-12.bmtp (1.0 KB)

Steve Caldwell
Bome Customer Care

Also available for paid consulting services:

Thank you for the reply! I am using the Midi Fighter 64, not the twister. The twister doesn’t have latch mode, so I have to get it another way.

I’ll take a look at the forum post and your example, thank you.

I think there is an example on the forum where we control 64 LED’s of the Akai APC MINI with 2 global variables using bit mapping. You might want to check there. I’m not sure how the MF64 notes are bitmapped so there may need to be some adjustments. The APC MINI is note 0-63 so bit mapping is pretty simple. One global variable to control bits 0-31 and another to control bits 32-63

Steve Caldwell
Bome Customer Care

Also available for paid consulting services: