So what's pulse width modulation of 'any' waveform all about...

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

This ones got me pickled.

I create my pulse/square wave by [saw + delayed inverse saw] to cancel out harmonics, and alter the delay time to create a pulse width modulated square.
Bog standard stuff, you know what I mean....
However, some synth's are advertised as having pulse width modulation on any waveform. How the dickens does that work.
How do you pwm a saw or a simple sine wave. When I scope them they look like a phase change.
Is it phase modulation or is there some other voodoo magic you guys are doing.

Kirsty
:?

http://xsrdo.blogspot.co.uk

Post

Some synths lengthen the 1st half of the waveform and shorten the 2nd half. It's basically phase distortion synthesis.

(many synths also simply morph each wave in a different way)

Post

You can think of PWM as a sort of morphing between two states. For example you might have many sorts of waveforms that can produce varied morphs such as a square that morphs to a square of double the frequency.

How you achieve this is really varied, totally up to you. There are various trade-offs such as maintaining peak vs. RMS amplitude, producing smooth spectral morphs and so on.

Consider the case of two ramp (saw) waveforms with a slight detune. The peak amplitude changes in this waveform. You can instead produce a morph from a single ramp to a ramp of double the frequency (as when the phase of the two is at 180 degrees) while maintaining peak level for an interesting effect.

You could also reproduce the same effect as the detune by allowing the morph through all 360 degrees, although you'd need to "wrap" the modulation such as a ramp rather than reverse direction such as with a triangle/sine.

These sort of effects are very common in wavetable synthesizers. Back around 1999-2000 when Xhip was known as "the synth from acidtracker" the oscillators were wavetable based and this pseudo-detune waveform was one of the additional waveforms available.
Free plug-ins for Windows, MacOS and Linux. Xhip Synthesizer v8.0 and Xhip Effects Bundle v6.7.
The coder's credo: We believe our work is neither clever nor difficult; it is done because we thought it would be easy.
Work less; get more done.

Post

What MadBrain said.

If you take a triangle wave and gradually speed up the "up" ramp while slowing down the "down" side equally, you can morph between triangle and sawtooth. Some synths will use alternative methods for doing "PWM" on a sawtooth, such as AM'ing the saw with a variable pulse wave one or two octaves up or in some synths, something even more esoteric.

It's all a bit of a misnomer, since saw and triangle waves don't really have a pulse to have a width of. But since PWM has become shorthand for "that metallic phasing cancelling sound" the terminology has stuck.

Another way to think about it is duty cycle, the amount of time the oscillator is "on" versus the time it's off. Thus some synths will "PWM" waveforms by making the waveform shorter, but still outputting each cycle at the same frequency, so you're getting more and more zeroes at the end of the waveform, in the limit ending with a single sample spike followed by zeroes.
http://sendy.bandcamp.com/releases < My new album at Bandcamp! Now pay what you like!

Post

And some vst synths has a knob to change the symmetry of any waveform.

Post

Thanks guys. Useful info
Sendy wrote: ...It's all a bit of a misnomer, since saw and triangle waves don't really have a pulse to have a width of...
Yeh, I never really thought of it that way.
So really Pwm is just another form of Phase distortion.

Kirsty

Post Reply

Return to “DSP and Plugin Development”