HISE Logo Forum
    • Categories
    • Register
    • Login

    I made a boo boo. Renamed components. How would you deal?

    Scheduled Pinned Locked Moved Scripting
    11 Posts 4 Posters 444 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.
    • Matt_SFM
      Matt_SF @Dan Korneff
      last edited by

      @Dan-Korneff You mean that the parameters are not properly recalled when loading/switching presets? In that case you could use mass find/replace with a text editor like sublime. You can search across multiple files and replace all names at once...

      Develop branch
      Win10 & VS17 / Ventura & Xcode 14. 3

      Dan KorneffD 1 Reply Last reply Reply Quote 0
      • Dan KorneffD
        Dan Korneff @Matt_SF
        last edited by

        @Matt_SF well, the problem is half of my users are using a version that has a component Input_Level and the other half has Input_Gain, so if I switch back to the old name, the newer users get f&*ked. I need a solution that adds Input_Level back to the project and both Input_Level and Input_Gain controls adjust a single parameter.

        Dan Korneff - Producer / Mixer / Audio Nerd

        DanHD 1 Reply Last reply Reply Quote 0
        • DanHD
          DanH @Dan Korneff
          last edited by

          @Dan-Korneff Is creating a new plugin not an option? Like 'Plug-InName v2'?

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

          Dan KorneffD 1 Reply Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff @DanH
            last edited by

            @DanH I'm currently working on v3 of the plug but it would be nice to have them be backwards compatible.

            Dan Korneff - Producer / Mixer / Audio Nerd

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

              @Dan-Korneff That's what the preset handler pre callback is for

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

              Dan KorneffD 1 Reply Last reply Reply Quote 0
              • Dan KorneffD
                Dan Korneff @d.healey
                last edited by

                @d-healey That would fix initial recall settings, but what if they automated the parameter?

                Dan Korneff - Producer / Mixer / Audio Nerd

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

                  @Dan-Korneff automation handler perhaps

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

                  1 Reply Last reply Reply Quote 0
                  • Dan KorneffD
                    Dan Korneff
                    last edited by

                    This seems to work:

                    const var InputTrimKnobs = [
                        Content.getComponent("Input Trim"),
                        Content.getComponent("Input")
                    ];
                    
                    const var InputLevel = Synth.getEffect("InputLevel");
                    
                    inline function inputTrimFunction(component, value)
                    {
                        // Determine knob index
                        local index = InputTrimKnobs.indexOf(component);
                    
                        // component array index will be 0 or 1
                        if (index != -1)
                        {
                            // Set the gain of InputLevel to the changed knob's value
                            InputLevel.setAttribute(InputLevel.Gain, value);
                    
                            // Update the other knob to match
                            InputTrimKnobs[1 - index].setValue(value);
                        }
                    
                    };
                    
                    for (itk in InputTrimKnobs)
                        itk.setControlCallback(inputTrimFunction);
                    

                    It creates a new automation lane for the additional knob, but I think I can live with that.

                    Dan Korneff - Producer / Mixer / Audio Nerd

                    DanHD 1 Reply Last reply Reply Quote 0
                    • DanHD
                      DanH @Dan Korneff
                      last edited by

                      @Dan-Korneff What if the new automation lane means that existing automation lanes no longer match in existing DAW projects? I find it shunts the list dow one, so existing automation ends up controlling something else..

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

                      Dan KorneffD 1 Reply Last reply Reply Quote 0
                      • Dan KorneffD
                        Dan Korneff @DanH
                        last edited by

                        @DanH In my testing, the original lane it tied to the old parameter "Input" and a new lane is created for "Input Trim" and vice versa.

                        Dan Korneff - Producer / Mixer / Audio Nerd

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

                        53

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.8k

                        Posts