create BiSaw Sync in Reaktor 5.6 (not Blocks)

Discussion in 'REAKTOR' started by TheTick, Jan 13, 2020.

  1. TheTick

    TheTick NI Product Owner

    Messages:
    104
    Hello All,
    I have a need to create a BiSaw with Sync and Phase in Reaktor 5.6. I have tried using 2 Saw Sync Oscillators - one inverted and using a selector switch to go between positive and negative sawtooth waves but I cannot get the flatline that the BiSaw oscillator provides.
    Just wondering if anyone has a BiSaw with Phase Sync and PW or any hints on how to make one myself?
    Thanks!
    upload_2020-1-13_7-39-30.png
     
  2. Moshe B

    Moshe B NI Product Owner

    Messages:
    118
    try this its not behave exactly like the primary biSaw but it should do. you can also use an sync Impulse oscillator for the oscillator synchronization if you like
    biSaw.png
     
  3. TheTick

    TheTick NI Product Owner

    Messages:
    104
    Super Cool - thx Moshe - I will give that a try tonight.
    Huge thanks for the quick reply!

    TT
     
  4. Moshe B

    Moshe B NI Product Owner

    Messages:
    118
    you welcome. try to play with the architecture and values maybe you'll find better configuration that behave just like the biSaw
     
  5. TheTick

    TheTick NI Product Owner

    Messages:
    104
    Hey Moshe - I played with it a while yesterday and it is kind of the same thing I had built using an inverted saw sync and a Selector to shift between the 2. I was hoping to get that flatline and sharp saw spike - so if other humans are reading this and have a suggestion - I would be grateful - but otherwise Moshe - I think this will do for now...cheers!
    TT
     
  6. colB

    colB NI Product Owner

    Messages:
    3,069
    I think the sensible way to do this would be to build a new oscillator that goes through the stages and inserts bleps at the correct moments. It's not so tricky because it's only ths scaling of the bleps that will be different to a normal saw, and they will be 50%, so easy enough. (EDIT: maybe not so easy, because you need to mix in blamps with the bleps to get it right, and the scaling for them is a bit trickier)
    So really the only novel thing is to do a kind of state flip/flop between saw and flat line.
    The original Primary version isn't even anti-aliased, which should be pretty easy to implement.
    Of course these things always get more complex when you bring sync into the mix, but there are plenty of resources on building blep based oscillators, and building a 'naive' aliasing one shouldn't be a huge challenge really? At least once you've accepted that you have to build it from scratch...
     
    Last edited: Jan 14, 2020
  7. colB

    colB NI Product Owner

    Messages:
    3,069
    If you can persuade me of the value of a bi-saw (what is the point of it?) then I might make one...
     
  8. colB

    colB NI Product Owner

    Messages:
    3,069
    After thinking about the implementation, I just ended up building it because it really is very simple.

    The core of the oscillator is a basic phase ramp with some simple modification:
    bisaw.PNG

    w is the width of the ramp section normalised to a range from 0 to 1.
    Instead of outputting the raw ramp, I test if the phase is greater than w, and if so, output 0.5 (it's unipolar at this stage, at the output, this will become a zero level). If the phase is less than w, it means we are still in the ramp part of the waveform, this is the raw phase value scaled so that 0..w becomes 0..1, so it's just multiplying by the reciprocal of w.

    And after converting the output from unipolar to bipolar, that's really all there is to it.

    The only puzzle really was how to match the Primary version's input mapping. That's in the supporting code at a slightly higher level. Initially, I just had a linear control from 0..1, but that's not what the Primary one does. It turns out that it uses 1/1+w where w is in the range 0..n, the default max being 6. This works pretty well.

    I stuck some smoothing in there, a phase offset (to match the primary one, my implementation needs it's starting phase to be 0.25), and sync which takes an audio input and resets the phase to the value at the ph input when there is a positive zero crossing. There's also an optional high pass filter which is a trick borrowed from early Roland VA synths to counteract aliasing artefacts that are below the fundamental (helps a lot on higher notes).

    Creating an anti-aliased version of this would be tricky, particularly with the combination of sync and variable start phase. It's definitely achievable, but would be a few days work at least... and wouldn't be a syncable clone of the Primary module anyway ;)

    Side by side on a scope and using a listening test, this version seems pretty much identical to the Primary one. It doesn't seem to be when you difference the outputs though, not sure why yet.

    See what you think anyway.

    EDIT: the Primary version starts its cycle halfway through the ramp part of the wave where the ramp crosses zero (I'm starting at the beginning of the ramp). That means that the starting phase - with respect to the complete waveform - of the Primary version changes depending on the pulsewidth setting.
     

    Attached Files:

    Last edited: Jan 15, 2020
    • Like Like x 2
  9. TheTick

    TheTick NI Product Owner

    Messages:
    104
    Whoa! colB ....I just got out of a meeting and saw all of this. Thanks for putting in the work - it will take me a while to digest all of it but just an inital "Thanks!"cfor doing this....

    TT
     
  10. TheTick

    TheTick NI Product Owner

    Messages:
    104
    Sorry - quick question. I am translating this diagram to Reaktor 5.9 - I do not have Reaktor 6.
    (I cannot use your attachment as Reaktor says it was made in a different version and will not open).
    The only symbol I cannot see in Reaktor Core is this one:
    upload_2020-1-15_13-33-46.png
    Is that "greater than or equal to"? Thanks!
     
  11. colB

    colB NI Product Owner

    Messages:
    3,069
    yes.

    Here's the wrapper that handles the pw mapping and other housekeeping. You'll have to find a R5.9 alternative to the smoother an the XR gate on the high pass. Or just don't put them in...
    The circled macro is the one from the earlier pic.
    bi saw 2.PNG
     
    Last edited: Jan 15, 2020
  12. TheTick

    TheTick NI Product Owner

    Messages:
    104
    Ok, I will work on the translation for this to 5.9. Can you tell me where the Amplitude would be in this system?
     
  13. TheTick

    TheTick NI Product Owner

    Messages:
    104
    Good morning,
    Well I have hooked up the original design but have no luck. I get something reading on the meter up top but no sound. When I change a value I hear a click but nothing else and no wave shows up on a scope attached to the output. Did I mess up somewhere?
    upload_2020-1-16_4-29-23.png
    I am feeding a value of 5000 into F - a value of .5 into w and .5 into rst (I have also changed all of those values to other numbers with no luck)
     
  14. colB

    colB NI Product Owner

    Messages:
    3,069
    I suspect that maybe you are sending lots of resets. To check for this, disconnect the OBC write for the reset from the OBC chain, and see if that fixes the problem.
    Maybe post pics of the outer layers as well.
     
  15. TheTick

    TheTick NI Product Owner

    Messages:
    104
    Correct!
    When I disconnected rst from within the Oscillator, it immediately worked and gave me a sound and the correct waveform on the scope!
    So what do we do with the reset?
    upload_2020-1-16_7-49-1.png
    upload_2020-1-16_7-49-31.png
     
  16. Moshe B

    Moshe B NI Product Owner

    Messages:
    118
    you need to put all that code in a macro and than put at the top level core macro the rest of the code for house keeping by colB bi saw 2.PNG
     
  17. TheTick

    TheTick NI Product Owner

    Messages:
    104
    Ok, I will get on that. Thanks for staying with me on this colB...
     
  18. TheTick

    TheTick NI Product Owner

    Messages:
    104
    I am having trouble finding the CR LP 1p in Core - any hints?
     
  19. Catman Dude

    Catman Dude NI Product Owner

    Messages:
    399
    Great education in this post, Colin!
    Read text; study structure; -> thought provoking.
     
  20. TheTick

    TheTick NI Product Owner

    Messages:
    104
    Also, I do not see a Butterworth core filter in 5.9 ...