HISE Logo Forum
    • Categories
    • Register
    • Login

    Loops in realtime callbacks

    Scheduled Pinned Locked Moved Scripting
    5 Posts 2 Posters 415 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.
    • d.healeyD
      d.healey
      last edited by

      Is it ever acceptable?

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

      1 Reply Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        In terms of predictability yes, there‘s nothing in a loop that allocates.

        However if your algorithm is mainly based on looping in the realtime callback you might think about another way to achieve the same result.

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

          I think I've managed to separate out the logic so the loops are now in a deferred script. I feel clean again :p

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

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

            @Christoph-Hart said in Loops in realtime callbacks:

            there‘s nothing in a loop that allocates.

            What about the counter variable in a for loop?

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

            1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart
              last edited by

              nope, still not allocating :)

              It's known at the compilation that the counter will be needed so it's allocated during that phase.

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

              19

              Online

              1.7k

              Users

              11.8k

              Topics

              102.6k

              Posts