Led on/off toggle with toggle button

hello Steve I am trying to map an LED.
After persistence I got closer to my goal.

I have a button (9063) which switches me (ga=0 and ga=1)
SELECT MODE:
-hotcue mode
-PadFX mode

1: MIDI IN [MixTrack Pro]: 90 63 7F
2: RULE 0.0:1 assignment: (pp=ga) = 1
3: RULE 0.0:2 expression: (ga=ga+1) = 2
4: RULE 0.0:3 condition satisfied: if ga>1 then ga=0
5: RULE 0.0:3 assignment: (if ga>1 then ga=0) = 0
6: RULE 0.0:5 condition satisfied: if pp==1 then tl=0
7: RULE 0.0:5 assignment: (if pp==1 then tl=0) = 0
8: RULE 0.0:9 condition satisfied: if pp==1 then Log “HOTCUE MODE A”
9: 0.0:9 HOTCUE MODE A
10: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: 90 00 7F
11: MIDI IN [MixTrack Pro]: 90 63 00
12: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: 90 63 00

1: MIDI IN [MixTrack Pro]: 90 63 7F
2: RULE 0.0:1 assignment: (pp=ga) = 0
3: RULE 0.0:2 expression: (ga=ga+1) = 1
4: RULE 0.0:4 condition satisfied: if pp==0 then tl=16
5: RULE 0.0:4 assignment: (if pp==0 then tl=16) = 16
6: RULE 0.0:8 condition satisfied: if pp==0 then Log ‘PADFX MODE A’
7: 0.0:8 PADFX MODE A
8: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: 90 10 7F
9: MIDI IN [MixTrack Pro]: 90 63 00
10: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: 90 63 00

I use another button (9059) to have 2 functions

1: MIDI IN [MixTrack Pro]: 90 59 7F
2: RULE 1.0:1 condition satisfied: if ga==0 then tl=89
3: RULE 1.0:1 assignment: (if ga==0 then tl=89) = 89
4: RULE 1.0:4 condition satisfied: if ga==0 then Log ‘PAD HOTCUE 1’
5:1.0:4 PAD HOTCUE 1
6: 1.0:8 (not need here) for example
7: 1.0:11 (not need here) for example
8: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: 90 59 7F
9: MIDI IN [MixTrack Pro]: 90 59 00
10: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: 90 59 00

1: MIDI IN [MixTrack Pro]: 90 59 7F
2: RULE 1.0:2 condition satisfied: if ga==1 then tl=17
3: RULE 1.0:2 assignment: (if ga==1 then tl=17) = 17
4: RULE 1.0:5 condition satisfied: if ga==1 then Log ‘PADFX 1’
5: 1.0:5 PADFX 1
6: 1.0:8 (not need here) for example
7: 1.0:11 (not need here) for example
8: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: 90 11 7F
9: MIDI IN [MixTrack Pro]: 90 59 00
10: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: 90 59 00

In my Rekordbox software EVERYTHING works perfectly.
Button 9059 is ON if a Hotcue is ALREADY in place on my tracks if I remove it the LED becomes OFF.
I want to keep this functioning.

When I switch with my button (9063) it is imperative that LED 9059 (note 59 or 89) is OFF as I change mode I do not need this visual.
I press the toggle button again to return to the previous mode, the LED must be ON

Thank you in advance for your information
Sincerely

I’m not sure what you want

Maybe you can look at the below and tell me for each state (I’ve numbered them from 0-3), what MIDI message you want to send and where you want to send it. I’m not sure whether you are sending controller feedback from the application (for LED’s) or from Bome MIDI Translator Pro.

I’ve filled in where I think you are heading so far. I don’t see you ever sending Note-Off messages back to the controller. If your application is sending them, then we might need to send something different to the application so that it returns the right controller LED message.

image

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Sorry I sent you half the information.
It was late when I sent this message I forgot to send you the file
And in the meantime I retested and lost my configuration, no backup

OK, I’m still confused. What is 9010 and 9011 and 9000, are these notes that you want to send to the DAW?

You want to send ALL MIDI messages back to both the DAW and the controller? I’m really struggling here with what you want.

