Radio buttons with toggle

37 views
Skip to first unread message

clavaint...@gmail.com

unread,
Jul 13, 2026, 12:31:45 PMJul 13
to Lightjams
Hi!
Probably a simple thing, but i cant for the life of me come up with an elegant solution. I want to use four midi.notes as radio buttons to select an effect (usually just midi.note.latest), but i also want to be able to toggle it off by pressing the latest button again as well as starting any effect when toggled off. Any ideas?

Mathieu

unread,
Jul 13, 2026, 4:25:44 PMJul 13
to Lightjams
Hi,

Here's a formula that might help:

let( isActiveRadio, midi.note.latest(1)==x+1,
note, midi.note(1,x+1),
 isActiveRadio & counter(1,0, onbeat(note), 0, onchange(isActiveRadio))
)

It's using a counter to do the toggle. 

clavaint...@gmail.com

unread,
Jul 13, 2026, 4:35:57 PMJul 13
to Lightjams
Hmm i just tried it and the toggle doesnt work for me. 

Mathieu

unread,
Jul 13, 2026, 5:00:53 PMJul 13
to Lightjams
Hi,

Make sure to have the latest version as the counter function now can count backward: https://www.lightjams.com/history.html

clavaint...@gmail.com

unread,
Jul 13, 2026, 5:07:44 PMJul 13
to Lightjams
Great, that works! Thank you!
Reply all
Reply to author
Forward
0 new messages