HISE Logo Forum
    • Categories
    • Register
    • Login

    Bypass processing of parts of code in Faust?

    Scheduled Pinned Locked Moved Faust Development
    3 Posts 2 Posters 165 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.
    • A
      aaronventure
      last edited by

      I have an effect in Faust and if I add three svf eqs in a series, the processor usage goes up. I would like to be able to disable this for when these filters are not used. I can set ba.if to check if the gain is != 0, and that reduces the hit a little bit, but it's nowhere near as when the svfs aren't in the chain.

      Ba.if docs say that select2 is strict (always evaluating both branches) -- is there a way to branch based on condition so that it bypasses processing of these eqs entirely when they're not used?

      It would be easy to take things apart and rely on HISE to do the branching in scriptnode as it does that very well, but unfortunately in this case I need all the code in a single .dsp file for Faust.

      @sletz any ideas? Thank you

      1 Reply Last reply Reply Quote 0
      • S
        sletz
        last edited by sletz

        This is the role of the new ondemand primitive, just announced at IFC 24 see: https://www.youtube.com/watch?v=zli5sFc5dlE.

        Not yet in the official Faust release but can be tested in this custom Faust IDE: https://orlarey.github.io/faustide/

        A 1 Reply Last reply Reply Quote 1
        • A
          aaronventure @sletz
          last edited by aaronventure

          @sletz thanks for that!

          the relevant bit is at the end in The Future of Faust. I was curious about the enable primitive and even though it's undocumented, it seems to work!

          1e890d7d-cef7-4bae-a53a-952c78c79d4e-image.png

          It's somewhat limited in usage so looking forward to trying out ondemand.

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

          16

          Online

          1.7k

          Users

          11.8k

          Topics

          102.8k

          Posts