HISE Logo Forum
    • Categories
    • Register
    • Login

    Third Party Node + Offline processing?

    Scheduled Pinned Locked Moved Scripting
    7 Posts 3 Posters 79 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.
    • iamlampreyI
      iamlamprey
      last edited by

      Do third party nodes when loaded into hardcoded effect slots allow offline processing via the regular dsp network calls?

      If not, what's the easiest way to process an IR through a third-party node? Something like:

      const myCoolThirdPartyNode = Synth.getEffect("myCoolThirdPartyNode"); 
      
      // or 
      
      const myCoolThirdPartyNode = Synth.getSlotFX("myCoolThirdPartyNode");
      
      inline function offlineProcess()
      {
      	local impulseSize = 1024;
      	myCoolThirdPartyNode.prepareToPlay(44100.0, impulseSize);
      	
      	local buffer = Buffer.create(impulseSize);
      	buffer[0] = 1.0; // Dirac delta
      	local channels = [buffer, buffer];
      
      	// process through third party node somehow here
      
      	// then save the modified buffers as a stereo IR file or do other processing after
      }
      
      griffinboyG 1 Reply Last reply Reply Quote 0
      • griffinboyG
        griffinboy @iamlamprey
        last edited by

        @iamlamprey

        If by offline, you mean doing a heavy process without freezing the program / spiking cpu, you can create a new thread and run the process on that thread / chunk the process into blocks and do a chunk at a time.

        iamlampreyI 1 Reply Last reply Reply Quote 0
        • iamlampreyI
          iamlamprey @griffinboy
          last edited by iamlamprey

          @griffinboy Yeh I just mean running an audio file (dirac delta impulse) through a single hardcoded FX module and saving the output as a .wav (while ignoring any other incoming audio signal)

          I've been doing it with a AudioLoopPlayer, MIDI Sequence and Engine.renderAudio() but it's a bit clunky. I could also do it inside the C++ node but that involves global cable shenanigans and potential race conditions.

          griffinboyG 1 Reply Last reply Reply Quote 0
          • griffinboyG
            griffinboy @iamlamprey
            last edited by

            @iamlamprey

            Ah right right. I think this is a question for Christoph then! However he did answer something similar very recently. And I think global cables was the answer he gave

            1 Reply Last reply Reply Quote 1
            • ustkU
              ustk
              last edited by ustk

              a buffer can be sent via cable data or external data (and maybe received by cable data only, as I don't know if an external data is bidirectional).
              This might allow offline processing 🤷♂

              Hise made me an F5 dude, browser just suffers...

              iamlampreyI 1 Reply Last reply Reply Quote 0
              • iamlampreyI
                iamlamprey @ustk
                last edited by

                @ustk You can generate the buffer inside the node without needing to pass anything in, the global cable would be used to pass the export filepath since C++ nodes don't support strings or file objects.

                Best case scenario for me would still be using DspNetwork.processBlock() but I'm not sure if it works in a hardcoded FX module, I think it's a pretty old method.

                1 Reply Last reply Reply Quote 0
                • iamlampreyI
                  iamlamprey
                  last edited by iamlamprey

                  Bumping/updating this, I can't use Engine.renderAudio() because it's an FX plugin, and the scriptnode setup out of this thread won't compile, and crashes if I replace the Analyzer node with a manual gate. I also can't do it in the third party node, because I also have a Parametric EQ that I'd like to include in the "chain".

                  I need this:

                  1. Embedded audio file (already created, only 1024 samples)
                  2. Pass audio file through 2 modules (third party node & Parametric EQ)
                  3. Render output to .wav

                  Edit: deleted my old topic on this because apparently i have amnesia

                  Edit #2: Enable Sound Generators FX also doesn't work, since it's still muting the sound generators

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

                  9

                  Online

                  2.0k

                  Users

                  12.7k

                  Topics

                  110.5k

                  Posts