generate a cycle only during middle 50% of phase?

prismspecs's icon

I want a cycle~ object to run from -1. to 1. only once, no repeat values. Typically with cycle there are repeat values because of the shape of the waveform. Any way to do this?

andrea agostini's icon

If I get it right you want some sort of s-shaped waveform.

If this is the case, you can use a phasor~ to drive your cycle~'s right outlet, with a scale~ object (or some math) to convert phasor's 0-1 ramp into 0.25-0.75.

You should be aware that the sudden drop from 1 to -1 in the resulting waveform might cause you trouble, such as aliasing or clicks depending on how you plan to use your oscillator...

hth
aa

Floating Point's icon
Max Patch
Copy patch and select New From Clipboard in Max.

as per what aa says:

(but cycle~ outputs an even function so its phase is clipped 0.5-1)

Floating Point's icon
Max Patch
Copy patch and select New From Clipboard in Max.

or using scale~

andrea agostini's icon

aah yes, sure, 0.5-1... its a cosine... ;)

Christopher Dobrian's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Or, for a one-shot occurrence: