[PD] Re: [PD-announce] PWM in Pd

Chuckk Hubbard badmuthahubbard at gmail.com
Sat May 27 01:04:58 CEST 2006

I was experimenting with this:

[osc~]    [num\
|         /
[*~ 1000000]
[clip~ 0 1]

It works for making a signal just 0s and 1s, but the osc input would
have to be scaled to make the width change linearly with the control.
I guess an appropriately scaled phasor~ should do it.
I was searching for ways to create 2-bit audio in Pd, then amplify,
but I couldn't do it.

On 5/26/06, Frank Barknecht <fbar at footils.org> wrote:
> Hallo,
> Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
> > That  example (I am looking at K01.pulse.width.mod.pd from 0.38.4)
> > is very  simple, but as it is, it is not usable.  Notice how the LOW
> > and HIGH  change values.  PWM needs be 0 for LOW and 1 for HIGH.
> I just found a *veryvery* simple solution to get rid of the DC
> wandering: Just scale the signal so that it's always larger than the
> range (0,1) with e.g. [*~ 10] and then use [clip~ 0 1] to clip excess
> values outside that range. Voila, DC's gone.
> Ciao
> --
>  Frank Barknecht                 _ ______footils.org_ __goto10.org__
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

"Far and away the best prize that life has to offer is the chance to
work hard at work worth doing."
-Theodore Roosevelt

More information about the Pd-list mailing list