[sdiy] WHICH PIC/UCONTROLLER should I buy today

Olivier Gillet ol.gillet at gmail.com
Mon Aug 9 14:54:53 CEST 2010


> am i mistaken in thinking that you cant use the PWM outputs for final audio signals (sine waves, white noise,etc)?or is there a simple way to convert this signal (isnt pwm a square wave output with changing duty cycle?)

Yes, a PWM signal is a square wave with changing duty cycles. The
trick is that if the base frequency of the square wave is outside the
audio range, you won't hear it, what you will hear are the
periodicities within the modulations of the duty cycle. So if the
pulse width of a 50kHz square wave is modulated by a 500 Hz sine wave
LFO, you'll hear a 500 Hz sine of amplitude proportional to the
modulation strength, not the carrier, and it won't sound "squarey" at
all. Maybe not perfectly pure, but still OK.

It'll work without any external component straight into a mixer or
sound card because in the end, one or many of the
soundcard/amp/speaker/ears elements behave like a low-pass filter,
though it's not a good idea to leave this carrier unfiltered as it can
get back into the audio domain by some other elements inserted in the
chain (eg: sound card with bad brickwall filters + sampling).



More information about the Synth-diy mailing list