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

Solved listener not called if more than 2 instrument instances opened

Discussion in 'Scripting Workshop' started by mindblower23!, Nov 2, 2021.

  1. mindblower23!

    mindblower23! NI Product Owner

    Messages:
    40
    I have a listener that works like a game loop to animate some graphics. It works great, but from the third instance of my instrument on that I open in Kontakt, the on listener callback is not executed at all ... Is there some kind of limitation to be aware of? Unfortunately I can't find anything related in the manual ...

    Code:
    on init
      set_listener(NI_SIGNAL_TIMER_MS, 30)
    end on
    
    on listener
      // do some animation stuff
    end on
     
  2. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    That is a really fast listener. If you wanted 30 FPS you should set it to 1000000/30 = 33333.
     
    • Like Like x 1
  3. mindblower23!

    mindblower23! NI Product Owner

    Messages:
    40
    Ah!! It's microseconds not milliseconds! Changing it had also a very positiv impact on the cpu usage ... ;)

    Thanks ED! :)