HISE Logo Forum
    • Categories
    • Register
    • Login

    Convolution Samples Dropdown?

    Scheduled Pinned Locked Moved General Questions
    convolutiondropdown
    9 Posts 3 Posters 667 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.
    • StraticahS
      Straticah
      last edited by

      Hey there i was wondering if it is possible to store the sample path in presets to recall them with a dropdown menu.
      I want to give the user 5 reverbs to choose from. Any snippets that show how or if it works?

      thx in advance :)

      building user interfaces in HISE :)
      web: www.vst-design.com

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

        @Straticah The combo box value will be stored with the preset and in the combo box callback you can load the ir

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

        StraticahS 1 Reply Last reply Reply Quote 1
        • StraticahS
          Straticah @d.healey
          last edited by

          @d-healey sounds good, is this how it is done? Or is there a more beginner friendly way since this is from 2018
          https://forum.hise.audio/topic/598/loading-ir-sample-folders?_=1669662047778

          building user interfaces in HISE :)
          web: www.vst-design.com

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

            @Straticah Get an array of the audio files, I think it's Engine.getAudioFileList() (check the API) and use the array to populate the drop down. Use the value (-1) of the drop down as the index to the array to load the file into the effect. I think the function is loadFile()

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

            StraticahS 1 Reply Last reply Reply Quote 1
            • StraticahS
              Straticah @d.healey
              last edited by

              @d-healey rly have no idea but i will read step by step and maybe get somewhere, thanks a lot :)

              building user interfaces in HISE :)
              web: www.vst-design.com

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

                @Straticah

                Step 1: Get array of IRs using that Engine function I mentioned. file system API or Engine.loadAudioFilesIntoPool().

                Step 2: Populate drop down from the array (I think I've shown this in a few videos, basically you're using a loop)

                Step 3: In the combo box callback, load the IR into the effect. You get the IR from the array you got in step 2 and use the value of the combo box as the index (subtract 1 because combo box values start from 1 and arrays start from 0)

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

                1 Reply Last reply Reply Quote 1
                • S
                  Sounddiy @Straticah
                  last edited by Sounddiy

                  @Straticah

                  I created a convolution reverb based from impulse of my lexicon pmc60

                  See picture.
                  https://imgur.com/4HfScBz

                  I Swap my IR with sliders with four positions.

                  Like David healey said I begin with this :

                  const var : convolution FX
                  const var : combobox

                  // Pool audio files
                  const audioFiles = Engine.loadAudioFilesIntoPool();
                  Engine.loadAudioFilesIntoPool();
                  
                  // Reverb effects
                  const reverbs = [];
                  
                  for (i = 0; i < 2; i++)
                  	reverbs.push(Synth.getAudioSampleProcessor("Convolution Reverb" + i));
                  
                  // cmbImpulse
                  const cmbImpulse = [];
                  
                  for (i = 0; i < 2; i++)
                  {
                  	cmbImpulse.push(Content.getComponent("cmbImpulse" + i));
                  	cmbImpulse[i].setControlCallback(oncmbImpulseControl);
                  }
                  
                  inline function oncmbImpulseControl(component, value)
                  {
                  	local index = cmbImpulse.indexOf(component);
                  	reverbs[index].setFile("{PROJECT_FOLDER}" + component.getItemText() + ".aif");
                  }
                  
                  

                  After
                  const var : knobs
                  const var : Filename of IR in audio folder
                  Callback function for each knobs

                  // Panel 4  : size & time parameters for plate
                  
                  const var Knob2 = Content.getComponent("Knob2");
                  const var Knob9 = Content.getComponent("Knob9");
                  const var Knob10 = Content.getComponent("Knob10");
                  const var Knob11 = Content.getComponent("Knob11");
                  
                  const var reverbmap = ["plate_size1_time1 L",
                  "plate_size1_time2 L", "plate_size1_time3 L", "plate_size1_time4 L","plate_size2_time1 L",
                  "plate_size2_time2 L", "plate_size2_time3 L", "plate_size2_time4 L","plate_size3_time1 L",
                  "plate_size3_time2 L", "plate_size3_time3 L", "plate_size3_time4 L","plate_size4_time1 L",
                  "plate_size4_time2 L", "plate_size4_time3 L", "plate_size4_time4 L"];
                  
                  
                  
                  Knob2.setControlCallback(Knob2CB);
                  inline function Knob2CB(control, value)
                  
                  {
                  if (value == 0)
                      {
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(1);
                  cmbImpulse0.changed();
                  
                      }
                      
                  else if (value == 1)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(2);
                  cmbImpulse0.changed();
                  }
                  
                  else if (value == 2)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(3);
                  cmbImpulse0.changed();
                  }
                  
                  else if (value == 3)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(4);
                  cmbImpulse0.changed();
                  }
                  
                  };
                  
                  
                  
                  Knob9.setControlCallback(Knob9CB);
                  inline function Knob9CB(control, value)
                  
                  {
                  if (value == 0)
                      {
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(5);
                  cmbImpulse0.changed();
                  
                      }
                      
                  else if (value == 1)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(6);
                  cmbImpulse0.changed();
                  }
                  
                  else if (value == 2)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(7);
                  cmbImpulse0.changed();
                  }
                  
                  else if (value == 3)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(8);
                  cmbImpulse0.changed();
                  }
                  
                  
                  };
                  
                  
                  Knob10.setControlCallback(Knob10CB);
                  inline function Knob10CB(control, value)
                  
                  {
                  if (value == 0)
                      {
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(9);
                  cmbImpulse0.changed();
                  
                      }
                      
                  else if (value == 1)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(10);
                  cmbImpulse0.changed();
                  }
                  
                  else if (value == 2)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(11);
                  cmbImpulse0.changed();
                  }
                  
                  else if (value == 3)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(12);
                  cmbImpulse0.changed();
                  }
                  
                  
                  };
                  
                  
                  Knob11.setControlCallback(Knob11CB);
                  inline function Knob11CB(control, value)
                  
                  {
                  if (value == 0)
                      {
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(13);
                  cmbImpulse0.changed();
                  
                      }
                      
                  else if (value == 1)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(14);
                  cmbImpulse0.changed();
                  }
                  
                  else if (value == 2)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(15);
                  cmbImpulse0.changed();
                  }
                  
                  else if (value == 3)
                  
                  	{
                  	
                  cmbImpulse0.set("items", reverbmap.join("\n"));
                  cmbImpulse0.setValue(16);
                  cmbImpulse0.changed();
                  }
                  
                  
                  };
                  

                  Mathieu

                  d.healeyD 1 Reply Last reply Reply Quote 3
                  • d.healeyD
                    d.healey @Sounddiy
                    last edited by

                    @Sounddiy That's some fun code you have there :)

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

                    S 1 Reply Last reply Reply Quote 1
                    • S
                      Sounddiy @d.healey
                      last edited by

                      @d-healey I know

                      It is a mix of your's, others and peharps mine :)

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

                      14

                      Online

                      1.7k

                      Users

                      11.8k

                      Topics

                      102.4k

                      Posts