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

Alternative to switch module

Discussion in 'Building With Reaktor' started by magneson, Aug 4, 2013.

  1. magneson

    magneson Forum Member

    Messages:
    333
    Is there any alternative to the switch module, which turns the signal chain off and reduces load, that can be controlled by input?

    What I would like to do is to attach a separator with a threshold of 0 (or 0.01) to a knob, which again controls the switch so that there is no load when the output from a module is 0.
     
  2. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
  3. magneson

    magneson Forum Member

    Messages:
    333
    Thanks, I'll check it out, but it's primarily for turning on and off chains in a router so I'm not quite sure how to pack it in. Will it still work with only audio through?
     
  4. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    re-reading your problem you can just control a switch with an IC send.
     
  5. magneson

    magneson Forum Member

    Messages:
    333
    Yes, I tried that, but the knob triggers the switch halfways, and it seems like it's not related to the values of the knob.
     
  6. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    compare the knob output to zero and use the greater-than output of that to an IC send controlling the switch.
     
  7. magneson

    magneson Forum Member

    Messages:
    333
    That should do it, but I still can't get it to work. If I understand my Boleean right, when the knob output is larger than 0, this event core cell should output 1, and turn the switch on. It doesen't happen. What is it I'm missing from this now?
     

    Attached Files:

  8. magneson

    magneson Forum Member

    Messages:
    333
    Now I got this to work. I suspect the compare -> router doesn't send an event when it crosses the threshold. Is this acceptably effective, or is it still a waste compared to a potentially working compare -> router solution?
     

    Attached Files:

  9. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    i was talking about a primary compare module, but that should work too. it should be identical in fact.

    i don't what you mean about a router, i never suggested to use one?

    ---

    oh i see, two posts up.

    you need to also send the event to the router. right now the router only receives an event during initialization or during a GRE.

    don't worry about all that though, you got it right.
     
    Last edited: Aug 7, 2013
  10. magneson

    magneson Forum Member

    Messages:
    333
    Must have been living in reaktorland a bit too long, I somehow got the use of the word compare to mean "use a compare module" :p.

    But yes, it seems to work now, went from 22% CPU usage (from Reaktor CPU meter) to between 2-5% depending on the complexity of the pacth. Thanks a lot for the help!
     
  11. Sacha

    Sacha Member

    Messages:
    183
    I know this is quite an old post, but I think the topic is very interesting and I can only find few things online about this. Here is a link to a video that has another alternative to switches or rather turning off modules to save CPU pointed out.



    I would really like to understand the method described above a little better. Would be nice to have a tutorial on that switch by the, think I mentioned it on the ADSR site as well.

    If anyone else can shed some light on how to go about switches, or links to this topic are very welcome.

    I can't understand why NI hasn't addressed this yet.
     
  12. salamanderanagram

    salamanderanagram NI Product Owner

    Messages:
    3,454
    hi sasha, not sure i understand the question.

    the video uses receive modules, which act quite similarly to switches (possibly identical). the only difference is that the connections are virtual (can come from any send module).
     
  13. Sacha

    Sacha Member

    Messages:
    183
    Hi, well I'm quite confused on how I would set up a switch like the core one, core is kinda hard for me I must admit :D
     
  14. herw

    herw NI Product Owner

    Messages:
    6,421
    Hi Sacha,
    if you want to stop audio processing in an audio corecell without any switch you have to stop any SR.C and any audio event.
    on_off.jpg
    Especially you have to look into every core macro whether there is a SR.C inside.

    ciao herw
     
    Last edited: Jul 15, 2014
  15. Sacha

    Sacha Member

    Messages:
    183
    Thanks herw, I see, much appreciated, I should keep stalking those core cells as well, I guess.

    Anyway, way to go for me.