HISE Logo Forum
    • Categories
    • Register
    • Login

    Loading an IR in a scriptnode convolution module via script

    Scheduled Pinned Locked Moved Scripting
    7 Posts 3 Posters 289 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.
    • S
      scottmire
      last edited by

      Hello all....
      A project I'm working on has multiple convolution modules in a scriptnode network. I am attempting to load the IRs into the modules via scripting. It seems to be working, the convolution module is showing the name of the IR, but it's not actually loaded. If I manually load the IR in, it works.

      To illustrate....the module on the left is loaded via script, but the module on the right in manually loaded. Although they both have the IR file name in the "label", only the one on the right actually loaded the IR.

      convScriptNode.jpg

      So, here is the code in the function I'm using to "load" the IR. I know it can be simplified, but I figured it might be easier to follow this way

      //create obj reference to cab 1 convolution modules and audio file slot
      local CabIR1_1 = Synth.getAudioSampleProcessor("Cabinet1").getAudioFile(0);

      //create variable to hold IR file name
      // translates to something like: "PV 5150 412 Sheffield - SM57 - Cap.wav"
      local CabIR1_1_wav = theCab1 + " - " + theMic1 + " - Cap.wav";

      //load an iR into each of the convolution modules
      CabIR1_1.loadFile(CabIR1_1_wav);

      I hope that all makes sense? Thanks in advance!

      clevername27C 1 Reply Last reply Reply Quote 1
      • clevername27C
        clevername27 @scottmire
        last edited by

        @scottmire Are you using an external slot for the convo Node? If so, trying scripting a much simpler file name - one that you're not building via. If that doesn't work, try using the same script to load it into a module tree convo reverb—it would use the same path. Are loading the files into your audio file pool?

        S 1 Reply Last reply Reply Quote 0
        • S
          scottmire @clevername27
          last edited by scottmire

          @clevername27 I am using an external slot, but I am not loading the files into the audio file pool. Does that need to be done?
          I agree that the file name is a bit complex, but it represents the 3 parameters the user chooses to select the IR (the specific speaker/cab, the mic, the mic position). Ultimately, there will be hundred of IRs, each representing a combination of the selectable parameters.

          M clevername27C 2 Replies Last reply Reply Quote 0
          • M
            Mighty23 @scottmire
            last edited by

            @scottmire
            This is my workflow for IR and Scriptnode:

            1. Add the .wav files to the AudioFiles folder in your project.
            2. Click on the icon at the bottom left and add an External AudioFile Slot.
              bbb90597-8e83-4120-8322-414917141ed2-image.png
            3. Add an AudioWaveform and link it to Scriptnode in the Property Panel.
              2.1. If the user doesn't need it, make it invisible.
            4. From the documentation:
              "Calling this makes sure that all audio files are loaded into the pool and will be available in the compiled plugin. Returns a list of all references. Edit on GitHub"
              Engine.loadAudioFilesIntoPool()
            5. Load the files using:
              ScriptFX/HardcordedFX.setFile

            If you skip step 2, once the network is compiled, it won't be available in the UI of your HardcodedFX. Therefore, I recommend including this step.

            Free Party, Free Tekno & Free Software too

            clevername27C 1 Reply Last reply Reply Quote 0
            • clevername27C
              clevername27 @scottmire
              last edited by

              @scottmire Sure - I just meant for testing purposes, use a full string for the file name, in case your were accidentally constructing the wrong file name and/or path.

              1 Reply Last reply Reply Quote 0
              • clevername27C
                clevername27 @Mighty23
                last edited by

                @Mighty23 @scottmire This is exactly how I did it, as well.

                1 Reply Last reply Reply Quote 0
                • S
                  scottmire
                  last edited by

                  I got it working!
                  Thanks to everyone for the help....it's greatly appreciated!

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

                  24

                  Online

                  1.7k

                  Users

                  11.8k

                  Topics

                  102.7k

                  Posts