Simple counter

gentleclockdivider
gentleclockdivider Member Posts: 79 Sine

Turning the dial increments the value by 1, because of the feedback loop

WHy is it not working when replacing it with SR.C?


Comments

  • gentleclockdivider
    gentleclockdivider Member Posts: 79 Sine

    edit ..forget to set signal mod to audio for the outlet

    All good

  • colB
    colB Member Posts: 355 Saw

    Those orange coloured wires are a warning. They tell you that Reaktor is adding in a unit delay 'somewhere' in that loop. When using OBC, there is no need for this, just swap the order of the read and write modules, and you control where the unit delay is - that way you know for sure exactly what is going on :)

  • gentleclockdivider
    gentleclockdivider Member Posts: 79 Sine

    I am verry well aware that the orange lines indicate a feedback loop , because that's exactly what I wanted to do ->Creating a simple counter based on feedback <--

    The error I got was because the outlet was not set to audio

  • colB
    colB Member Posts: 355 Saw

    The error I got was because the outlet was not set to audio

    I understand that, I was just pointing out a problem with implicit feedback loops. Apologies for being preachy about it :)

    Here's a bit from the manual:


    The point I'm making is that there is a more controlled way to implement a feedback loop using OBC. In this particular example the implicit unit delay doesn't change the functionality unexpectedly, but in general there are no guarantees. Makes sense to get into good habits IMO.

    e.g. with orange feedback, it's possible that some more complex code might work now, but then in some future version of Reaktor stop working correctly because the compiler chooses a different position for the implicit unit delay, or a different number of unit delays in the loop!

    It's always possible to rewrite code to remove all implicit feedback.

    Your version:

    Can be re-written like this:

    This is functionally identical, but there are no orange wires, the feedback including the (now explicit) unit delay is contained within the OBC!

    Another alternative would be:

    Here the feedback is contained within the OBC of the Latch[-1] module, so again no orange warning

Back To Top