Forum

    • Register
    • Login
    • Search
    • Categories

    convolution combobox trouble :)

    Scripting Forum
    2
    6
    27
    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.
    • musictop
      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
      orchestools instruments at: https://musictop69.wixsite.com/orchestools

      Lindon 1 Reply Last reply Reply Quote 0
      • Lindon
        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

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

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

          my website: https://musictop69.wixsite.com/ilirbajri
          orchestools instruments at: https://musictop69.wixsite.com/orchestools

          Lindon 1 Reply Last reply Reply Quote 0
          • Lindon
            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

            Lindon musictop 2 Replies Last reply Reply Quote 1
            • Lindon
              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
              • musictop
                musictop @Lindon last edited by

                @Lindon cool, so much better. Much appreciated!

                my website: https://musictop69.wixsite.com/ilirbajri
                orchestools instruments at: https://musictop69.wixsite.com/orchestools

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

                8
                Online

                1.1k
                Users

                7.0k
                Topics

                64.6k
                Posts