[sdiy] Square to Sine

rburnett at richieburnett.co.uk rburnett at richieburnett.co.uk
Tue Apr 4 14:26:30 CEST 2017


I have always wondered about magic sinewaves for something like this.  
For those not familiar they are sinewaves generated digitally using PWM 
techniques but the transitions in the PWM pulse-train are carefully 
chosen using some clever mathematics to force most of the low-order 
harmonics to zero.  This *greatly* reduces how much you have to filter 
the signal in order to get a decent sinewave with nice low THD.

http://www.tinaja.com/glib/msinexec.pdf

Might not be appropriate here?  ...but it's a neat trick nonetheless.  
It's used in power electronic "inverters" for driving motors, but can't 
help thinking it might have some uses in audio synthesis too?

-Richie,

On 2017-04-04 12:37, Tom Wiltshire wrote:
> On 4 Apr 2017, at 11:32, Elaine Klopke <functionofform at gmail.com>
> wrote:
> 
>> Does this actually work?
>> 
> http://www.learningaboutelectronics.com/Articles/Square-to-sine-wave-converter-circuit.php
>> 
>> I would assume that being 3 RC networks in series means quite the
>> drop in volume.
> 
> Yes, it works, and yes, it'll kill the volume. It's a three-pole
> passive filter. The recommendation (which they've ignored in this
> example) is for each resistor to be ten times the previous one to help
> avoid one stage loading the next. So it could be improved. There's an
> example in my LoopEnv datasheet, pg.6:
> 
> http://www.electricdruid.net/datasheets/LOOPENV1Datasheet.pdf
> 
> It'll only work properly at one particular frequency, as you've
> realised. Changing the input frequency will change both the level and
> the harmonic content of the output (although perhaps not enough to
> matter for small changes in input frequency - e.g. vibrato?)
> 
>> Also, in a related article they show two networks in series
>> converting the square wave to a triangle.
> 
> Probably running the square into an integrator. That gives you a nice
> triangle, but the same volume problem - the volume halves for each
> octave you go up. Have a look at the stuff online about DCOs for more
> about this, since this is the problem they had to overcome.
> 
>> All of the converters being dependent on the frequency of the input
>> wave being roughly the same as what the RC networks are tuned to.
> 
> Exactly.
> 
> Tom
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy



More information about the Synth-diy mailing list