Forums > MaxMSP

generate a cycle only during middle 50% of phase?

June 28, 2013 | 12:00 am

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?


June 28, 2013 | 12:10 am

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


June 28, 2013 | 12:12 am

as per what aa says:

<code>

– Pasted Max Patch, click to expand. –

</code>

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


June 28, 2013 | 12:15 am

or using scale~

<code>

– Pasted Max Patch, click to expand. –

</code>


June 28, 2013 | 12:31 am

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


June 28, 2013 | 8:38 am

Or, for a one-shot occurrence:
<code>

– Pasted Max Patch, click to expand. –

</code>


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