HISE Logo Forum
    • Categories
    • Register
    • Login

    selecting files using a slider

    Scheduled Pinned Locked Moved General Questions
    29 Posts 5 Posters 1.5k 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.
    • d.healeyD
      d.healey @Jay
      last edited by

      @Jay Which part don't you know how to?

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

      JayJ 1 Reply Last reply Reply Quote 0
      • JayJ
        Jay @d.healey
        last edited by

        @d-healey place the files in an array and in the callback

        Joansi Villalona

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

          @Jay

          To put the file names in an array. First create an array, something like const var irs = [];

          Then add each file name to the array:

          irs[0 = "church";
          irs[1] = "hall";
          irs[2] = "pie-shop"
          etc.
          

          Then create a callback for your knob - if you don't know how to do this you need to watch my scripting 101 video.

          In the callback you can load the IR. Instructions are in the docs. The basic command is ConvolutionReverb1.setFile("{PROJECT_FOLDER}impulse.wav"); Just replace the word impulse with the name of your array, and use the your knob's value as the array index.

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

          JayJ 1 Reply Last reply Reply Quote 1
          • JayJ
            Jay @d.healey
            last edited by

            @d-healey

            HiseSnippet 1187.3ocuVslaaaDDdorYZsRcPSZN.D5Wx.oJj9QZABLhs0iT03GBVJooHH0cE4JoEZ4tDbW5XEC+u9idZ5In.M2gdB5Mn2f1Y4CQpZlTWAzPAC3cluY1uY1Ylc6EJbIRoHDYr1fYADjwmY1eFWMo4DLki51BYbGyivREIzJQzAyBvRIwCYXrxS0BLVaUT72e9jCvLL2kjKBgdgf5RNj5SU4R6s2ynLVGrGY.0u.5s2qqqf2TvDQ.eVwzFEfcmhGSNFqgUwDYbq1dTkHruBqHR.yABuY8mHdCOA+KnR5PFQuvA0GbThXTyITlWur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MV4C8NKma96rPmJfTOe7QXnIVu8GG42GddmKApW3bBSp2xJ5YhIqsynPeB2KdweAeoJczqMRU5jo7ixd3icCEm4lLsVW98owRf3lGmpWCdkLr1Z9XZSS6F15whzybc0MEeoCBUtMatD1r0RXy1KgM6rD17nkvluZIr4q+f1ney99QJgex.SPPu1wWWZXzligp23A.n+F.7H.BH

            Joansi Villalona

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

              Did you read the docs? The answer is right there in the example. Also irs is an array, so you need to give it an index [] when you use it, it's not a text string.

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

              JayJ 1 Reply Last reply Reply Quote 0
              • JayJ
                Jay @d.healey
                last edited by

                @d-healey I read it but can't get it to work

                Joansi Villalona

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

                  Show me your code that uses the example from the docs and I'll be able to help you more from there.

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

                  JayJ 1 Reply Last reply Reply Quote 0
                  • JayJ
                    Jay @d.healey
                    last edited by

                    @d-healey ```

                    const var ConvolutionReverb = Synth.getAudioSampleProcessor("ConvolutionReverb");
                    Engine.loadAudioFilesIntoPool(); // Load All IR into memory to be pool

                    const var irs = [];

                    irs[0] = "01 Large Ambience.wav";
                    irs[1] = "02 Medium Ambience.wav";
                    irs[2] = "03 Small Ambience.wav";
                    irs[3] = "12 Clear Ambience.wav";
                    irs[4] = "15 Percussion.wav";

                    inline function onKnob1Control(component, value)
                    {
                    ConvolutionReverb.setFile("{PROJECT_FOLDER}irs[0]");
                    };
                    Content.getComponent("Knob1").setControlCallback(onKnob1Control);

                    Joansi Villalona

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

                      Looks like you're nearly there.

                      This line ConvolutionReverb.setFile("{PROJECT_FOLDER}irs[0]");

                      You are only loading impulse number 0. You need to load the impulse selected by the knob, which you can get from the value parameter of the callback. So swap irs[0] for irs[value] You also need to concatenate the ir name onto the end of the string because the array cannot be part of the string.

                      So the final line should look something like this: ConvolutionReverb.setFile("{PROJECT_FOLDER}"+irs[value]);

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

                      JayJ 2 Replies Last reply Reply Quote 0
                      • JayJ
                        Jay @d.healey
                        last edited by

                        @d-healey thank you, you're the man

                        Joansi Villalona

                        1 Reply Last reply Reply Quote 1
                        • JayJ
                          Jay @d.healey
                          last edited by

                          @d-healey I put the names in an array, is there a way to display it?

                          Joansi Villalona

                          JayJ 1 Reply Last reply Reply Quote 0
                          • JayJ
                            Jay @Jay
                            last edited by

                            @Jay I figure it out

                            Joansi Villalona

                            JayJ 1 Reply Last reply Reply Quote 0
                            • JayJ
                              Jay @Jay
                              last edited by

                              @d-healey I have an array working fine, but I want to do now is to select anyone in the array and have a certain bottom to be on.

                              ex:
                              if I select 1 from array bottom 1 should do something, but if I select 8, bottom 2 should do something.

                              Joansi Villalona

                              1 Reply Last reply Reply Quote 0
                              • lalalandsynthL
                                lalalandsynth
                                last edited by

                                Question on this ..
                                The PROJECT FOLDER is AUDIOFILES folder , but what if the user has to install the impulses in a folder of his choosing , will that still apply ?

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

                                  @lalalandsynth Impulses are embedded in the plugin aren't they?

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

                                  1 Reply Last reply Reply Quote 0
                                  • lalalandsynthL
                                    lalalandsynth
                                    last edited by lalalandsynth

                                    yes, unless they go over over 50 mb with graphics right ?
                                    I was under the assumption that if they went over 50mb with graphics you would have to install them seperately?

                                    1 Reply Last reply Reply Quote 0
                                    • lalalandsynthL
                                      lalalandsynth
                                      last edited by

                                      This post is deleted!
                                      1 Reply Last reply Reply Quote 0
                                      • lalalandsynthL
                                        lalalandsynth
                                        last edited by lalalandsynth

                                        So I am using this code with a knob, knob set to discrete min 0 , max 2.
                                        It seems to only load the AKG BX15 2.wav when the knob is at max ?
                                        So , ignoring 0 and 1

                                        If I add an impulse , total 4 , set the max on the knob to 3 it will load the fourth one.
                                        So it leaves out the first 2 ?
                                        What am i missing here ?

                                        const var ConvolutionReverb1 = Synth.getAudioSampleProcessor("Convolution Reverb1");
                                        Engine.loadAudioFilesIntoPool(); // Load All IR into memory to be pool
                                        
                                        const var irs = [];
                                        
                                        irs[0] = "Akg BX 15 1 Convert.wav";
                                        irs[1] = "Akg BX 15 1.wav";
                                        irs[2] = "AKG BX15 2.wav";
                                        
                                        
                                        inline function onKnob1Control(component, value)
                                        {
                                        ConvolutionReverb1.setFile("{PROJECT_FOLDER}"+irs[value]);
                                        };
                                        Content.getComponent("Knob1").setControlCallback(onKnob1Control);
                                        
                                        Dan KorneffD 1 Reply Last reply Reply Quote 0
                                        • Dan KorneffD
                                          Dan Korneff @lalalandsynth
                                          last edited by

                                          @lalalandsynth said in selecting files using a slider:

                                          It seems to only load the AKG BX15 2.wav when the knob is at max ?
                                          So , ignoring 0 and 1

                                          That seems correct. When the knob is at max (2) it will load the file from your array in slot [2].
                                          What are you wanting the outcome to be?

                                          Dan Korneff - Producer / Mixer / Audio Nerd

                                          1 Reply Last reply Reply Quote 0
                                          • lalalandsynthL
                                            lalalandsynth
                                            last edited by lalalandsynth

                                            But it does not load 0 and 1 , the impulse window is empty until it loads slot 2
                                            load.gif

                                            Dan KorneffD 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            35

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            102.0k

                                            Posts