Csound Csound-dev Csound-tekno Search About

Re: Pulse width modulation!

Date1998-12-11 10:43
FromJosep M Comajuncosas
SubjectRe: Pulse width modulation!
Paul Winkler wrote:

> This should please the analog fans...
>
> Some time ago there was a discussion of simulating pulse width
> modulation. I don't remember anyone posting a solution. Well, the other
> day, inspiration struck, and I came up with the idea to do it by
> indexing a square wave in a funny way...

Horror! a graphycal approach to PWM synthesis guarantees massive
aliasing
;-)Unless you plan to use it for techno hardcore I strongly reccomend to
get
PWM waves in the following way:

Generate 2 pulses with "buzz"
Delay de second pulse a fraction of the cicle (this sets the pw amount)
with
"delay" (or with deltapi if you want to change the pw factor on the fly)
Substract the second pulse from the first (or viceversa)
Integrate the previous result with "integ"

It will sound much better by sure, because all the process is
bandlimited.

Josep M Comajuncosas