Note on to toggle

Short noob question:

My akai midimix sends note on/off msg.
In the panel editor i add two buttons, one for up, one for down. I hit midi learn, then click an appropriate hardware button for each, disabling learn before releasing the button to avoid the note off command instead.
I want this to act as a toggle, so i hit the button and gig performer will only light up the widget until button is released. Maybe not possible with the note on msg as i guess theres no way to know when i let go of the button? Although it does send note off when i do.
Any suggestions? Its for navigating up and down in tracks in a looper plugin.
Maybe theres a way to make the akai send midi cc messages that i havent figured out…?

Thanks for any pointers,

Frode

Try turning on “Momentary to latching” within MIDI Widget Properties.

Thanks, yes, tried this already, but what happens then is that the button is on until i press again, so i need to press two times for each action. I press down once, it lights up, my track selection goes down one track, then i have to press again to turn the button off and yet again to tyrn it on again to move the selection down one more step.

I think only with scripting; altought Im afraid I can’t write it… I do have an AKAI APC MINI i could try hook it up and see.

Use this scriptlet code

var v_val : Integer
    ccm   : ControlChangeMessage
    
on NoteEvent(n : NoteMessage) matching C3

 if IsNoteOn(n) then
  v_val = 127
 else
  v_val = 0
 end
 
 ccm = MakeControlChangeMessageEx(44, v_val, 1)
 Print(ccm)
 InjectMidiEvent("Local GP Port", ccm)

end

Then you can learn the translated MIDI Message with your widget.

1 Like

Fantastic, thank you so much for this, I’ll give it a try when i get home!

1 Like

I want to use something like this to allow certain notes on my guitar to be changed into cc codes that control next song part, next song etc. is “local gp port” to be replaced by the name of a specific midi in device or is that a special name that sends codes to gp?