HISE Logo Forum
    • Categories
    • Register
    • Login

    Dynamically adding effects

    Scheduled Pinned Locked Moved Scripting
    8 Posts 2 Posters 1.9k 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.
    • LindonL
      Lindon
      last edited by

      Is there a way to dynamically add effects to containers? I'm trying for a reproduction of :

      set_engine_par($ENGINE_PAR_EFFECT_TYPE,....

      HISE Development for hire.
      www.channelrobot.com

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

        Not yet. Although there is already something similar for modulators: Synth.addModulator(). I'll add the same for effects when I find the time.

        1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon
          last edited by Lindon

          OK that would be great as I cant really (re)build any (existing) products without it...Do you want me to add it to the feature requests?

          HISE Development for hire.
          www.channelrobot.com

          1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon
            last edited by

            Do you want this listed in the Feature Requests?

            HISE Development for hire.
            www.channelrobot.com

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

              No, sorry for not replying. I have it on my TODO list, however it's pretty busy right now. I'll try to add it on the weekend.

              1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon
                last edited by

                Really dont rush THAT much. I'm sure someone else will shout out if they need it this month but I'm stuck in development long-march right now and wont even start a HISE product for a couple of months. As long as its on the to-do this year list that's fine by me.

                HISE Development for hire.
                www.channelrobot.com

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

                  All right, I implemented this in the last commit. You can now:

                  1. Add modulators and effects via Synth.addModulator() / Synth.addEffect(). It returns a script reference to the new module (just like Synth.getEffect()). If there is already a module with the given ID, it will just create a reference to it, so you don't end up duplicating it. You can also specify the position where the effect will get inserted (it is not needed for modulators because multiplication is linear and the order doesn't have any effect.)
                  2. Remove modules via Synth.removeModulator() / Synth.removeEffect() You just pass it a reference to the effect and it will delete the module.
                  3. Export and restore module states via a base64 encoded string using Effect.exportState() / Effect.restoreState(). This also includes child processors (so you can restore internal modulators too).

                  You must not call these methods from the audio thread - but in onInit or onControl it's perfectly fine.

                  This snippet uses a combobox to switch between effects:

                  HiseSnippet 974.3ocuV0kaaaDDdorIfEaUgSQN.D5IY.WYQ6zePBBjsUiKTSjsgogQAZJRVQNxZgI2kX2k1VIvGj7PA5comh9VA5En2f1YIoLohjcsdnQ.Tf67G+1Y9lY2ikh.PoDRh0mc5jDfX8419S35w8FSYbR+umX8E1CnJMHcyEs+jDpRAgDKqU9Ai.q5qRx982c2mFQ4APoHB4LAK.dEKloKk91ceIKJ5.ZHbJKth0OY29ABdOQjHEwyJ1cHIzfKnmCGRMlUylbICtRQr5Xuy1skW3M7c60tc62MbxfsuumWQBRkRfqOCcmXYa8O3OK6WDxzBoulpALlqtuHbh+XwU77O8YLEaXDXV3Q7QLkK9.QTnYyajR5MlEEd7zTnhfQ43xD5J4IzGaOfExtUdYhc8LEtkdTM0ZU69fm2+M75rH3YUAdqlCuGY6GHYI5RMFr8kERuCzkqjT6WqYeIU5phDZO2m6lwbZSCCewnQPft0.QXZDzOT01mEmDAF9xltM8Qyc8ZtoamMdVCGGrlqztSiiODgtJjX35I3ZrpYBXOQ7Pw9hqa0rpMXH77vGLNNMb1ZK2e9G8O5vYByu3LMJJvrGS.olApCjhXisyEu22vw0sISCwplOEg5s390772OAtDjCwUTcpjhN8ZdF8FjMa3bCBDCL1ZdbLJkGnYBtqfenPCGwasgy6cp6biyGqYznEoxrMjhnHPtHslFI483VKdZ7PPtIlliRgL6TWwzAiKTrQCm5nr5ATELCteJJznnNFHkHBZmHYbcqplz9bP2GSXmBWqasgojhlm8WNePBwhKgBJQFUopM2E24t+BywfvnXdFJA5EOCe6FTzMXZ.aClsIx4g0DEjyXpXnf2myzGk.2tNuFNURGxs0tphJqYUklUqVfYkhluykTvhM8vElilpy5fWunWcZOBgEZlZWMARxJ6kSZWeWx7SBv4Ql9UCmt5PJC4uPARolYLPeClTL8jpGBrDSt57fGr9Pg6irO1vpWLdqs.7hIz+uwaw4.MryY1kfcU6C9oOwC8WKGK0sKlYkgi0ry6mlAKmNVBpwEIpc2Ym+p6Qo5jTcUImfzKbfQY17O6tmVimYWZzu28kbXpE+1G9vez8iaJW4gsIWPN9DQplwOe.UKYWimqeXZrOd0g..SwbNDoLm0Wyz7jutiYsAl9.OryzKBTnzyr1pPo2TkeR9Fwz.o3MA4s0lJ1ZYRv8MO6hO0wafgqwBTQarIeDi2c3MAAFVzWgLvE6w1KsG6rzd7jk1iudo83aVZO91k1iu6d7vbQs8R0h37YJDx+BvqferL
                  
                  1 Reply Last reply Reply Quote 1
                  • LindonL
                    Lindon
                    last edited by

                    Nice, well done, and thanks.

                    HISE Development for hire.
                    www.channelrobot.com

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

                    46

                    Online

                    1.7k

                    Users

                    11.7k

                    Topics

                    102.1k

                    Posts