Forums > MaxMSP

Switch to last set value?

September 11, 2013 | 3:25 am

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

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.

<code>

– Pasted Max Patch, click to expand. –

</code>


September 11, 2013 | 3:53 am

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

<code>

– Pasted Max Patch, click to expand. –

</code>


September 11, 2013 | 4:22 am

@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.


September 11, 2013 | 4:52 am

So here’s what I did instead:

<code>

– Pasted Max Patch, click to expand. –

</code>


September 11, 2013 | 5:53 am

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


September 11, 2013 | 6:32 am

probably [funbuff] is what you want


September 11, 2013 | 6:44 am

@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.


Viewing 7 posts - 1 through 7 (of 7 total)