phasor~ ramp control

nickdesigner's icon

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"

Max Patch
Copy patch and select New From Clipboard in Max.

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

nickdesigner's icon

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.

nickdesigner's icon

never mind! I figured it out.

MuShoo's icon

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

brendan mccloskey's icon

@MuShoo

+1 (* 10)

AudioLemon's icon

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:

Max Patch
Copy patch and select New From Clipboard in Max.

`

christripledot's icon

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?

Max Patch
Copy patch and select New From Clipboard in Max.

Butcher away and improve:

Peter McCulloch's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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

Max Patch
Copy patch and select New From Clipboard in Max.

And PM.Scale~:

nickdesigner's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

Here was my solution: