HISE Logo Forum
    • Categories
    • Register
    • Login

    How do You Load an Audio File into a ScriptNode Convolution Reverb?

    Scheduled Pinned Locked Moved Solved ScriptNode
    5 Posts 2 Posters 100 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.
    • clevername27C
      clevername27
      last edited by clevername27

      I've seen this thread - could somebody please break this down? As I understand…


      1. Create an external audio slot in the uncompiled ScriptNode synth.

      66758e35-8602-4479-8382-03a9007a1295-Screenshot 2025-01-02 at 4.10.14 pm.png Screenshot 2025-01-02 at 4.10.14 pm


      2. Compile the ScriptNode synth, and add it to a Silent Synth, inside a Hard-Coded Polyphonic module.

      c4a3c5d8-f547-4b92-8c49-97a61a42acb2-Screenshot 2025-01-02 at 4.09.34 pm.png


      3. Create an AudioSample

      const scriptNodeSynth = Synth.getAudioSampleProcessor("fx_MODEL_SynthesiserNode");
      

      Here I break down…I don't seem to have the syntax correct.

      23f14ad1-b1f8-427e-bfa1-46c31b4e2934-Screenshot 2025-01-02 at 4.16.49 pm.png


      4. Create a Reference to the Slot

      var impulseResponse = scriptNodeSynth.getAudioFile(1);
      

      5. Load an Audio File

      Lost here. AudioSampleProcessor has a setFile method, but I'm not sure if that's applicable here (and if so, how to use it). As I understand it, getAudioFile returns a ScriptAudioWaveform. But I don't want to present a user interface to the ScriptNode—I just want to load a file.


      6. Relax with Tasty Beverage of Choice

      I'm actually good on this one.


      Please help? 🤔

      Matt_SFM 1 Reply Last reply Reply Quote 0
      • Matt_SFM
        Matt_SF @clevername27
        last edited by Matt_SF

        @clevername27 You're good up to 4.

        You don't need this:

        impulseResponse = scriptNodeSynth.getAudioFile(1);
        

        simply do this:

        // this is the reference to the audio slot
        const scriptNodeSynth = Synth.getAudioSampleProcessor("fx_MODEL_SynthesiserNode");
        
        scriptNodeSynth.setFile(the_relative_path_to_your_reverb_file);
        

        You can call this function in a CB obviously.

        1. A glass of red wine for me please :)

        Develop branch
        Win10 & VS17 / Ventura & Xcode 14. 3

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

          @Matt_SF Thanks for look at my question - I'm really stumped here.

          This line produces an error (see the screenshots in my original question).

          ~~const scriptNodeSynth = Synth.getAudioSampleProcessor("fx_MODEL_SynthesiserNode");~~
          

          Got it. Thanks again. 🍷

          Matt_SFM 1 Reply Last reply Reply Quote 0
          • clevername27C clevername27 marked this topic as a question on
          • clevername27C clevername27 has marked this topic as solved on
          • Matt_SFM
            Matt_SF @clevername27
            last edited by

            @clevername27 Aaaah I overlooked #2.

            You have to use the filters.convolution node, not the core.file_player.

            32765cdc-4f3f-4e3b-8803-e26643c2dc39-CleanShot 2025-01-02 at 23.57.52@2x.png

            Develop branch
            Win10 & VS17 / Ventura & Xcode 14. 3

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

              @Matt_SF Cheers mate!

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

              54

              Online

              1.7k

              Users

              11.7k

              Topics

              101.8k

              Posts