Switch to last set value?

ahlstrominfo's icon

How do I create a switch that sends the last set value?

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

Right now I'm trigging a bang to the inlet of the number at the same time as I select the input. Feels like I'm forgetting an object here.

Floating Point's icon
Max Patch
Copy patch and select New From Clipboard in Max.

a classic message-order issue; the value is being sent before the switch has been switched to accept the value you want. use trigger to ensure counter is updated before a value is sent to one of switch's inlets. remember message order is right-to-left

ahlstrominfo's icon

@floatingpoint Thanks.

Re-read my question and I think I asked it wrongly :)

My question was more if there exists an object where you don't need to patch as many cables to each number.

ahlstrominfo's icon
Max Patch
Copy patch and select New From Clipboard in Max.

So here's what I did instead:

vichug's icon

hard to see what you want to do, [funnel] maybe ? [cycle] ?

Floating Point's icon

probably [funbuff] is what you want

Wetterberg's icon

@AHLSTROMINFO: where is your input data coming from?

This looks like a very "standard" sequencer setup, am I right? In which case I'd just use Multislider with the "fetch $1" message.