HISE Logo Forum
    • Categories
    • Register
    • Login

    convolution combobox trouble :)

    Scheduled Pinned Locked Moved Scripting
    6 Posts 2 Posters 353 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.
    • musictopM
      musictop
      last edited by

      Hi guys. I modified a little bit the @d-healey's combobox impulse loader for convolution reverb to load only specific files from the audio folder, since i have other audio files there that i don't need to show on this combobox. It compiles ok but regardless the files do not load on the processor. I thought setFile should do it... confused, can't see what i'm missing here!
      Would appreciate very much some help.

      Engine.loadAudioFilesIntoPool();
      
      const Space = Synth.getAudioSampleProcessor("Convolution");
      const Impulse = Content.getComponent("Impulse");
      
      const var Select = ["Hall 1.wav", "Hall 2.wav", "Hall 3.wav", "Plate 1.wav", "Plate 2.wav", "Spring.wav", "Studio A.wav", "Studio B.wav"];
      
      inline function onImpulseControl(component, value)
      {
      	if (value > 0)
      	Space.setFile(Select[value - 1]);
      };
      
      Content.getComponent("Impulse").setControlCallback(onImpulseControl);
      
      Impulse.set("items","");
      
      for(x in Select)
      	Impulse.addItem(x.replace("{PROJECT_FOLDER}").replace(".wav"));
      
      

      my website: https://musictop69.wixsite.com/ilirbajri
      https://musictop69.wixsite.com/creatools
      https://musictop69.wixsite.com/orchestools

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @musictop
        last edited by

        @musictop

        
        inline function onImpulseControl(component, value)
        {
        	if (value > 0)
        	Space.setFile("{PROJECT_FOLDER}" + Select[value - 1]);
        };
        
        Content.getComponent("Impulse").setControlCallback(onImpulseControl);
        

        HISE Development for hire.
        www.channelrobot.com

        musictopM 1 Reply Last reply Reply Quote 1
        • musictopM
          musictop @Lindon
          last edited by

          @Lindon Ah, :). Thank you so very much!

          my website: https://musictop69.wixsite.com/ilirbajri
          https://musictop69.wixsite.com/creatools
          https://musictop69.wixsite.com/orchestools

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @musictop
            last edited by

            @musictop no problem I guess I'd be prone to get rid of all the fiddling about with Select as well and go with:

            const Space = Synth.getAudioSampleProcessor("Convolution");
            const Impulse = Content.getComponent("Impulse");
            
            const var Select = ["Hall 1", "Hall 2", "Hall 3", "Plate 1", "Plate 2", "Spring", "Studio A", "Studio B"];
            
            Impulse.set("items", Select.join("\n"));   
            
            inline function onImpulseControl(component, value)
            {
            	if (value > 0)
            	Space.setFile("{PROJECT_FOLDER}" + Select[value - 1] + ".wav");
            };
            Content.getComponent("Impulse").setControlCallback(onImpulseControl);
            

            HISE Development for hire.
            www.channelrobot.com

            LindonL musictopM 2 Replies Last reply Reply Quote 1
            • LindonL
              Lindon @Lindon
              last edited by

              ..by the way ComboBoxes return 1 to n and never return 0 so this

              if (value > 0)
              

              isnt really required.

              HISE Development for hire.
              www.channelrobot.com

              1 Reply Last reply Reply Quote 1
              • musictopM
                musictop @Lindon
                last edited by

                @Lindon cool, so much better. Much appreciated!

                my website: https://musictop69.wixsite.com/ilirbajri
                https://musictop69.wixsite.com/creatools
                https://musictop69.wixsite.com/orchestools

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

                48

                Online

                1.7k

                Users

                11.7k

                Topics

                101.9k

                Posts