However I took a stab at what I think. I have separate translators for what I think you want to go back to your controller - Note 89 and what you want to go to the DAW ( Notes 16, 17 and 0) but I’m sure I probably don’t have it right.

I need to know

  1. When you press a button on your controller what do you want to send to your DAW in each state.

  2. If the DAW sends a MIDI, back do you want it also to trigger a state change? If so, what messages do you want are the incoming messages and what do you want going to your controller LEDs.

Here is my feeble stab at it but I’m sure I’m still not understanding what you want.

Hotcue-FX1-Manipulation.bmtp (2.0 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Attached are my tests.

I’ll look at your pre-settings right away.

yes it’s complicated to explain.
TOOGLE Led ON mode Hotcue Led Off mode PadFX.bmtp (2.1 KB)

Maybe this format will work better.

When pressing note 99 velocity 0, it will move me between state 0 and state 1.

Question: is there anything that the App sends that will also put us in state 2?

When moving from state 0 to state 1 I want to send note 0 velocity 127 to my application. I want to send note 89 velocity 127 to my controller.
When moving from state 1 to state 0, I want to send note 0 velocity 0 to my application and note 89 velocity 0 to my controller.

I think you get the point. This is what I was trying to convey what I was looking for with the matrix example I put together.

I’m pretty sure you don’t want controller bound information (for the LEDs) going to your application and visa versa.
I’m also not sure if you want the application triggering state changes or sending notes.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

I hope this can help you

This doesn’t tell me which messages are correct and which are not or which state you are in when pressing or releasing a given button. I’m sure I will be able to help you once I can be sure I know the right requirements.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Message RAW correct

Hotcue mode: 90 00 7F (raw) after toogle 90 10 7F (padfx mode)
Pad FX mode: 90 10 7F (raw) after toggle 90 00 7F (hotcue mode)

Pad hotcue 1: 90 59 7F (raw) when 90 00 7F(hotcue mode)
Pad FX 1: 90 11 7F (raw) when 90 10 7F (pad FX mode)

0-All adresses Midi Note
1 - 90(59)-90(4A)

This one works almost perfectly
But if I remove hotcue 1 the LED lights up during the switch from 90 00 7F (pad fx mode) to 90 10 7F (hotcue mode) even though I don’t have a hotcue placed on my rekordbox

essai led.bmtp (2.1 KB)

This one works almost perfectly
But if I delete hotcue 1 in rekordbox, the LED lights up when going from 90 00 7F (pad fx mode) to 90 10 7F (hotcue mode)
I would need as a condition if NO HOTCUE 1 then the LED 90 59 00(off)

What I struggle with is why you are sending these messages to both Rekordbox and your controller. Should the controller buttons light up with 90 63 7F and go off with 90 63 00 for Mode and the message going to Recordbox be 90 00 7f and 90 10 7f? Why are you sending these messages to two places?

For Mode Pad should you be sending 90 59 7f to turn on the LED to the controller only and 90 00 7F to RekordBox only. And in the other state 90 59 00 to turn the LED off and 90 10 7F to Rekord Box only?

Also, you have Rekordbox input triggering these same message as well so it looks like you are always sending from everything to everything which doesn’t make sense.

I would think you need to target the individual messages from a given port to a specific port. My guess is that this might be your problem.

For example if RecordBox send 90 63 7F in will also toggle the state and if you use the controller to send it, if RekordBox echos it back, you will end up double toggling the LED.

Unless I get a 100% grasp on what you want, I’m still just guessing what to do.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Just taking another stab.

In this one:

  • Translator 0.0 handles HotCue/PadFX sending to your LED
  • Translator 0.1 handles HotCue/PadFX to Rekordbox
  • Translator 0.2 handles HotCue1/PadFX1 to your LED
  • Translator 0.3 handles HotCue1/PadFX to Rekordbox
  • Tranlsator 0.4 makes sure any other messages send by those two buttons are suppressed (don’t go through your MIDI thru path.

Hotcue-FX1-Manipulation.bmtp (2.2 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hello Steve,
I reread your comments regarding the state numbers, I didn’t understand how it worked and especially how to explain it.
The last mapping you sent me allowed me to better understand the states.
Attached is how the states work, it should be more understandable for you in any case, I hope so.

state 0: DAW mode hotcue (90 00 7F) (my controller in / application out)
state 1: DAW mode PadFX (90 10 7F) (my controller in / application out)
state 2: PAD (PAD for HOTCUE) (90 59 7F) (my controller in / application out)
state 3: PAD (PAD for PADFX) (90 11 7F) (my controller in / application out)
state 4: LED on note 89 on (my controller in / my controller out)
state 5: LED off note 89 off (my controller in / my controller out)

state 6: Delete HOTCUE shift HOLD (90 4A 7F) (my controller in / application out)

state 0 then state 4 ----- only if there is a hotcue A in rekordbox if nothing Led OFF
state 1 then state 5
state 2 if only state 0 (no state 3)
state 3 if only state 1 (no state 2)
if state 1 and after press state 3 then state 4 (led note 89 hold) (if it is possible to do)

if state 0 and after press state 2 then state 4
if state 0 and after press (state 6 and state 2) then state 5

explication state.txt (941 Bytes)

This is where I’m losing you. What buttons are you pressing here?

What does Rekord box send to let you know there is a hotcue A or not?

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

state 6: note 74

this is what it shows me in bmt when I delete a hotcue with my mouse on my rekordbox.
1: MIDI IN [Bome MIDI Translator 1 Virtual In]: 90 59 00
2: MIDI OUT [MixTrack Pro]: 90 59 00
3: MIDI IN [Bome MIDI Translator 1 Virtual In]: 90 01 00
4: MIDI OUT [MixTrack Pro]: 90 01 00

this is what it shows me in bmt when I place a hotcue with my mouse on my rekordbox.
1: MIDI IN [Bome MIDI Translator 1 Virtual In]: 90 59 7F
2: MIDI OUT [MixTrack Pro]: 90 59 7F
3: MIDI IN [Bome MIDI Translator 1 Virtual In]: 90 01 7F
4: MIDI OUT [MixTrack Pro]: 90 01 7F

OK, then it looks like RekordBox is sending the LED data.

I added Preset 1 to control what data to send through from RekordBox.

  • Translator 1.0 Sets LED Off when 90 01 00 is received
  • Translator 1.1 Sets LED On when 90 01 7F is received but only if a HotCue is loaded.
    The translators above send the note messages to you controller Note 89 on or off
  • Translator 1.2 Suppresses Note 89 from getting through from RekordBox

The key thing is you need to watch always.

  • Where each message is coming from.
  • Where you want send it
  • Where you want to suppress it.

For input port selection, I set it at the preset level
For output, O set it at the translator level.

For more information about device selection, see this tutorial.

I hope I got it right. This is very difficult because I have non of your gear. I relay on the log messages I created to figure out what is going on. I set up global variable gb to indicate the lED state.

Hotcue-FX1-Manipulation-2024-05-05.bmtp (3.3 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz
1 Like

One last problem and I could map all the other buttons according to your mapping.

When I press the hotcue PAD it works as long as I keep it pressed when I release the button, the padfx PAD activates.
This button should not react this way.
You need a hold button when hotcue mode is selected and I press the pad, it’s only the hotcue pad that works

when I select padfx mode, the pad only works for the padfx pad

I must have probably made a mistake between maintaining and switching in my explanations.

In any case thank you very much I almost abandoned this project

I made my modifications, unfortunately the LED is no longer functional.
Logical because I deleted the rule, but you can see the idea.

0.3 probleme see 0…bmtp (3.2 KB)

I’m really not sure what you want me to do now. I had it working based on your specifications. Now you made changes and it is broken again but your statements really do not make sense to me. Put it in terms of the MIDI that your controller or Rekord Box is sending, how that particular MIDI message is behaving (and how you want it to behave. I’ve spent hours on this and my job here is to provide guidance and tips and I’ve gone way beyond that. If you need paid consulting, feel free to reach out to me via private message or email for my rates.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz