phasor~ ramp control

Sep 4, 2011 at 5:53pm

phasor~ ramp control

Hi all,

I’m trying to do math on a phasor~ object, so that I have the regular output going from 0 to 1 reading through a buffer, then I want to also do math on that same phasors output that produces a ramp that goes from 0 to 0.5, stays at 0.5, and then continues up to 1. I would like this “ramp, straight, ramp” to happen at the same frequency of the first phasor~, and I want to be able to specify the times of the “ramp, straight, and ramp”

Here is how I’m doing it right now..

– Pasted Max Patch, click to expand. –
#58746
Sep 4, 2011 at 6:15pm

also, I’m using this for granular synthesis, so I would like to avoid using Max objects and stick to MSP objects so everything is sample accurate.

#211154
Sep 4, 2011 at 6:56pm

never mind! I figured it out.

#211155
Sep 4, 2011 at 9:37pm

Always a good idea to post your solutions, so we don’t have unanswered questions on the forums.

#211156
Sep 4, 2011 at 10:45pm

@MuShoo

+1 (* 10)

#211157
Sep 4, 2011 at 11:06pm

I did this as an exercise – just to see how I might do it. I wonder what solution you came up with or if there is some perfect object or object combo that does this without all the gates~ and selectors~.

anyways here’s my attempt:

– Pasted Max Patch, click to expand. –

`

#211158
Sep 5, 2011 at 6:21pm

Here’s a quick n dirty Jitter-based solution that will save some audio processing power. It clicks like a bitch, so it’s not so good for realtime PM, but it’s cheap and sorta works…

I’m not feeling very clever today, but I know there’s a much tidier way of doing this with a single [jit.expr], rather than taking two ramps and smushing them together the way I’ve done here.

I just realised this is like making a variable-width [kink~], innit?

Butcher away and improve:

– Pasted Max Patch, click to expand. –
#211159
Sep 7, 2011 at 3:14pm

Here’s another way of doing it. This updates once per loop so you don’t get weirdness when dragging.

– Pasted Max Patch, click to expand. –

And PM.Scale~:

– Pasted Max Patch, click to expand. –
#211160
Sep 7, 2011 at 5:13pm

Sorry fo the delay – I need to set up email notifications when I get replies.

Here was my solution:

– Pasted Max Patch, click to expand. –
#211161

You must be logged in to reply to this topic.