HISE Logo Forum
    • Categories
    • Register
    • Login

    Code to load ir files is not working

    Scheduled Pinned Locked Moved General Questions
    7 Posts 3 Posters 56 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.
    • pcs800P
      pcs800
      last edited by

      I followed this video to the letter
      https://www.youtube.com/watch?v=qR1jYrqQXrY
      The first problem I get is that the line:
      with this line of code

      const irs = engine.loadAudioFilesIntoPool()
      

      I get this error: Line 5, column 42: Unknown function 'loadAudioFilesIntoPool'

      So I replaced it with this

      const irs = FileSystem.findFiles("AudioFiles", "*.wav", false);
      

      Which compiles ok, but the combobox does not populate.
      Here's all of the code.

      Content.makeFrontInterface(700, 600);
      
      const var ConvolutionReverb1 = Synth.getAudioSampleProcessor("Convolution Reverb1");
      
      const irs = FileSystem.findFiles("AudioFiles", "*.wav", false);
      
      //cmbir
      const var cmbir = Content.getComponent("cmbir");
      
      
      inline function oncmbirControl(component, value)
      {
      	//Add your custom logic here...
      };
      
      Content.getComponent("cmbir").setControlCallback(oncmbirControl);
      
      cmbir .set("items", "");
      
      for (x in irs)
      	cmbir.additem(x.replace("{PROJECT_FOLDER}").replace(".wav"));
      
      ulrikU ChazroxC 2 Replies Last reply Reply Quote 0
      • ulrikU
        ulrik @pcs800
        last edited by

        @pcs800 said in Code to load ir files is not working:

        s = engine.loadAudioFilesIntoPool()

        it's Engine with a capital E

        Hise Develop branch
        MacOs 15.3.1, Xcode 16.2
        http://musikboden.se

        pcs800P 1 Reply Last reply Reply Quote 1
        • pcs800P
          pcs800 @ulrik
          last edited by

          @ulrik
          Thank you, I cannot believe I missed that.
          But now when I compile, I get this
          Line 21, column 14: function not found
          Which is referencing

          cmbir.additem(x.replace("{PROJECT_FOLDER}").replace(".wav"));
          
          ChazroxC 1 Reply Last reply Reply Quote 0
          • ChazroxC
            Chazrox @pcs800
            last edited by Chazrox

            @pcs800

            cmbir.additem(x.replace("{PROJECT_FOLDER}").replace(".wav")); // typo
            cmbir.addItem(x.replace("{PROJECT_FOLDER}").replace(".wav")); //  replace with
            
            1 Reply Last reply Reply Quote 0
            • ChazroxC
              Chazrox @pcs800
              last edited by Chazrox

              @pcs800 said in Code to load ir files is not working:

              followed this video to the letter

              crucial
              Functions are written in camel-case. Good to always double check that if you get an error.

              pcs800P 1 Reply Last reply Reply Quote 1
              • pcs800P
                pcs800 @Chazrox
                last edited by

                @Chazrox Wow, upper/lower case is killing me here. Thank you for taking the time to reply.

                ChazroxC 1 Reply Last reply Reply Quote 1
                • ChazroxC
                  Chazrox @pcs800
                  last edited by

                  @pcs800 All good. No worries! 👍

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

                  68

                  Online

                  1.7k

                  Users

                  11.8k

                  Topics

                  103.0k

                  Posts