HISE Logo Forum
    • Categories
    • Register
    • Login

    Best Place For Real-Time Functions?

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 209 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      ericchesek
      last edited by ericchesek

      I'm getting acquainted with the fast and slow thread workflow. From my understanding, On Init callbacks are always slow thread, and On Note callbacks are fast thread unless the callback is deferred.

      If I want to define a function somewhere that will be called in a fast-thread On Note callback, what is the recommended location for that function? In a new script processor's On Init callback? I would think that puts the mentioned function in the slow thread though...

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        All functions are defined in on init. Your main interface script should almost always be deferred. So the answer is to put it in another script (midi processor) that isn't deferred.

        If the function is called from on init then it will be in the slow thread, if it's called from on note on (for example) then it will be on the fast thread.

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        E 1 Reply Last reply Reply Quote 2
        • E
          ericchesek @d.healey
          last edited by

          @d-healey Ohhh okay, that clears up a lot of confusion. Thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          31

          Online

          1.7k

          Users

          11.8k

          Topics

          102.7k

          Posts