[PD] phasor to square

Frank Barknecht fbar at footils.org
Sun Jan 20 15:16:10 CET 2008


Hallo,
raul diaz hat gesagt: // raul diaz wrote:

> I need to convert a phasor into a square wave in this way:
> 
> phasor:
> 
>       /       /      /       /       /      /
>     /  |    /  |    /  |    /  |    /  |    /  |
>   /    |  /    |  /    |  /    |  /    |  /    |
> /      |/      |/      |/      |/      |/      |
> 
> square (2:1):
> ________        _________        _
> |              |       |              |       |
> |              |       |              |       |
> |              |____|              |____|
> 
> 
> so, a relation HIGH:LOW holds a high or a low value (1 or 0) a indicate
> number of cycles.

Check out doc/3.audio.examples/J02.trapezoids.pd for a patch that can
make all kinds of waveforms with jumps (discontinuities) from a phasor
signal. In that patch, if the Amplitudes add up to 0 you get a waveform
with only horizontal segments.

For your 2:1 square wave, just set the amplitudes of the first two
wrap-phases to 100 and -100, and the phases to e.g. 33 and 66.

For the theory behind this technique read the final chapter in
Miller's book, e.g.
http://crca.ucsd.edu/~msp/techniques/latest/book-html/node186.html

Ciao
-- 
 Frank Barknecht                                     _ ______footils.org__




More information about the Pd-list mailing list