Forum

    • Register
    • Login
    • Search
    • Categories

    Loops in realtime callbacks

    Scripting Forum
    2
    5
    314
    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.healey
      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 Hart
        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.healey 1 Reply Last reply Reply Quote 1
        • d.healey
          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 😛

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

          1 Reply Last reply Reply Quote 0
          • d.healey
            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 Hart
              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

              18
              Online

              1.1k
              Users

              7.0k
              Topics

              64.6k
              Posts