HISE Logo Forum
    • Categories
    • Register
    • Login

    Order of IR in Combobox not in the same order after export. Am I the only one?

    Scheduled Pinned Locked Moved General Questions
    19 Posts 4 Posters 898 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.
    • marcLabM
      marcLab
      last edited by marcLab

      Here's in the audio file folder :
      ir.gif

      Here's in Hise (right order):
      ir2.gif

      Here's the exported Vsti (strange order)
      ir3.gif

      The order is also different on MAC.

      Any thoughts?

      This is how the combobox is populated with the names :

      // Pool audio files
      const audioFiles = Engine.loadAudioFilesIntoPool();
      
      // Get a list of irs
          const var irs = [];
      
          for (a in audioFiles)
          {
              if (a.indexOf("ir/")) //Impulse responses will be in ir folder
              {
                  var ir = a.substring(a.indexOf("ir/") + 3, a.lastIndexOf("."));
                  irs.push(ir);
              }
          }
      
      // cmbIR
          const var cmbIR = Content.getComponent("cmbIR");
          cmbIR.set("items", irs.join("\n")); // Populate dropdown
      
          inline function oncmbIRControl(component, value)
          {
              local filename = component.getItemText();
              loadIR(filename);
          };
              
          Content.getComponent("cmbIR").setControlCallback(oncmbIRControl);
      
          inline function loadIR(filename)
          {            
              masterIRReverb.setFile("{PROJECT_FOLDER}" + "ir/" + filename + ".wav");
          }
      

      Maybe Engine.loadAudioFilesIntoPool(); is loading the files in a different order, because it's more desorganized on mac?

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

        Yeah I also noticed that juce will sort the file list on Windows alphabetically but not on macOS and this might be the reason for this too.

        marcLabM 2 Replies Last reply Reply Quote 0
        • marcLabM
          marcLab @Christoph Hart
          last edited by

          @Christoph-Hart

          Got this on mac..
          Screen Shot 2021-10-06 at 11.36.04 AM.png

          Screen Shot 2021-10-06 at 11.38.36 AM.png

          1 Reply Last reply Reply Quote 0
          • marcLabM
            marcLab @Christoph Hart
            last edited by

            @Christoph-Hart So it's a problem with JUCE then? I'm not crazy?

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

              You could sort the array yourself ;)

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

              marcLabM 1 Reply Last reply Reply Quote 1
              • marcLabM
                marcLab @d.healey
                last edited by marcLab

                @d-healey Yeah! But the problem is that they also change place when compiling...very strange. I don't get the same result in Hise and in Reaper let's say..so I think something is happening when compiling

                1 Reply Last reply Reply Quote 0
                • marcLabM
                  marcLab
                  last edited by marcLab

                  Technically, .setFile is a path. So I could bypass

                  cmbIR.set("items", irs.join("\n")); // Populate dropdown
                  

                  and add items by hand in the Combobox.

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

                    @marcLab Can't you sort the array before adding it to the combo box

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

                    marcLabM 2 Replies Last reply Reply Quote 1
                    • marcLabM
                      marcLab @d.healey
                      last edited by

                      @d-healey Yep, i'm testing right now.

                      1 Reply Last reply Reply Quote 0
                      • marcLabM
                        marcLab @d.healey
                        last edited by

                        @d-healey Did the trick!

                        d.healeyD 1 Reply Last reply Reply Quote 0
                        • DabDabD
                          DabDab
                          last edited by

                          @marcLab Can you correct the snippet?

                          HiseSnippet 1275.3ocuWstaiSDEdbaLPyRQ6h32nQ4WtP2zD1t.hEDcatrDncaTR1cAQPUSrmjLT6YrFOtsQU8+7Xw6.uH7F.mYrcrca1pRjXspT7bt9ctLmiaeovkFEIjHqsFsHjhr9P6gK3p4slSXbTu1HqOx9XRjhJwIjNbQHIJh5grr17EZBVaUAYd96u+PhOg6RyIgPuVvboGwBXpbp8O3mX99cIdzQrfBRu+A8bE7VBeQLfmMsafBItmQlQeIQK1F1Hq2qiGSIjCUDEMBj4Pg2hgyEWvSj+0rH1Dep9PSzPvPIjQsly785mEqQHjUk94Q9lIQ9mXeLyisjddF3gFF3bMJl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dgJmDLhM4i.+L6VeyXvwxnwCh8jjwo24FejYL+XlD9qodLLJPGw1VZ8CHlaXR3fuPDBkLoJimlPGtW1QqMuqOwr48+SLQCDPEiO6XB7wDZ2+x3fgvW15RglJNm5qudasgdXUx4FYPXHk6YN7OvSJyl5yVoLalw7chOBHtRwotIiQ08nefgBD2bSIYK3eP.NialM8z1tQ8FP52icpqq9lyiahPqVmuXMz4IqgN6uF57z0PmubMz4qVCc956TG8+txyiUhfjop.g9cLawrr5vIP2qYPA5eAtFArt
                          

                          Bollywood Music Producer and Trance Producer.

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

                            @DabDab masterIRReverb hasn't been declared in your script.

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

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

                              @marcLab Did you use array.sort() ?

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

                              marcLabM 1 Reply Last reply Reply Quote 0
                              • DabDabD
                                DabDab @d.healey
                                last edited by

                                @d-healey @marcLab

                                HiseSnippet 1233.3ocuWstaiSDEdbaMrMvJsKhGfQ4WthRZBaW.oUH51bYIPuDkjcADrpZh8jjgNdFqwiaaTUk3m7Xw6.uH7F.mYrcrca1RUjV7ebly0uyk4bbFnj9z3XoB4r83EQTjyG6NZgPOu8bBSf52A47H2ijjf9CQGtHhDGSCPNNa9JCWms2BYe96u8PBmH7oEjPn2HY9ziXgLcA0AG7CLNuGIfNlEVR58OnuuTzVxkI.R1zsIJh3eNYF8DhQrMbQNeP2.lVpFoIZZLxYqCkAKFMWdoHU92vhYS3TygVnQfgRI2SxCLH1PE0dNiGLHOhiQfUFTD+alF+ep6wr.1R5E4gmXYfKznb9vYi6CdsJCulOb34TBdakBum5NxWwhzEbLX6ib6KzT0TBTBJCqTYQ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LJ8bybHLhJBrG9G3IiYKyYmLlsxY9+hOBI9J4Y9oiIM8dOxRAhagMUus6wly3V4SGcca1nIj9CXm46atQ74sPnUqyWrF57r0Pm8WCcd9ZnyWtF57UqgNe88pi4uX7xDsLLcZIPXPW6VJGmtBBz8ZG.f9WPQxpJ1
                                

                                Now ?

                                Bollywood Music Producer and Trance Producer.

                                d.healeyD marcLabM 2 Replies Last reply Reply Quote 0
                                • d.healeyD
                                  d.healey @DabDab
                                  last edited by d.healey

                                  @DabDab setFile isn't a function that effects have - see the docs

                                  6cb2bebd-bd67-4f4a-ad7c-573622f656e2-image.png

                                  You need to grab the reference as an audioSampleProcessor.

                                  e4a3bb6c-d646-4e15-9e29-3c124fa825dd-image.png

                                  Whenever you see a function not found error it means you've either mistyped a function name, or the thing on the left side of the . doesn't have such a function, you can quickly check this by typing the function name into the api browser.

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

                                  DabDabD 1 Reply Last reply Reply Quote 2
                                  • marcLabM
                                    marcLab @d.healey
                                    last edited by marcLab

                                    @d-healey Array.sortNatural();

                                    Array.sort() doesn't sort strings if I'm not mistaking.

                                    1 Reply Last reply Reply Quote 1
                                    • marcLabM
                                      marcLab @DabDab
                                      last edited by

                                      @DabDab

                                      EX:

                                      const masterIRReverb = Synth.getAudioSampleProcessor("masterIRReverb");
                                      
                                       inline function loadIR(filename)
                                          {            
                                              masterIRReverb.setFile("{PROJECT_FOLDER}" + "ir/" + filename + ".wav");
                                          }
                                      
                                      DabDabD 1 Reply Last reply Reply Quote 0
                                      • DabDabD
                                        DabDab @marcLab
                                        last edited by

                                        @marcLab Ok... Got it.. :) Thank you.

                                        Bollywood Music Producer and Trance Producer.

                                        1 Reply Last reply Reply Quote 0
                                        • DabDabD
                                          DabDab @d.healey
                                          last edited by

                                          @d-healey Thanks man :)

                                          Bollywood Music Producer and Trance Producer.

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

                                          35

                                          Online

                                          1.7k

                                          Users

                                          11.7k

                                          Topics

                                          101.9k

                                          Posts