1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

Comparing events happening on core and primary levels

Discussion in 'REAKTOR' started by Aleksandr Smirnov, Apr 19, 2009.

Thread Status:
Not open for further replies.
  1. Aleksandr Smirnov

    Aleksandr Smirnov NI Product Owner

    Messages:
    1,539
    Yes, exactly! Strange topic name inspired by very strange thread, but very interesting discussion that was started by Herw.. I've finally (shame on me) started to read Chris part of his great Essential Events manual and was interested in some of its aspects.

    I was wondering if I understand following things correctly.

    Please, take a look at attached picture. Simple operation - sum of two events. I was making little research and made three implementations of above operation:

    1) Primary level - "+" module output
    2) Core level - one event, "+" macro, output
    3) Core level - two events, "+" macro, output

    I had to put Step Filter after knob so it will send only events with new values (is it right in this case with event research - can it be used?).

    Result I got after turning knobs from 0 to 10 (slowly):

    1) 1st and 3rd implementations send same events with same values (order isn't a field of my little research)
    2) 2nd implementation sends sum only

    Okay, that was what I expected (events on core level happen simultaneously comparing with primary - right or no?). But depending on how fast I move knob I get different amount of events, especially on primary level. Why (Control Rate or confused again with this term)? Apologies..

    Then. I added another Step Filter after 1st implementation on primary level with 1 Tolerance level and I got same solution as with core cell in 2nd implementation. Does it mean I have same solution in primary as in core? And again moving knob makes different amount of events.

    Knob has range 0..10 with step 1.


    Aleks ;)
     

    Attached Files:

  2. PIANOPICTURES

    PIANOPICTURES NI Product Owner

    Messages:
    552
    I don't want to say something very special, I dont know core, though I read the core manual. They say, you can make a kind of primary modules from core modules. And so what? I can make an sin oscillator from primary level mathematical modules... For me it is two different but same systems in one universe. I don't understand well.
     
  3. herw

    herw NI Product Owner

    Messages:
    6,421
    • Adding the step filter is only a temporary and special solution (with tolerance 1) because the knob changes its values with stepwidth 1. So that's not a general solution.
    • Moving a knob slowly or quickly is different because the panel doesn't recognize every quickness; i think any panel element has a precision of only 25Hz.
      Try out any knob (f.i. range 0 ... 1000, stepwidth 1) and add an eventwatcher. Now change values quickly or slowly and have a look to the recognized events.
      That was a problem in my modular with mouse areas so i added a "brake".
    • events on core level happen simultaneously when they came from same source event.

    ---
    no - core is another world but is able to communicate with primary which means that core has an interface to get and send event and audio signals. Inside of core there is no difference between audio and normal events only where they come from primary: normal events are wandering like bubbles in a pipe (CList's expression) and audio events are sample-rate-clocked.

    ciao herw
     
  4. Horuschild

    Horuschild NI Product Owner

    Messages:
    1,635
    I feel a bit stupid here, I looked several time at the example that Herw gave in the other thread and looked here again at this one. I don't get. What am I supposed to be seeing? Sorry but it’s not obvious to me today for some reason.
     
  5. Aleksandr Smirnov

    Aleksandr Smirnov NI Product Owner

    Messages:
    1,539
    Yes, that was exactly like I felt when I first got into it, that's why I made this thread. It's about that events in core happen simultaneously at the same time (jeez I hate this word, was never able to write it correctly) if they come from one source, however in primary level it is not true. And if you build my example in this thread you'll see that when you move knob from 1 to 2 in "+" module on primary level there will be two events with values 3 and 4, but in core cell with one source event you'll get straight 4. I hope I got it right.

    EDIT: See Nicolaas post for better explanation.
     
  6. Pandas

    Pandas NI Product Owner

    Messages:
    305
    If you use the primary add module, you'll get two events, because the maths modules generate an output event for every input event. Hence, if you send the same value to several inputs of the same math module, it will output more values. For instance, the current value of the knob is 0, so the output of the math module is 0. You change the knob value to 1. The math value will receive the 1 in its first input, and output 1 because 0+1=1. Then it will receive it in its second output, and output 2 because 1+1=2.

    In Core, when sending the event in through one input, the events arriving at the inputs of the Core Add module (coming from the same input) will be processed simultaneously by the two inputs, and you'll get just 2 at the output.

    On the other hand, when sending it in through two inputs from primary, you'll get two events with a defined order in the Core layer (because they are tied to the primary non-simultaneous paradigm), and hence there will be two output events, as in primary.

    Hope this helps,

    Nicolaas
     
  7. Aleksandr Smirnov

    Aleksandr Smirnov NI Product Owner

    Messages:
    1,539
    BTW, what is the best and last version of Event Watcher?
     
  8. Horuschild

    Horuschild NI Product Owner

    Messages:
    1,635
    OK :D I get it now.
     
  9. CList

    CList Moderator

    Messages:
    3,299
    This is a good explanation. Here are some other ways of thinking of it....
    1. a core cell can only generate one event at it's output each time it is "triggered". An event core cell is triggered each time it receives an event at any of it's inputs. For this reason you could never create a module like the Iterator module using core; because the core cell could not generate the stream of events in response to a single incoming event while the primary-layer iterator module can.

    2. Any time events *within* the core structure are split and merged only one event will be produced at the output of the merge. So a structure like the one below will have the counter value go up by one for each event received. If you did the same thing in primary it would go up by two, because in primary splitting a signal path creates an event for each branch of the split. Core, OTOH, does not create new events, instead it evaluates all paths of the split simultaneously and produces a single result at the output of the merge.

    Cheers,
    CList
     

    Attached Files:

  10. CList

    CList Moderator

    Messages:
    3,299
    BTW, using the step filters will only confuse you in your tests; best to do things as simply as possible and check out the raw events.

    Cheers,
    CList
     
  11. Aleksandr Smirnov

    Aleksandr Smirnov NI Product Owner

    Messages:
    1,539
    Yes, but what can be done with button speed? I mean it sends series of events.

    And thanks for your replies and explanations Chris!
     
  12. CList

    CList Moderator

    Messages:
    3,299
    You could use a button in trigger mode, which would just send one event when you click it, or use the keyboard up/down arrows to change the knob position. It just seems to me that once you start filtering out events you really don;t know what's happening.

    Cheers,
    Chris
     
  13. PeterW

    PeterW NI Product Owner

    Messages:
    182
    I have found that if the Mouse Resolution is set too high for a Knob then it will send multiple events when adjusted with the mouse. In this case the resolution is set to 6 and multiple events are sent. Reducing the mouse resolution to 5 prevents multiple events with the same value in this ensemble. Try setting the Mouse resolution to 127 and then see how many more duplicate value events are fired. Putting a Step filter after the Knob should have no ill effects if the Tolerance input is set to 0 in this case.
     

    Attached Files:

  14. Aleksandr Smirnov

    Aleksandr Smirnov NI Product Owner

    Messages:
    1,539
    Yes, I was messing with Mouse Resolution and I get less events when resolution is lower, however I thought using Step Filter in this situation won't affect events watching.. Would be better to check it with button next time.

    Thanks for replies!
     
Thread Status:
Not open for further replies.