KVR :: DSP and Plug-in Development » DPW experiments [View Original Topic]
There are 25 posts in this topic.


Ichad.c - Fri Dec 14, 2012 4:43 am
Hey people, been mucking around with Differentiated Parabolic Waveforms for a while now - and quite amazed by its simplicity and versatility. Obviously - it's inferior to all the blips,blams and bleps - but as a c++ and mathematical noob, I think it is probably the easiest qausi bandlimiting technique out there - even wavetables isn't so easy to implement - and even harder to "populate" with anything 'custom',IMHO.

Sofar, I've done:
Standard Saw, Standard Pulse, Standard Triangle, Vintage(rounded) Saw, Pulse-Width Saw, Pulse-Width Triangle, Exponential Triangle, Soft Saw (nearly same harmonic slope as triangle), Vintage Saw to Fake sine morph(can maybe morph Saw-Sine-Triangle).

Strangely enough - after reading alot of old digital synth manuals - some of these shapes have popped up(more than once) - especially stuff from Roland Shocked Surprised

Inanyway, any other papers/blogs out there that has more info on DPW? Especially related to making other shapes - apart from a standard Saw & Triangle?

Or, I'll show you mine and you show me yours?
(Except if you're under-age Laughing )
Richard_Synapse - Fri Dec 14, 2012 5:52 am
You can make anything with DPW using samples, ie you simply pre-integrate a wavetable then differentiate it on playback. For the ones you made, which order did you use, and care to share your formulas? Smile

Richard
Ichad.c - Fri Dec 14, 2012 9:11 am
Richard_Synapse wrote:
You can make anything with DPW using samples, ie you simply pre-integrate a wavetable then differentiate it on playback...


Good idea, but I'm a noob - all my stuff works with a simple counter i.e. a good old saw.

Richard_Synapse wrote:
For the ones you made, which order did you use, and care to share your formulas? Smile


All are first order (I did mention simplicity Smile ) , taking into account that I probably will use a modest 2x oversampling - which gives about -18dB less aliasing, first order seems practical - and no need to fire-up Maxima. I'll share one 'new' shape - a Vintage Saw.

A DPW triangle:
a= abs(saw) - 0.5;//centre it around zero
b = a * abs(a);//parabole
c = a - b;
d = differentiate(c);

Now a DPW "Vintage saw":
a1 = abs(saw) - 0.5;
a2 = a1 * a1;//parabole
b = a2 * a2;//another parabole
c = b - a2;
d = differentiate(c);
output will be one octave higher though, so freq/2.


All my waveshapes are simple variations of the above - the pulse-width saw and pulse-width triangle are even a tad cheesier - all can be written in 5 lines or less - like the above. Also - thinking of the roland thing - it does make some sense - memory was expensive in those old mashines.
Richard_Synapse - Fri Dec 14, 2012 1:16 pm
Cool, I'll try it...what is the pulse-width triangle? Smile

Here's how you do any shape. Take a buffer of say 2048 samples with whatever shape you want in it. Then simply add up the 2048 samples from first to last (this is the integration step). This gives you a new set of 2048 samples, and of course you do this prior to runtime and only once. Now using your terminology the realtime output is then simply

d = differentiate( buffer[i] );

where 'i' is between 0..2047 in this example and corresponds to your 'saw' variable. You probably want to use interpolation, but the above will work for a start.

Richard
Ichad.c - Fri Dec 14, 2012 1:50 pm
Richard_Synapse wrote:
Cool, I'll try it...what is the pulse-width triangle? Smile


Not sure if it completely qualifies as "pulse-width" Smile :



Can make it assymetrical, but the aliasing creeps back a bit.
hibrasil - Fri Dec 14, 2012 4:25 pm
seems the amplitude varies a lot based on frequency. Do you know if there is a precise way to compensate for this?

cheers,

oli
Richard_Synapse - Sat Dec 15, 2012 2:55 am
Yes, you simply divide the output by frequency (more precisely, the phase increment). If you use higher order DPWs, be sure to use doubles, otherwise you'll quickly run into numerical issues.

Richard
hibrasil - Sat Dec 15, 2012 5:36 am
thanks, that works. Anyone know if a quasi-bandlimited saw-triangle morph can be achieved with this approach?
Sendy - Sat Dec 15, 2012 5:51 am
Ichad.c wrote:
Richard_Synapse wrote:
Cool, I'll try it...what is the pulse-width triangle? Smile


Not sure if it completely qualifies as "pulse-width" Smile :



Can make it assymetrical, but the aliasing creeps back a bit.


Technically, anything that isn't a pulse can't *really* have a pulsewidth, a more technically accurate term might be "duty cycle" as it appears to be speeding up each excursion and introducing a relaxation period (essentially the triangle works twice as fast so it can go on holiday at the end of the week HiHi ).

But yeah, pulsewidth is just one of those terms that has become a catch-all term and it's not overly technical, so I'd stick with that.
Ichad.c - Sat Dec 15, 2012 12:27 pm
hibrasil wrote:
thanks, that works. Anyone know if a quasi-bandlimited saw-triangle morph can be achieved with this approach?


Probably not - the DPW saw and DPW tri - are two different approaches, there might be another 'different morph' available. I still haven't done the gain compensation for my non-bandlimited saw-tri morph(unity parabole method) yet - anybody want to share their formula? I'm still going to try and do a saw-tri morph with DPW though - if I can find a way around the "abs" function in the DPW triangle case - it should be doable - I think.

Random note - has anybody seen the "triangle mod" of the Roland JP-8080? Page 66 of the manual. That's simple interger wrap around Shocked , must be highly oversampled though Question Also - I've done all of the 'shapes' of the jp-8080 saw (page67) seperately with DPW - think I *might* be able to combine them...
Sendy - Sun Dec 16, 2012 3:41 am
The Triangle Mod wave is pretty interesting, but the parameter range is WAY too small. Actually, the diagrams in the manual overstate the variance in the waveform you can produce. Some softsynths like Zebra, Zeta, Helix etc can do a much better job giving you a nice full sweep, some can even wrap the wave multiple times.

More interesting I found was the regular Triangle wave in the JP:



Unlike the Triangle Mod waves, these diagrams match the synth output precicely, and it's a really weird and interesting transform that I haven't seen implimented anywhere else. Notice that in the middle position the waveform's already lost it's symmetry as well as changed tension. It's great for making intricate but soft sounds.
antto - Sun Dec 16, 2012 5:46 am
i have aproximated both the trianglemod and triangle from the jp-8000 (based on audio recordings from, Sendy Wink ) in my polysynth (which is under construction)

the trianglemod is basically funky math and modulo
the triangle was much harder, it required a funky shaper

and after i looked a bit more into this shaper, i wonder - maybe they used THAT same shaper for the weird shape of the sawtooth (in the supersaw)

here's some audio: https://www.box.com/s/nbpl1zuxkxx7rkc4d548
btw, thanks Sendy for the very precious audio recordings from the jp8000 ;]
Ichad.c - Sun Dec 16, 2012 2:17 pm
Interisting waveshaper antto! Guess there is truly different ways to skin a cat! Don't know if we are refering to the same 'supersaw' - but a shaper on that seems unlikely - the odd supersaw shape comes from the phase of the tracking HP, IMHO.

