Selector~ GUI Latching LED's?

pmj's icon

Hi

Easy one (hopefully...)

Please see the attached patch. Very simply I'd like to be able to have a visual indication of which wave has been selected using a red LED.

Where in the patch should I put the LED's so that when "1" is selected (Sine) an LED lights up and stays on until I select "2" (at which point the "1" light goes out and the "2" light comes on, and so on...)

This seems like it should be easy but has me foxed.

Thanks as always.

p.

Max Patch
Copy patch and select New From Clipboard in Max.

roger.carruthers's icon

Here's one way, using matrixctrl set to '1 per column' - you could make your own LED graphic and use a blank background image,
cheers
Roger

Max Patch
Copy patch and select New From Clipboard in Max.

Tim Lloyd's icon

Decode and/or radiogroup will do exactly what you want. I just discovered decode a few weeks ago, its very very useful!

Max Patch
Copy patch and select New From Clipboard in Max.

pmj's icon

Ah, Decode is exactly what I was looking for... thanks as always for your help!

pmj's icon

Only one problem... can the umenu be used to bang the selector as well as turning the LED on and off? It seems to bang on all outputs.

Tim Lloyd's icon

If you hook up an integer box to the left-most outlet of umenu you will see that it outputs the index of the menu item chosen, starting at 0 for the first item in the list.

You can simply connect it's left-most outlet to the left-most inlet of selector~, which will have exactly the same function as the message boxes.

Its important that you know the difference between a bang and a message to use max. You might want to go over max tutorials 2 and 3 if you haven't already.

pmj's icon

of course... thanks for your help.