ramping numbers…

Jul 24, 2013 at 3:21pm

ramping numbers…

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>

#257059
Jul 24, 2013 at 4:15pm

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

<code>

– Pasted Max Patch, click to expand. –

</code>

#257062
Jul 24, 2013 at 5:03pm

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

#257066
Jul 25, 2013 at 1:16am

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

#257075
Jul 25, 2013 at 1:42am

Would something like this work?

<code>

– Pasted Max Patch, click to expand. –

</code>

#257076
Jul 25, 2013 at 2:28am

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

#257081
Jul 25, 2013 at 1:43pm

Here’s yet another way of doing it :)

<code>

– Pasted Max Patch, click to expand. –

</code>

#257129
Jul 26, 2013 at 4:58am

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

#257193
Jul 26, 2013 at 5:36am

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

#257198

You must be logged in to reply to this topic.