Forums > MaxMSP

How to slow a [function] & [curve~] combination

June 2, 2008 | 5:30 pm

I’m using ej.function.js and mxj~ curve to scrub a sample stored in a buffer and played with a play~ in a manner similar to that used in the scrub-sampler example patch.

I’d like to figure out how to slow down the transition from one point to another in the function, i.e., to slow down the speed at which the sample is played back.

Here’s a mock-up patch attached with function and curve~ to ensure that most people can look at it.


June 2, 2008 | 7:25 pm

Sorry, you’ll have to use zigzag~ in this patch or ej.function.js, since function doesn’t output a list in curve~ format.


June 2, 2008 | 7:31 pm

here’s the revised patch. further from what i wanted to show but helpful, i hope.


June 2, 2008 | 7:41 pm

And here’s the patch if you have mxj~ curve and ejies (for ej.function.js) or curve~ and ejies.


June 6, 2008 | 3:45 pm

I’ve now used zl nth 2, to extract the time value from the list coming out of the second outlet of ej.function.js which normally goes to the first left inlet of the curve~ or mxj~ curve object. I can scale that value using the "extra argument to right inlet specifies . nth element will be replaced with in right oulet list."

However, curve~ accepts up to a max. of 43 of these triplets. How do I extract/modify only the time value of each when I don’t know the total number of breakpoints/triplets ahead of time?

Does this make sense? I am trying to modify/scale just the time value of every list of (up to 43 triplets) of values using a multislider.

I’ve attached my patch. If you don’t have ej.function.js or mxj~ curve, please replace with function and curve, respectively and remove the route function0 from between the breakpoint editor and zl object.

Thanks!


June 6, 2008 | 6:30 pm

Perhaps use zl iter to split the list into triplets, process each triplet, then rejoin them somehow?

Example (Max 4) attached should work in 5.


June 6, 2008 | 6:42 pm

Thanks, Martin.

That works perfectly for scaling every time value of the function simultaneously but I still need to work out how to access each segment’s time value, independently.

I knew I was going to have to learn zl inside and out, eventually!


June 6, 2008 | 6:56 pm

ok, sorry I didn’t look at the max5 patch (my demo has run out and I’m waiting for my employer to sort out licenses…although I could have looked in the runtime I suppose!)

…try this!


June 6, 2008 | 7:12 pm

Quote: martinrobinson wrote on Fri, 06 June 2008 12:56
—————————————————-
> ok, sorry I didn’t look at the max5 patch (my demo has run out and I’m waiting for my employer to sort out licenses…although I could have looked in the runtime I suppose!)
>
> …try this!
>
>
—————————————————-

Thanks! That’s great… I just changed the modified value to the second one rather than the third, changed the format to float, and plugged it into my patch.
Here it is for you to look at!
Matt


June 11, 2008 | 11:07 am

matt schrieb:
> That works perfectly for scaling every time value of the function
> simultaneously but I still need to work out how to access each
> segment’s time value, independently.

have a look at vexpr, and if you have Max 5 at the new zl modes delace
and lace…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


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