P.S. What software did you use for you expession evaluator? It looks cool.
antto - Mon Dec 17, 2012 3:12 am
Ichad.c wrote:
Interisting waveshaper antto! Guess there is truly different ways to skin a cat! Don't know if we are refering to the same 'supersaw' - but a shaper on that seems unlikely - the odd supersaw shape comes from the phase of the tracking HP, IMHO.

exactly that shape, but i strongly don't think they actually use a HP filter tracking the oscillator frequency
this shaper can be bent to give that same waveform
Quote:

P.S. What software did you use for you expession evaluator? It looks cool.

uhm.. mIRC HiHi

EDIT:
here, using the same shape you get this which looks pretty much like one of the jp8000 supersaws

Ichad.c - Tue Dec 18, 2012 9:29 am
antto wrote:
Ichad.c wrote:
Interisting waveshaper antto! Guess there is truly different ways to skin a cat! Don't know if we are refering to the same 'supersaw' - but a shaper on that seems unlikely - the odd supersaw shape comes from the phase of the tracking HP, IMHO.

exactly that shape, but i strongly don't think they actually use a HP filter tracking the oscillator frequency
this shaper can be bent to give that same waveform


Hmmm, interisting hypothesis. Does your "shaper" explain the theoretically reduced aliasing below the fundamental? And what do you feed it with - a naive saw or something else?
antto - Tue Dec 18, 2012 9:56 am
i just demonstrated the final waveform for a single cycle of a single sawtooth with that shape (the last picture, from my previous post)

the theory about reducing aliasing <- who said that? ;]
my nose tells me that the JP-8000 has a sampling rate of more than 48KHz, probably 64K at least

while i know Roland had some very clever math for practical digital IIR filters, i still think having a good resonant HPF tracking an oscillator is not what they have there in the supersaw
Ichad.c - Tue Dec 18, 2012 10:37 am
antto wrote:

the theory about reducing aliasing <- who said that? ;]


One research blog and one research article - I read alot Smile Have to go and dig around to find it though - the artical does a pretty good analysis. Will try and find it for you - my "Research" folder look like a Lorenz attractor.
Ichad.c - Tue Dec 18, 2012 10:50 am
Found it:

