PolyBLEP Hard Sync Sawtooth Oscillator
- u-he
- 28065 posts since 8 Aug, 2002 from Berlin
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
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
- u-he
- 28065 posts since 8 Aug, 2002 from Berlin
It'll be moment of wrap for both of them.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?
-
- KVRian
- 631 posts since 21 Jun, 2013
Of course not.Dreamwalk wrote:Any idea how to make a PolyBLEP hard-sync sawtooth oscillator?
Osc1_phase< osc1_increment -> osc2_phase=0 ? Bandlimited?
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.
-
- KVRer
- Topic Starter
- 3 posts since 23 Jun, 2014
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...
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.
-
- KVRian
- 631 posts since 21 Jun, 2013
Yes, i made a mistake (while looking in the code) . This one is correct.Dreamwalk wrote:I try to implement your ideas, but without any success ( probably doing something wrong).
But I found:
phase2 = phase1 * phasor2 / phasor1;
-
- KVRer
- 7 posts since 1 Nov, 2007
Hi 2Dat,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.
I realised this. But what is this trickery you speak of? Could you share? Thanks.
-
- KVRian
- 631 posts since 21 Jun, 2013
Definetly not a trickery, but some non-straightforward additions. There are plenty of hard-sync topics on KVR (even with code samples).lppier wrote:
Hi 2Dat,
I realised this. But what is this trickery you speak of? Could you share? Thanks.
Here is nice HS explanation by mystran. Can't do better