The "Fake" PWM method

Discussions about anything analog, digital, MIDI, synth technology, techniques, theories and more.
User avatar
UnbalancedKarma
Newbie
Newbie
Posts: 29
Joined: Sun Jun 15, 2014 12:02 pm
Real name: Fabio
Gear: Ensoniq: SD-1/32
Kawai: K1m, K3, K4r, K5
Oberheim: DPX-1, OB-12
Quasimidi: Raven Max, Sirius
Siel: Mono
Band: Unbalanced Karma

Re: The "Fake" PWM method

Post by UnbalancedKarma » Tue Jun 09, 2015 11:51 am

Jinsai wrote:Hard sync makes one wave (the slave) reset its waveform when the other wave (the master) restarts.
The "resetting within a cycle" effect of hard sync effectively changes the shape of the wave, which changes the harmonic structure and thus the timbre or sound of the oscillator.

Pulse waves are unique in that they are just on/off - there's no ramp or slope to them. That means when you reset them, you're effectively changing the duty cycle (the length of the on/off parts of the wave).

What else could do that? Well, once you think about it, you realize that changing the pitch of a pulse wave would have the same effect. A higher pitch produces shorter duty cycles clumped together frequently, lower pitch slightly longer duty cycles less frequently. Of course, because you're changing the duty cycle AND the frequency/periodicity, the pitch varies, too.

Pulse Width Modulation literally modulates the width of the pulses while keeping the actual pitch - the periodicity of the wave - the same. But because of the shifting width, there is some illusion of pitch variation (and thus, "fatness").

Since these things are close together, it's totally possible to fake PWM using hard sync:

Set both oscillators to the same pitch
Set your "slave" oscillator to a square wave
Set your "master" oscillator to a square wave
If you turn "Sync" on now, you probably won't hear any difference. Turn it back off.
Set up an LFO with a triangle or sine wave. Assign it to control the pitch of your slave oscillator, and give it a frequency and depth that is sort of like a reasonably fast police siren. Wee-ooo-wee-ooo, not weeeeeeeeeeooooooo.

Now turn Sync on.

You've got your fake PWM...except it's not really fake. You're effectively modulating the pulse width of oscillator 1, but in a sneaky way.

Slave oscillator has fixed duty cycle (timbre) and periodicity (pitch) on its own. But the LFO you set to it makes the periodicity vary up and down, so you hear the pitch variation.

But when you slave it to oscillator 2, oscillator 2 forces the wave to re-start its duty cycle at a fixed periodicity.

The net effect is the duty cycle changes at the rate your LFO is modulating the slave oscillator, but the pitch is determined by your master oscillator due to the hard sync. It's pretty clever.

This trick only works with pulse waves, because of their on/off nature. With any other sloped or non/on-off waveshape, you end up with timbral changes instead of PWM-ish sounds. (There's a different way to fake that kind of stuff for other waves using square LFOs, but I won't go into that now).
sorry to bump an old thread...

I'm interested in all the possible ways to "fake" PWM! some synths lack it, some others implement it very badly...

can you explain further? :?:
balancing Karma with Music.

User avatar
pflosi
Synth Explorer
Synth Explorer
Posts: 3620
Joined: Tue Nov 13, 2007 6:14 pm
Gear: more than 150 characters...
Location: zürich
Contact:

Re: The "Fake" PWM method

Post by pflosi » Tue Jun 09, 2015 1:54 pm

We had some heated discussions about whether this constitutes "real" PWM or not recently :)

See here: http://www.vintagesynth.com/forum/viewt ... =1&t=78799 and here: http://www.vintagesynth.com/forum/viewt ... 30#p741274

What you need is two oscs w/ pulsewaves (but without PWM or pulse width adjustement, although if those are there of course you can also just ignore those functions for the sake of experimenting), hard sync and an LFO. Any synth with those should be able to do this trick.

User avatar
Bitexion
Synth Explorer
Synth Explorer
Posts: 4230
Joined: Fri Apr 15, 2005 7:43 pm
Gear: Alesis Andromeda A6
Roland D-50
Creamware Minimax
Yamaha DX7s
Analogue Systems modular
Ensoniq SQ-80
Waldorf Blofeld
Location: Drammen, Norway

Re: The "Fake" PWM method

Post by Bitexion » Tue Jun 09, 2015 5:43 pm

Basically square waves on both oscillators, hardsync on osc2, sweep osc2 frequency with a slow LFO or envelope.

User avatar
UnbalancedKarma
Newbie
Newbie
Posts: 29
Joined: Sun Jun 15, 2014 12:02 pm
Real name: Fabio
Gear: Ensoniq: SD-1/32
Kawai: K1m, K3, K4r, K5
Oberheim: DPX-1, OB-12
Quasimidi: Raven Max, Sirius
Siel: Mono
Band: Unbalanced Karma

Re: The "Fake" PWM method

Post by UnbalancedKarma » Wed Jun 10, 2015 7:06 pm

SO... Osc sync IS pwm! Morevover, it modulates the width of ANY waveform!
balancing Karma with Music.

User avatar
UnbalancedKarma
Newbie
Newbie
Posts: 29
Joined: Sun Jun 15, 2014 12:02 pm
Real name: Fabio
Gear: Ensoniq: SD-1/32
Kawai: K1m, K3, K4r, K5
Oberheim: DPX-1, OB-12
Quasimidi: Raven Max, Sirius
Siel: Mono
Band: Unbalanced Karma

Re: The "Fake" PWM method

Post by UnbalancedKarma » Wed Jun 10, 2015 7:20 pm

I wonder if something similar can be done via AM (amplitude modulation)...

