Merge module functions.

Studiowaves
Studiowaves Member Posts: 224 Tri
edited February 22 in Building With Reaktor

I'm not sure exactly how the merge is working. This module produces scaled values for midi notes above or below a fixed value.

There are actually two breakpoints. For example, the merge will receive an event if a midi note is above of below the breakpoints. If the note breakpoints are set to 48 for the low and 70 for the high an event in sent to the merge module for any notes above or below the two breakpoints. However if a note is between the two breakpoints like 50 or 55 then no event is sent to the merge. Since the lower input of the merge is open it outputs a 0. So it seems the merge module is detecting an event from the ck distribution module but also from the audio clock.

Notice the open bottom pin on the merge. This works as does the one below it.

This also works.

This is the input of the Lower Keys module.

This is what worries me, if you notice the number 1 on the routers, they are being clocked by the distribution buss labeled ck near the bottom left. I'm worried because there may be a timing conflict if the events appear at the same time as the SR clock. If this happens the merge will output a zero instead of the latched value in one of the 5 output latches.

I tried synchronizing the open merge input with ck distribution buss with no luck so far. The confusing part is not knowing why the merge does not continue to revert to the lower input and continue to output a series of zeros at the SR clock rate. I know it's suppose to work that way during initialization, but why does it output a 0 on key events not being sent? As shown it's currently holding the last note event but will output a 0 after playing a key in the middle of the breakpoints. So it seems an event from the distribution buss has somehow caused the merge module to reinitialize.

In reality the distribution buss is out side this core as shown below.

I do not fully understand the merge module but it most certainly outputs a zero at initialization and will re output a 0 if a key event comes in that does not trigger any of the 5 latches. It's almost like the merge senses both the distribution buss and resets it like an initialization. Once again, it works that way in both of the above cases, one with an open port, or using it attached to the SR.C.

Even stranger is no event is generated even though the output is set to 0 but all keys generating events actually do generate an event.

How does this really work? What is going on with the merge? Tough question I know.

Best Answer

  • colB
    colB Member Posts: 283 Saw
    edited February 24 Answer ✓

    It is exactly as I described - only events at the inputs are passed.

    If an input is left unconnected, then there will be an implicit zero valued event at that input during initialisation, but only during initialisation.

    Leaving an input disconnected is equivalent to having a 'quick' constant with value of zero.

    Pretty sure all this is in the manual

    EDIT:


Answers

  • colB
    colB Member Posts: 283 Saw

    The merge sends events at the inputs to the output.

    If two or more events arrive at inputs simultaneously, the one at the lowest input goes to the output, the others are discarded.

    That is all

  • Studiowaves
    Studiowaves Member Posts: 224 Tri

    What's interesting here is the merge must sense the event from the distribution bus, as no events should be sent to the merge when certain notes are played; so the lowest port sends out a zero because it's open. But why a zero with no associated event. Apparently it rigged to work that way, perhaps during initialization they are setting up things with a 0 value and do not generate an event to trigger things down the line. That's all I can think of.

  • colB
    colB Member Posts: 283 Saw
    edited February 24 Answer ✓

    It is exactly as I described - only events at the inputs are passed.

    If an input is left unconnected, then there will be an implicit zero valued event at that input during initialisation, but only during initialisation.

    Leaving an input disconnected is equivalent to having a 'quick' constant with value of zero.

    Pretty sure all this is in the manual

    EDIT:


  • Studiowaves
    Studiowaves Member Posts: 224 Tri

    I figured it out, the event counter does not count events with a value of zero. This led me to believe no events were being sent to the merge. I looked it over real good and realized a zero value was truly being clocked into the merge which invalidates prior thinking. The real culprit is this, an event counter that somehow doesn't think a zero value has an associated event. In fact, if not for the absolute module before it, it might not count negative values.


  • Studiowaves
    Studiowaves Member Posts: 224 Tri
    edited February 24

    Thanks, I read that a while back but it's a good refresher. Here's a fix for the event counter macro. Adding a constant of 1 following the absolute function works perfect.


  • colB
    colB Member Posts: 283 Saw

    The tool tip for the counter literally says that you need positive events at the inputs. It works exactly as advertised!

    No fix necessary!

  • Studiowaves
    Studiowaves Member Posts: 224 Tri

    No fix is necessary, true, but when you are trying to count events, a zero event is not included. I pulled that module from the search library; using "event counter". It popped up but I did not realized an event with a zero value would be ignored. That's why the merge output had me confused. Added a 1 as above gets it to count any event including 0. There's probably a more suitable event counter, I think this one was designed with something else it mind. Still, thanks for the help on this on the merge, ensuring how it worked led me to look at the counter.

Back To Top