HISE Logo Forum
    • Categories
    • Register
    • Login

    Impulse Response File switching?

    Scheduled Pinned Locked Moved General Questions
    15 Posts 5 Posters 475 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.
    • CyberGenC
      CyberGen
      last edited by

      Hi,

      I'm currently working on a project involving a convolution reverb, I need a little help implementing a combo box that allows the user to switch between different IR files for the Convolution Reverb.

      I'm seeking guidance on the best approach to achieve this feature.

      cheers.

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

        @RastaChess This is how I'm doing it in Sordina - https://github.com/davidhealey/sordina/blob/master/Scripts/ScriptProcessors/sordina/Interface.js#L131

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

        CyberGenC DanHD 2 Replies Last reply Reply Quote 0
        • CyberGenC
          CyberGen @d.healey
          last edited by

          @d-healey Thank you, I'll try to figure it out from your example. :anxious_face_with_sweat:

          1 Reply Last reply Reply Quote 0
          • DanHD
            DanH @d.healey
            last edited by

            @d-healey Hi! I would post a new topic but I can't because the forum has gone weird.

            Anyway the title would have been: Impulse Responses list in ComboBox different in compiled plug-in

            So I have a load of impulse responses loaded into a Convolution Reverb module, and a ComboBox for the user to select the one they want. In the project the list is alphabetical but in the exported plugin one of the entries (Fender Twin) has jumped to the top of the list. Here's my code and images below... Any help much appreciated!

            //Combo box IRs
            const irs = Engine.loadAudioFilesIntoPool();
            
            const CabinetType = Synth.getAudioSampleProcessor("Cabinet Type");
            
            //cmbIr
            const cmbIr = Content.getComponent("cmbIr");
            
            inline function oncmbIrControl(component, value)
            {
            	if (value > 0) 
            		CabinetType.setFile(irs[value - 1]);
            };
            
            Content.getComponent("cmbIr").setControlCallback(oncmbIrControl);
            
            cmbIr.set("items", "");
            
            for (x in irs)
            	cmbIr.addItem(x.replace("{PROJECT_FOLDER}cabs/").replace(".wav"));
            
            

            Images:
            in Plug-In -
            Screenshot 2024-11-19 at 13.26.18.png

            in Hise -
            Screenshot 2024-11-19 at 13.24.52.png

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

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

              @DanH What happens if you sort the list of IRs first?

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

              DanHD 1 Reply Last reply Reply Quote 0
              • DanHD
                DanH @d.healey
                last edited by

                @d-healey is that just

                irs.sort();
                

                ?

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

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

                  @DanH I think so... I can't remember if that only works for numbers - I made a video about it a while back. There is also sortNatural. Test and see.

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

                  DanHD 1 Reply Last reply Reply Quote 0
                  • DanHD
                    DanH @d.healey
                    last edited by

                    @d-healey .sort() = no joy. Will try natural.

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

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

                      @d.healey no joy there either. It's strange - this is a v2 of a project. v1 didn't have this issue yet the code is identical... Same version of Hise too...

                      I wonder if LAF changes to the combobox itself have made a difference?!

                      Is there a way to force the list settings? i.e create the list as I want it?

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

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

                        @DanH said in Impulse Response File switching?:

                        create the list as I want it?

                        You could add the items one by one with myComboBox.addItem()

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

                        DanHD 1 Reply Last reply Reply Quote 0
                        • DanHD
                          DanH @d.healey
                          last edited by DanH

                          @d-healey thanks, I've renamed the actual file numerically so I'll see if that helps first!

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

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

                            @Christoph-Hart So I'm tentatively going to say that this could be a bug with the Default user Preset system and - in this case - Engine.loadAudioFilesIntoPool / ComboBox callback...

                            I've loaded some impulse responses into the convolution reverb module using Engine.loadAudioFilesIntoPool and used a combobox to select them. All is fine within HISE and Exported Plug-In.

                            However, when I set a specific preset as the Default User Preset in the project settings then whatever value that preset has saved in it for the combobox, it will reorder the array of impulse responses with that saved value at the top of the list. In HISE everything is ok - this only affects the exported plugin / standalone.

                            I tested the Default User Preset setting with different presets and changed the combobox value in those the presets and each time the combobox list would change to reflect this buggy order of putting the Default preset's value at the top of the combobox list.

                            So if the ComboBox list is A, B, C, and the Default User Preset has B saved in it, then when you export the plugin the list will now appear as B, A, C.

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

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

                              @DanH Are you populating the combobox with the list returned from loadAudioSamplesIntoPool()? Because then it might cause a switch in order because the item that's loaded in the default user preset is being loaded before this call.

                              Try sorting the array before passing It to ComboBox.set("items", list.join("\n")) in your onInit.

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

                                @Christoph-Hart Ah that would explain it! Ok will try, thanks!

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

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

                                  Hi!

                                  Is this problem have been solved?
                                  I encountere the same problem with my project.

                                  When I export FX plugin Impulses files are switching.
                                  The file "Room_size1_time1L" number 16 become file number 1

                                  Thanks

                                  Math

                                  See pictures...

                                  HISE PROJECT : OK

                                  Capture1.PNG

                                  VST PLUGIN
                                  Capture2.PNG

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

                                  43

                                  Online

                                  1.7k

                                  Users

                                  11.8k

                                  Topics

                                  103.0k

                                  Posts