HISE Logo Forum
    • Categories
    • Register
    • Login

    Get Network Name from Hardcoded Master FX

    Scheduled Pinned Locked Moved Solved Scripting
    scriptfxeffect slotnetwork
    10 Posts 3 Posters 605 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.
    • oskarshO
      oskarsh
      last edited by oskarsh

      I have an effect slot which contains a Hardcoded Master FX.
      I save my Hardcoded Master FX by using

      Engine.addModuleStateToUserPreset('Effect Slot1');
      

      This works fine I can restore all states.
      I would like to know which Network is currently loaded inside the Hardcoded Master FX.
      By getting the ID of the effect itself I am only getting 'Hardcoded Master FX'. When opening the preset in a text editor, I can see that the network name is saved (so it can be restored).

      Is there a way I can get the network name from a Hardcoded Master FX module?

      <Processor Type="Hardcoded Master FX" ID="Effect Slot1_Hardcoded Master FX"
                        Bypassed="0" Network="Delay" Time="1.0" Fade="1.0">
      ...
      

      Thanks in advance!

      breathing HISE

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

        @oskarsh Does SlotFX.getCurrentEffectId() work?

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

        1 Reply Last reply Reply Quote 0
        • oskarshO
          oskarsh
          last edited by

          @d-healey just prints Hardcoded Master FX which is technically correct.

          breathing HISE

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

            @oskarsh What about SlotFX.getCurrentEffect()? Does it return the loaded effect from which you can then get the ID?

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

            1 Reply Last reply Reply Quote 0
            • oskarshO
              oskarsh
              last edited by

              @d-healey getting the effect first then the id yields: Effect Slot1_Hardcoded Master FX.

              I feel like this is a special case since the effects were probably designed without having 'sub effects' in mind. I have not yet checked the source code but HISE might be lacking such a function.

              breathing HISE

              1 Reply Last reply Reply Quote 1
              • oskarshO
                oskarsh
                last edited by

                @d-healey also SlotFX.getCurrentEffect().getAttributeId(index); is only returning the parameters that are assigned.

                I think one really cheeky work around would be to define a new parameter inside my ScriptFX named after the Network itself and get it via the getAttributeId(index).

                @Christoph-Hart do you have some insights on this topic?

                breathing HISE

                oskarshO 1 Reply Last reply Reply Quote 0
                • oskarshO
                  oskarsh @oskarsh
                  last edited by oskarsh

                  @oskarsh said in Get Network Name from Hardcoded Master FX:

                  I think one really cheeky workaround would be to define a new parameter inside my ScriptFX named after the Network itself and get it via the getAttributeId(index).

                  This works!
                  I simply named the first parameter which is not connected to anything with my Network name. By using SlotFX.getCurrentEffect().getAttributeId(0) I can get the corresponding network name.

                  This almost felt like rubber duck debugging ^^
                  thanks @d-healey !

                  breathing HISE

                  1 Reply Last reply Reply Quote 0
                  • oskarshO oskarsh marked this topic as a question on
                  • oskarshO oskarsh has marked this topic as solved on
                  • d.healeyD
                    d.healey
                    last edited by

                    A work around but not a good solution

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

                    1 Reply Last reply Reply Quote 0
                    • whoopsydoodleW
                      whoopsydoodle
                      last edited by

                      Is there an update to this in 2025?

                      The solution is hacky and works. I'm just wondering if there is now a "proper" way to do this.

                      oskarshO 1 Reply Last reply Reply Quote 0
                      • oskarshO
                        oskarsh @whoopsydoodle
                        last edited by

                        @whoopsydoodle yes you can get the Hardcoded FX as a Slot FX and use getCurrrenEffectId()

                        breathing HISE

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

                        30

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        102.0k

                        Posts