PolyBLEP Hard Sync Sawtooth Oscillator

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

Post

Any idea how to make a PolyBLEP hard-sync sawtooth oscillator?
Osc1_phase< osc1_increment -> osc2_phase=0 ? Bandlimited?

Post

First you have to find where inbetween the last sample and the new sample Osc 1 has wrapped:

if( Osc1_phase < osc1_increment )
momentOfWrap = (1 - Osc1_phase / osc1_increment );

then you have to place the bandlimited step at momentOfWrap into the new sample of Osc2 :)

Post

Thanks man! I`ll try it today and post result.. But i believe you, that is that...
Have you tried? Hmm. Moment of wrap of osc1 or osc2?

Post

Dreamwalk wrote:Thanks man! I`ll try it today and post result.. But i believe you, that is that...
Have you tried? Hmm. Moment of wrap of osc1 or osc2?
It'll be moment of wrap for both of them.

Post

Dreamwalk wrote:Any idea how to make a PolyBLEP hard-sync sawtooth oscillator?
Osc1_phase< osc1_increment -> osc2_phase=0 ? Bandlimited?
Of course not.

For phase [0,1]:
Osc2Phase = Osc1Phase * Osc2Delta,
where delta is (Pitch / SampleRate)

But this needed to be done after transition placement.

There is a trickery in hard sync when placing a transition and phase wrap at the same sample. Sometimes you want to place phase wrap BLEP before hardsync; sometimes hard sync BLEP occurs earlier , resetting phase of the original. Improper implementation leads to aliasing when second osc is close to multiple of first osc.

Post

I try to implement your ideas, but without any success ( probably doing something wrong).
But I found:
phase2 = phase1 * phasor2 / phasor1;
(http://www.kvraudio.com/forum/viewtopic.php?t=328129)

and works very well...
You do not have the required permissions to view the files attached to this post.

Post

Dreamwalk wrote:I try to implement your ideas, but without any success ( probably doing something wrong).
But I found:
phase2 = phase1 * phasor2 / phasor1;
Yes, i made a mistake (while looking in the code) :dog:. This one is correct.

Post

2DaT wrote:
There is a trickery in hard sync when placing a transition and phase wrap at the same sample. Sometimes you want to place phase wrap BLEP before hardsync; sometimes hard sync BLEP occurs earlier , resetting phase of the original. Improper implementation leads to aliasing when second osc is close to multiple of first osc.
Hi 2Dat,

I realised this. But what is this trickery you speak of? Could you share? Thanks.

Post

lppier wrote:
Hi 2Dat,

I realised this. But what is this trickery you speak of? Could you share? Thanks.
Definetly not a trickery, but some non-straightforward additions. There are plenty of hard-sync topics on KVR (even with code samples).
Here is nice HS explanation by mystran. Can't do better :tu:

Post Reply

Return to “DSP and Plugin Development”