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

Hans-Christoph Steiner hans at eds.org
Fri May 26 13:03:33 CEST 2006

On May 25, 2006, at 7:19 PM, Frank Barknecht wrote:

> Hallo,
> Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
>> I should say, I forgot that PWM was used in synthesis some, so I was
>> thinking about electronics and control when I was talking about PWM.
>> That's why my PWM objects are tailored towards, but should work fine
>> in the audio context too, unless you need the wandering DC offset.
> The DC wanderer is not needed, but according to:
> http://www.soundonsound.com/sos/Mar03/articles/synthsecrets47.asp
> it generally is considered to be like this:
>   Note that Figure 3 shows a low-frequency amplitude modulation at the
>   LFO speed (hence the downward and upward slope to the resulting PWM
>   wave). Don't worry about this; the prominence of the modulation in
>   the diagram is a consequence of the limited space available for the
>   drawing. If the audio waves are pitched at a few hundred Hertz
>   (somewhere in the middle of the piano keyboard) and modulated by an
>   LFO running at a fraction of a Hertz, this modulation is of no
>   significance, provided that you allow sufficient headroom to
>   accommodate it. If you want, you can use a high-pass filter to
>   remove it, but it's rarely worth the effort.
> Aliasing/foldover is a much bigger concern with this naive kind of
> PWM/rectangle wave generation in Pd.

Aliasing is not so relevant for the quick and dirty PWM control  
signal.  But it would be nice to have a clean signal.  I suppose I  
should put a low pass to prevent that.

Or does someone have a better algorithm for a bandwidth limited PWM?



"I have the audacity to believe that peoples everywhere can have  
three meals a day for their bodies, education and culture for their  
minds, and dignity, equality and freedom for their spirits."
                                             - Martin Luther King, Jr.

More information about the Pd-list mailing list