Forums > MaxMSP

phasor~ ramp control

Sep 04 2011 | 5:53 pm

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

Sep 04 2011 | 6:15 pm

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.

Sep 04 2011 | 6:56 pm

never mind! I figured it out.

Sep 04 2011 | 9:37 pm

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

Sep 04 2011 | 10:45 pm


+1 (* 10)

Sep 04 2011 | 11:06 pm

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


Sep 05 2011 | 6:21 pm

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

Sep 07 2011 | 3:14 pm

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

Sep 07 2011 | 5:13 pm

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

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

Forums > MaxMSP