Who knows the most about the sine bank? (Additive Synth issue)

Michael O'Hagan
Michael O'Hagan Member Posts: 93 Helper
edited May 2023 in Building With Reaktor

I'm working on a new additive synth and I'm using the sine bank module, it is a system where there are multiple selectable harmonic modifiers.


Most of them work great, but one of them is giving me an issue, it's called the stack module.



whenever I activate or deactivate this module is causes an issue with the harmonic phase alignment.


Let's say I load a saw wave and press a midi key, it plays the saw wave properly and in proper phase, no problems.


Then I activate the stack module and it has all the phases out of wack and I have to play each of the 8 voices until they become properly aligned.


then I turn of the stack module and it needs to be played through the 8 voices again before the phases align properly.


after activating or de activating the stack module the phase alignment of each voice will only update on the second playing of each voice and I can't figure out why.


Has anyone experienced any issues like this before, I scratching my head trying to figure out whats wrong.


The sine bank module will update ratio's and amplitudes with an apply value of 0, but it only resets phase positions with an apply value of 1, which it's getting, every new note send a 1 value to the app port like it's supposed to, but it's still not responding properly with this one module.


I'm kinda at a loss on how to fix this one.

Comments

  • colB
    colB Member Posts: 762 Guru

    Just wasted a bunch of time watching half of a vid that seems like a demo of your half finished synth.

    If you want help, please post actual broken code that you want help with!

    If you are worried about protecting IP, then create a reduced version that demonstrates just the broken part.

  • Paule
    Paule Member Posts: 1,328 Expert
    edited May 2023

    @errorsmith the coder of Razor

    He is part of the forum. Michael go in conversation with him, please.

  • Michael O'Hagan
    Michael O'Hagan Member Posts: 93 Helper
    edited May 2023


    A one minute segment that shows the functionality of the module I'm working on is a "Bunch of time".


    Over the lasy year or two you've become more and more abrasive in your attitude, I just wanted to show what I was working on and ask if there were any known issues relating to phase reset in with the sine bank as I'm getting some strange behaviors.

  • Michael O'Hagan
    Michael O'Hagan Member Posts: 93 Helper
    edited May 2023

    I figured out whats wrong, I'm leaving this answer here for anyone who needs it in the future.


    This is what the manual says...


    • "▪ (App) “App” (apply) is the Event input port for applying the latest parameter values that have arrived at the various input ports to the actual oscillators inside the Sine Bank Module. The parameter values sent to the Sine Bank Module are stored in a tem­porary buffer and only applied to the partials once an Event arrives at the “App” input port.
    • If the value of the Event is greater than zero, the apply operation also applies the latest values that have been sent to the “Ph” input port and forces the smoothers to jump to the values of the corresponding partial amplitude parameters. Thus, a positive valued Event at the “App” input port works like a “reset”. If the “apply” Event is less or equal to zero, all new parameters except the phase are applied.

    Now this description would lead one to believe that the apply event needed to be sent at the end of the partial iteration data, as in, set the index, ratio, phase and amp of partials 1-N and then send an apply value of 1 to reset the oscillator to the new waveform, but that's not how it works.


    I looked at Lazerbass and Razor using the ACEW event watcher from Mark Wadewitz and noticed that both of them sent the apply value of 1 along with the first index entry. So I gave it a try and everything works properly now.


    If you send the apply value of 1 at index 256 it will be ignored until the next note trigger.


    This behavior seems counter intuitive, normally you would think that you would set all the necessary data, index, ratio, phase and amp, and then apply those settings at the end, but it just doesn't work that way.


    So if anyone needs this info in the future, an apply value of 0 or less will update amplitude and ratio, an apply value of 1 will reset the phases of each partial to reset to a new waveform, but for some reason the apply value 1 needs to be sent with the first index entry of 1, not the last index entry like you would normally think.

  • colB
    colB Member Posts: 762 Guru
    edited May 2023


    yep, abrasive is a fair assessment

    If you want help with broken code, please post the code!

  • Michael O'Hagan
    Michael O'Hagan Member Posts: 93 Helper


    When I don't have a clue what part of the code is broken that becomes a little difficult, hence my asking about general experience and knowledge of the sine bank module.

  • colB
    colB Member Posts: 762 Guru

    That's always a thing though. Almost everyone who is asking for help is in the same situation. That's why posting the actual code (ensemble/instrument/macro) is always better than posting a pic - the pic is so often the wrong thing, or there is too much context missing.

    If you don't want to post something commercial, that's understandable, but that's not really a problem. The best way to debug something like this is to try and isolate it anyway, so try to build as small an example as possible that still exhibits the problem. Then if you still cant solve it (you most likely can), that is something that can be posted without worrying.

    My project folders are full of little side ensembles where I have built little test rigs to work out these sorts of problems. Much easier than trying to do it inside a large ensemble anyway - you can hack away without danger of breaking something else and forgetting to revert it to its original form.

Back To Top