http://www.google.co.za/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&sqi=2&ved=0CDIQFjAA&url=http%3A%2F%2Fwww.nada.kth.se%2Futbildning%2Fgrukth%2Fexjobb%2Frapportlistor%2F2010%2Frapporter10%2Fszabo_adam_10131.pdf&ei=Y7rQUJyrKIyShgeL0YGACw&usg=AFQjCNE8zCM4dcsXFftq5C-pbKB4JwrbKw&sig2=BIsk1KNRM45gHcvP6QZxqQ&bvm=bv.1355534169,d.d2k

Page 17 and 18.
antto - Tue Dec 18, 2012 12:11 pm
yes, i remember now

i really don't agree with what is written there about the HP filter
tho, i agree that you can get the same type of shape by running the supersaw thru a 2nd order resonant HP filter (i tried it myself, with an SVF HP)

szabo paper wrote:

Research showed that oscillators used in the Super Saw are in fact saw oscillators, but the added signal of the 7 waveforms goes through a high pass filter.

did someone reverse-engineer the JP-8000 code? ;]
szabo paper wrote:

A way to achieve such a waveform without a high pass filter is through a wavetable oscillator. This method cannot be the one used by the Super Saw, because a wavetable oscillator is band limited, and the oscillators found in the Super Saw are not.

Surprised Uh Uh Uh
who said it can't be done with a wavetable?
who said a wavetable is bandlimited?
i really disagree on that
you can make this waveform in many ways, and he is right to believe it's a HP filter, but i don't think so ;]
in my supersaw aproximation, i use a simple wavetable (a very short one in fact) and absolutely no interpolation

that wavetable can be replaced by (or stuffed with the data from) the funky polynomial which i posted pictures of earlier
i originally found the curve when i was working on the triangle waveform, then i figured the same curve can be used to make the supersaw too, coincidence? ;]
Ichad.c - Tue Dec 18, 2012 1:16 pm
antto wrote:

szabo paper wrote:

A way to achieve such a waveform without a high pass filter is through a wavetable oscillator. This method cannot be the one used by the Super Saw, because a wavetable oscillator is band limited, and the oscillators found in the Super Saw are not.

Surprised Uh Uh Uh
who said it can't be done with a wavetable?
who said a wavetable is bandlimited?
i really disagree on that


I agree with you on that.(Getting really off-topic HiHi ) But does your approximation sufficiently estimate the alias/noise slope/level - below the fundamental?
antto - Tue Dec 18, 2012 1:28 pm
i don't think recordings sampled at 44.1kHz are sufficient to make such analysis
nor that the aliasing is the key component of the supersaw, it *could* hint what the JP sampling rate is tho

i think szabo has had access to a JP during his analysis
if so, why didn't he record at a much higher sampling rate?
bleh, anyway, i didn't mean to argue
i just see other possible ways of doing things ;]
Sendy - Tue Dec 18, 2012 1:31 pm
Szabo's Supersaw emulation is REALLY good. I have a JP-8000 standing right next to me and I honestly found no discernable differences between his oscillator and the supersaw sounds coming from the JP. Just as well considering my JP just recently succumbed to the "weak outputs" fault which makes it now hard to get a decent sound out of it :/

The other waveforms on the JP aren't so interesting - Feedback is a comb filter with feedback and a metric ton of aliasing, Tri Mod is simple wraparound on the Y axis which can be done much better in other synths (and is actually a really cool sound when you can modulate it properly), Sawtooth shaping just changes the level and polarity of the fundamental - it looks far more drastic on the wave plot than it ever sounds... about as exciting as doing AM on a sine wave... Pulse is the same old story... noise is blah... That only leaves the regular Triangle which I've posted about already - really interesting sound and the only waveform on the board that can't be emulated.
EvilDragon - Tue Dec 18, 2012 1:42 pm
Is Feedback osc really just a comb with feedback? I've always wondered what is it exactly.

Shame Szabo didn't emulate it in JP6K. I'd totally be all over that plugin if all waveforms were emulated.
Ichad.c - Tue Dec 18, 2012 1:44 pm
antto wrote:

bleh, anyway, i didn't mean to argue
i just see other possible ways of doing things ;]


Me neither! Not a 'moddeling' man myself - I prefer 'new/different' things - I have the attention span of a 3year old. I greatly respect the work - you and others do, though.
Ichad.c - Tue Dec 18, 2012 1:53 pm
Sendy wrote:

The other waveforms on the JP aren't so interesting - Feedback is a comb filter with feedback and a metric ton of aliasing...


I've tried that approach - can't even get close, all I get is the 'noisy' part. Crying or Very sad
To me - it's the most interisting waveform/process in the JP8000! (I like odd things).

As for it's unique triangle - the top and bottom image - I got done with DPW, but the middle image (with it's asymmetry) is still a mystery to me. But it seems like antto already solved that one!

There are 25 posts in this topic.