HISE Logo Forum
    • Categories
    • Register
    • Login

    Dynamic reassignment of effect slots

    Scheduled Pinned Locked Moved General Questions
    24 Posts 7 Posters 1.1k 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.
    • Oli UllmannO
      Oli Ullmann @Christoph Hart
      last edited by

      @Christoph-Hart
      Great, thanks for the info. :-)

      1 Reply Last reply Reply Quote 0
      • OrvillainO
        Orvillain
        last edited by

        Does any kind soul have a snippet that demonstrates how to use Engine.addModuleStateToUserPreset???

        Musician - Instrument Designer - Sonic Architect - Creative Product Owner
        Crafting sound at every level. From strings to signal paths, samples to systems.

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

          @Orvillain

          // In onInit
          Engine.addModuleStateToUserPreset("InsertNameOfModule");
          

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          OrvillainO 1 Reply Last reply Reply Quote 0
          • OrvillainO
            Orvillain @d.healey
            last edited by

            @d-healey So Do I have it right then.... call that function for every module that I want to save to a preset.... save to a preset in the browser..... then when I load it, those things will be recalled both in the module tree and the connected UI parameters, regardless of if saveInPreset is enabled????

            Musician - Instrument Designer - Sonic Architect - Creative Product Owner
            Crafting sound at every level. From strings to signal paths, samples to systems.

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

              @Orvillain It will be recalled to the module tree, not sure about the UI parameters but Christoph seems to indicate that with this dynamic effect slot system that it will be.

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

              1 Reply Last reply Reply Quote 0
              • Oli UllmannO
                Oli Ullmann @Christoph Hart
                last edited by

                @Christoph-Hart
                When I try to follow your advice with a HardcodedMasterFX, I get the following error message:
                Can't store modules with child modules

                Is it not possible to use Engine.addModuleStateToUserPreset with a HardcodedMasterFX?

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

                  those things will be recalled both in the module tree and the connected UI parameters, regardless of if saveInPreset is enabled????

                  It will be recalled to the module tree, not sure about the UI parameters but Christoph seems to indicate that with this dynamic effect slot system that it will be.

                  No UI parameters are not part of the module that is restored with its state so they won't update automatically. But you can call this method after loading a user preset to ensure that all connected sliders are synced to their internal values:

                  https://docs.hise.dev/scripting/scripting-api/userpresethandler/index.html#updateconnectedcomponentsfrommodulestate

                  Is it not possible to use Engine.addModuleStateToUserPreset with a HardcodedMasterFX?

                  Do you have any modulation slots enabled? If yes then this is preventing you from restoring the hardcoded FX because currently you can only restore modules that have no child modules with this function. But I might have to change this to allow it for hardcoded modules as this would be very limiting.

                  Oli UllmannO DanHD 2 Replies Last reply Reply Quote 1
                  • Oli UllmannO
                    Oli Ullmann @Christoph Hart
                    last edited by

                    @Christoph-Hart
                    Ah, okay, that's where the problem lies...
                    Yes, I have enabled modulation slots.

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

                      @Oli-Ullmann Alright this is fixed now - you can call this on modules with child elements now but the child elements will not be modified at all - the rule that rebuilding child elements is dangerous still stands, but this is a valid use case to restore a module without its modulation slots (which are restored by the script modulation matrix anyways).

                      Oli UllmannO 1 Reply Last reply Reply Quote 2
                      • Oli UllmannO
                        Oli Ullmann @Christoph Hart
                        last edited by

                        @Christoph-Hart
                        That's great, thanks! I'll try it out and give feedback if I encounter any problems. Thanks very much! :-)

                        1 Reply Last reply Reply Quote 0
                        • DanHD
                          DanH @Christoph Hart
                          last edited by

                          @Christoph-Hart said in Dynamic reassignment of effect slots:

                          https://docs.hise.dev/scripting/scripting-api/userpresethandler/index.html#updateconnectedcomponentsfrommodulestate

                          What if the controls are not connected by Parameter ID etc but via scripting instead (as lots of mine are as they do more than one job...)

                          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                          https://dhplugins.com/ | https://dcbreaks.com/
                          London, UK

                          1 Reply Last reply Reply Quote 0
                          • HISEnbergH
                            HISEnberg @Christoph Hart
                            last edited by

                            @Christoph-Hart said in Dynamic reassignment of effect slots:

                            Just a small heads up that we have this now:

                            https://docs.hise.dev/tutorials/ui/index.html#draggable-fx-chain

                            I noticed one small anomaly about this example. If you add more effects to the example script, you need to set the panel's saveInPreset to false temporarily to update the JSON effect list, then reenable it again!

                            Sonic Architect && Software Mercenary

                            1 Reply Last reply Reply Quote 0
                            • OrvillainO
                              Orvillain @Christoph Hart
                              last edited by

                              @Christoph-Hart said in Dynamic reassignment of effect slots:

                              Just a small heads up that we have this now:

                              https://docs.hise.dev/tutorials/ui/index.html#draggable-fx-chain

                              As it turns out, that was reasonably easy to add.

                              Musician - Instrument Designer - Sonic Architect - Creative Product Owner
                              Crafting sound at every level. From strings to signal paths, samples to systems.

                              HISEnbergH 1 Reply Last reply Reply Quote 1
                              • HISEnbergH
                                HISEnberg @Orvillain
                                last edited by

                                @Orvillain Agreed so far I am really happy about this! Very simple to use. Need to test it out in some real world examples still!

                                Sonic Architect && Software Mercenary

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

                                21

                                Online

                                2.0k

                                Users

                                12.8k

                                Topics

                                111.1k

                                Posts