Forums > MaxMSP

ramping numbers…

July 24, 2013 | 3:21 pm

ok, i am quite sure this is a totally stupid problem but i just can’t get my head around this:
i have three float parameters (0.-1.) which should influence each other over time in the following way:
1. 0. 0. > 0. 1. 0. > 0. 0. 1. and reverse:
0. 0. 1. > 0. 1. 0. > 1. 0. 0.

they should ramp softly from 0. to 1. and back – for which i use "line". the sum of all three floats needs to be = 1. at any given point.
i attached a patch with my efforts, which is not working (red part).

background: i use a video fader with 3 inputs: image1, transition image, image2. image1 and image2 should fade into each other but always show the transition image in between. i use the fourway mixer of tutorial 43, which works perfectly fine – except i don’t manage to give it the proper fading amount parameters.

any help is, as always, greatly appreciated!
k

<code>

– Pasted Max Patch, click to expand. –

</code>


July 24, 2013 | 4:15 pm

i think i figured it out… it seems really complicated though…

<code>

– Pasted Max Patch, click to expand. –

</code>


July 24, 2013 | 5:03 pm

just to simplify very slightly, i’d use a reverse-minus operator [!- 1.] instaed of this

<code>

– Pasted Max Patch, click to expand. –

</code>

but you’re probably not going to get much simpler than that. you can always encapsulate it

another thing– i’d put a [deferlow] object on your outputs if you’re doing video transitions to avoid crashing


July 25, 2013 | 1:16 am

thanks for your quick reply – if it has to be that big ok, i just thought maybe i am missing some command or something since it seemed like some standard operation to me…
your suggestion works fine!
best
k


July 25, 2013 | 1:42 am

Would something like this work?

<code>

– Pasted Max Patch, click to expand. –

</code>


July 25, 2013 | 2:28 am

How about this?

– Pasted Max Patch, click to expand. –

BTW, if you really care about not flooding the system, you’d pick [jit.qball] instead of [deferlow], as the former uses a qelem to ensure that the scheduler doesn’t get flooded.

HTH,
Ádám


July 25, 2013 | 1:43 pm

Here’s yet another way of doing it :)

<code>

– Pasted Max Patch, click to expand. –

</code>


July 26, 2013 | 4:58 am

these all work nicely, thank you all for your help!
k


July 26, 2013 | 5:36 am

… I like using multislider and pattrstorage to do that kind of morph, especially since you can make it exponential.


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