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
      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
                                    • Dan KorneffD
                                      Dan Korneff @lalalandsynth
                                      last edited by

                                      @lalalandsynth check the script watch table. Is your array properly populated?

                                      Dan Korneff - Producer / Mixer / Audio Nerd

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

                                        @lalalandsynth also, check your spelling. I see you have bx 15 for 0 and 1, and bx15 for 2 and 3

                                        Dan Korneff - Producer / Mixer / Audio Nerd

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

                                          You were right about the spelling ! hehe
                                          Still will not load the first one irs[0] = "Akg BX 15 1 Convert.wav";
                                          The Array is populated and shows the first one .

                                          EDIT: Changed the name of the actual wave file from AKG BX 15 to AKG BX15 and then its loaded !

                                          Thanks mate !

                                          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:

                                            You were right about the spelling ! hehe

                                            It's always something silly

                                            Dan Korneff - Producer / Mixer / Audio Nerd

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

                                            45

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.9k

                                            Posts