in a Kawai group (https://groups.yahoo.com/neo/groups/Kawai-K/info) we discussed about how to obtain PWM in Kawai series digital synth... for the K1, we ended up using a sawtooth and a ramp waveform (both present in the synth non-modulable wavetable); about the K4... it has no ramp waveform, anyway a user managed to have PWM happening! but he never told how he reached it... since the K4 includes AM but no sync, I guess the answer has to be found in that direction, but how?!
balancing Karma with Music.

User avatar
Zamise
Supporting Member!
Supporting Member!
Posts: 2354
Joined: Wed Oct 20, 2004 2:41 am
Gear: Rollhand P00
Band: Quantum-Source
Location: DenverMetroUSA, Quantum-Source.com
Contact:

Re: The "Fake" PWM method

Post by Zamise » Thu Jun 11, 2015 6:11 pm

I'm a bit out of my league here, but I was thinking if you have a multi track sequencer/sampler, you can probably use a single cycle saw, and have sequenced with same notes with an inverted version on another track and just pitch it with envelope or LFO or manually to control the width or different notes even? At least should work when in mono, not sure about poly or while other things are going on, maybe, just what I was thinking, I'm probably way off because I've not actually tested it out in any way. I've heard of someone doing something similar to this to create fake PWM on an RS7000 once, I never realized how cool it would be to give it a go on mine and find out if it would actually work until now. If it works I imagine just about any multi track sampler sequencer could also do it as a pseudo PWM.
<ZQS> [....<OII>.....soundcloud player v2.42.....................link]

User avatar
UnbalancedKarma
Newbie
Newbie
Posts: 29
Joined: Sun Jun 15, 2014 12:02 pm
Real name: Fabio
Gear: Ensoniq: SD-1/32
Kawai: K1m, K3, K4r, K5
Oberheim: DPX-1, OB-12
Quasimidi: Raven Max, Sirius
Siel: Mono
Band: Unbalanced Karma

Re: The "Fake" PWM method

Post by UnbalancedKarma » Thu Jun 11, 2015 6:30 pm

that's interesting, but way overcomplicated! there must be a way in synthesis!?! :idea:
balancing Karma with Music.

User avatar
Vo1t
Newbie
Newbie
Posts: 3
Joined: Mon Jul 06, 2015 8:26 pm

Re: The "Fake" PWM method

Post by Vo1t » Mon Jul 06, 2015 9:07 pm

There is a second way of doing this, it requires a mixer with bi-polarity and no LFO needed!

Set both oscillators to the same pitch
Set oscillator A to a sawtooth wave
Set oscillator B to a sawtooth wave
Mix oscillator A as normal.
Mix oscillator B at the same level but an inverted amplitude. (or some synths have a inverted saw wave)
The detune of the oscillators determine the rate of the PWM effect.

The two waves cause phase cancellation in the shape of a variable rectangle wave. The more out of tune the faster the PWM LFO effect.

This is how you get a PWM effect on a MiniMoog since osc. 3 has an inverted sawtooth wave in it's selection.

User avatar
Jinsai
Junior Member
Junior Member
Posts: 131
Joined: Sat Apr 07, 2007 12:07 am
Gear: Alesis Ion
JX-3P w/Kiwitechnics
Nord Lead 2
Poly Evolver Keyboard
Prophet 12
Tempest
Assorted basses, guitars, software
Band: Sid Luscious and The Pants
Location: San Francisco, CA
Contact:

Re: The "Fake" PWM method

Post by Jinsai » Tue Jul 07, 2015 3:02 pm

UnbalancedKarma wrote:SO... Osc sync IS pwm! Morevover, it modulates the width of ANY waveform!
No, absolutely not. Oscillator sync RESTARTS the waveform, which for any wave other than a pulse wave, results in a different (and more complex) waveform, not width modulation. That's why oscillator sync produces new timbres.

That is also why if you want to use oscillator sync to fake PWM with square waves, you have to be very careful and specific with the settings and ranges, or else it sounds more "osc sync-y" than PWM-y.

For those interested in how to fake PWM on other wave types, this Sound On Sound article is about as good as it gets: http://www.soundonsound.com/sos/Mar03/a ... rets47.asp
--
"A musician is someone who's heard a lot of music" - Pierre Boulez

User avatar
UnbalancedKarma
Newbie
Newbie
Posts: 29
Joined: Sun Jun 15, 2014 12:02 pm
Real name: Fabio
Gear: Ensoniq: SD-1/32
Kawai: K1m, K3, K4r, K5
Oberheim: DPX-1, OB-12
Quasimidi: Raven Max, Sirius
Siel: Mono
Band: Unbalanced Karma

Re: The "Fake" PWM method

Post by UnbalancedKarma » Wed Jul 15, 2015 7:24 pm

balancing Karma with Music.

abruzzi
Junior Member
Junior Member
Posts: 172
Joined: Tue Dec 10, 2013 8:46 pm

Re: The "Fake" PWM method

Post by abruzzi » Wed Jul 15, 2015 10:09 pm

UnbalancedKarma wrote:
He gets some great sounds out of that instrument.

ian
Junior Member
Junior Member
Posts: 114
Joined: Mon May 18, 2015 2:20 am
Real name: Ian
Gear: TR707, yam Sk20, Korg MS20, yam DX Reface and Dx7, Arturia micro, Kawai 1 Ii and 3... My step up is a work in progress.
Band: Black Limo

Re: The "Fake" PWM method

Post by ian » Thu Jul 16, 2015 10:55 am

Great thread. I think it is good to mention again that LFO's are just one of many possible methods of attack. A sub-oscillator works nicely, too, as does almost anything else.

Post Reply