Midi toggle button - best practice

71 views
Skip to first unread message

Ondřej Šibřina

unread,
Mar 15, 2019, 1:00:07 PM3/15/19
to Lightjams
Hello i have question about best practices to use midi pad controlling sources.
I have already sources they react to press button on midipad and patch for light feedback to midipad.

What i have no idea how to do is to use buttons on midipad in toggle mode so by pressing one button i need to deactive others buttons (sources).

For example i have 2 sources with formula:

source1 - toggle(midi.note(1,1)
source2 - toggle(midi.note(1,2)

but i need something like this:

source1 - toggle(midi.note(1,1);deactive.source(source2);
source2 - toggle(midi.note(1,2);deactive.source(source1);

Hope you understand.
It is possible that i will have more sources that two so i am looking for best practice solution.

Thank you very much.

Mathieu

unread,
Mar 15, 2019, 1:09:10 PM3/15/19
to Lightjams
You can do it like you'd do to activate one scene at a time. See the 2nd video tutorial about cuelist: https://www.lightjams.com/tutorial.html

The idea is that instead of using a toggle, you'll use only one source and move it to the attribute you want to activate. You'll use the midi.note.latest function to get the pressed note and link it to the source's position. You may also need to add another source sending 0% power to all attributes. 

Alternatively (what I find even easier), you use the shader mode with only one source and link the source's power to a formula like:

midi.note.latest(1)==x+1

That means the whole column corresponding to the latest pressed midi note will be active at a time.

Igor Roberti Foc

unread,
Jun 8, 2019, 5:23:38 PM6/8/19
to Lightjams
I don't remember if it was a updated version, but this is my project linked to akai. You can just copy paste most of things

Reply all
Reply to author
Forward
0 new messages