HISE Logo Forum
    • Categories
    • Register
    • Login
    1. HISE
    2. iamlamprey
    3. Posts
    • Profile
    • Following 0
    • Followers 1
    • Topics 16
    • Posts 56
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Question about compiling nodes

      @Christoph-Hart said in Question about compiling nodes:

      as the autogenerated example node does.

      Okay sweet that was my starting point so that explains it, muchas gracias

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: Question about compiling nodes

      @DanH Yeh I've been doing that up until now, it's basically muscle memory at this point. The network wouldn't compile until I enabled polyphony

      posted in General Questions
      iamlampreyI
      iamlamprey
    • Question about compiling nodes

      I was getting some template errors when trying to compile a network that included a third party node:

      error C3203: 'transpose': unspecialized class template can't be used as a template argument for template parameter 'T', expected a real type

      Browsing the forum, it seems to have something to do with the network expecting a polyphonic node. I enabled these for every node:

      600ace11-c04c-4e92-8eb4-1193292dc2ee-{67536B67-7172-44E1-8F34-9F72CAAFE8BA}.png

      And re-compiled, and now the network compiles just fine.

      Since this is for an FX plugin, is there any drawback or downside to just keeping these settings on? I assume the polyphonic thing is just referencing internal voice management stuff, so for an FX plugin it's probably not doing much right?

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: Dynamic reassignment of effect slots

      @Christoph-Hart aww man I just did it all manually

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: Latency issuewith fx.pitch_shift

      @pcs800 the pitch shifter node is broken, you can roll your own using Rubberand (or signalsmith or any other license-compatible library)

      https://forum.hise.audio/topic/13256/tutorial-real-time-pitch-shifting-with-rubberband?_=1760500331839

      FFT-based pitch shifters will always introduce some latency, it's unavoidable

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: LAF that keeps the text-entry field?

      @d-healey jesus christ im so embarrased to have never tried that

      posted in Scripting
      iamlampreyI
      iamlamprey
    • RE: LAF that keeps the text-entry field?

      @d-healey Unless I'm missing something the only snippet in that thread that has the functionality I'm looking for is the label callback one, which means 2x the UI components and 2x the logic

      posted in Scripting
      iamlampreyI
      iamlamprey
    • RE: LAF that keeps the text-entry field?

      @d-healey I mean specifically the left-click to enter a value logic, I can roll my own with a label (or replace the sliders with Panels) but that seems like a lot of extra code & components

      edit: oops crossposted

      posted in Scripting
      iamlampreyI
      iamlamprey
    • LAF that keeps the text-entry field?

      26fcde67-73ef-432b-8895-d3a7799a86b5-image.png

      Are there any examples of keeping this little guy? I can't find anything with forum search or on the hise_laf_library repo

      posted in Scripting
      iamlampreyI
      iamlamprey
    • RE: Restore global cable's last data on DAW load

      @Christoph-Hart Lol was compiling exactly that as you posted, working now 🙂

      posted in Scripting
      iamlampreyI
      iamlamprey
    • Restore global cable's last data on DAW load

      Another edge case, I'm manually implementing NAM and using a scriptPanel drop callback to pass the file to the node via a Global Cable. It works perfectly fine in a DAW, but if I save/load the project it doesn't restore the model path:

      inline function sendNAMCableData()
      {
      	local path = pnlAmpNAMLoader.get("text");
          local file = FileSystem.fromAbsolutePath(path);
          local json = file.loadAsObject();
          namCable.sendData(json);
      }
      
      inline function pnlAmpNAMLoaderDrop(f)
      {
          if(f.drop)
          {
              pnlAmpNAMLoader.set("text", f.fileName);
              sendNAMCableData();
              pnlAmpNAMLoader.repaint();
          }
      } 
      

      I've tried calling this sendNAMCableData() on init (at the end) like this:

      if (isDefined(Amp.namCable) && isDefined(Amp.pnlAmpNAMLoader))
      	Amp.sendNAMCableData();function onNoteOn() // nope
      

      I can only assume the cable and/or the panel isn't defined yet, is there a way to force the cable to re-send the data on DAW reload, or just save the data inside the cable somehow?

      posted in Scripting
      iamlampreyI
      iamlamprey
    • RE: setFile + index/multiple slots?

      @Christoph-Hart Perfect, thank you!

      posted in Scripting
      iamlampreyI
      iamlamprey
    • setFile + index/multiple slots?

      I have a scriptnode network with 2 convolutions, I've setup the external data slots but how do I programmatically access the second one?

      Engine.loadAudioFilesIntoPool();
      
      const pnlCabALoader = Content.getComponent("pnlCabALoader");
      const fxSlots = [Synth.getSlotFX("modularA"), Synth.getSlotFX("modularB"), Synth.getSlotFX("modularC"), Synth.getSlotFX("modularD"), Synth.getSlotFX("modularE"), Synth.getSlotFX("modularF"), Synth.getSlotFX("modularG")];
      	
      // Drop
      inline function pnlCabALoaderDrop(f)
      {
          if(f.drop)
          {
      		local file = FileSystem.fromAbsolutePath(f.fileName);
      		switch (this)
      		{
      			case pnlCabALoader:
      				for (slot in fxSlots)
      				{
      					local effectId = slot.getCurrentEffectId();					
      					if (effectId == "cab")
      					{
      						local id = slot.getCurrentEffect().getId();
      						local ref = Synth.getAudioSampleProcessor(id);
      						ref.setFile(f.fileName); // sets the first slot, but how to set the second one?						
      					}
      				}						
      				break;
      			case pnlCabBLoader:
      				// second file slot logic would go here
      				break;
      		}
      	    this.set("text", file.toString(3));
      	    this.repaint();
          }
      }
      
      pnlCabALoader.setFileDropCallback("All Callbacks", "*.wav", pnlCabALoaderDrop);
      
      posted in Scripting
      iamlampreyI
      iamlamprey
    • RE: [REQUEST] Audio Input Support & Standalone FX Export in HISE

      +1, I thought this was already possible

      @Christoph-Hart would this be a nightmare to implement? it's a pretty critical feature for any sort of guitar amp software (most guitarists don't want to wait for a DAW to load lol)

      posted in Feature Requests
      iamlampreyI
      iamlamprey
    • RE: Global Cable + Third Party Node

      @Christoph-Hart Nice, thanks for the quick fix!

      posted in Scripting
      iamlampreyI
      iamlamprey
    • Global Cable + Third Party Node

      Got a bit of a weird one. I'm trying to import a pitch-detection algorithm that works in JUCE, but I can't get it to send the data to a global cable.

      process() and setParameter() update it just fine

      prepare() and timerCallback() (JUCE override), only change the cable value when I add the node (scriptnode) or load the binary (hardcoded), then never again.

      // ==================================| Third Party Node Template |==================================
      
      #pragma once
      #include <JuceHeader.h>
      
      namespace project
      {
      using namespace juce;
      using namespace hise;
      using namespace scriptnode;
      using cable_manager_t = routing::global_cable_cpp_manager<SN_GLOBAL_CABLE(106677056)>;
      
      enum class GlobalCables
      {
      	pitch = 0
      };
      
      // ==========================| The node class with all required callbacks |==========================
      
      template <int NV> struct tuner: public data::base, public cable_manager_t, private juce::Timer
      {
      	// Metadata Definitions ------------------------------------------------------------------------
      	
      	SNEX_NODE(tuner);    
      
          tuner()
          {
              startTimerHz(30); // nope
          }
      
          ~tuner()
          {
              stopTimer(); // nope
          }
      	
      	struct MetadataClass
      	{
      		SN_NODE_ID("tuner");
      	};
      	
      	static constexpr bool isModNode() { return false; };
      	static constexpr bool isPolyphonic() { return NV > 1; };
      	static constexpr bool hasTail() { return false; };
      	static constexpr bool isSuspendedOnSilence() { return false; };
      	static constexpr int getFixChannelAmount() { return 2; };
      	static constexpr int NumTables = 0;
      	static constexpr int NumSliderPacks = 0;
      	static constexpr int NumAudioFiles = 0;
      	static constexpr int NumFilters = 0;
      	static constexpr int NumDisplayBuffers = 0;
      
      	int handleModulation(double& value) { return 0; }
      	template <typename T> void processFrame(T& data) {}
          void handleHiseEvent(HiseEvent& e) {}
          void setExternalData(const ExternalData& data, int index) {}
      	
      	// Scriptnode Callbacks ------------------------------------------------------------------------
          
      	void prepare(PrepareSpecs specs) 
      	{		
              randomGenerator.setSeedRandomly();
              float randomValue = randomGenerator.nextFloat();
              setGlobalCableValue<GlobalCables::pitch>(randomValue); // doesn't work here
              
              startTimerHz(30); // either doesn't start the timer, or it does, but the timer callback doesn't update the cable
      	}
      
      	void reset() 
          {
              stopTimer();
          }
      	
      	
      		
      	template <typename T> void process(T& data)
      	{		        
              randomGenerator.setSeedRandomly();
              float randomValue = randomGenerator.nextFloat();
              setGlobalCableValue<GlobalCables::pitch>(randomValue); // works (too many calls per second)
      	}	
      
          juce::Random randomGenerator;
      
      	void timerCallback() override
          {
              randomGenerator.setSeedRandomly();
              float randomValue = randomGenerator.nextFloat();
              setGlobalCableValue<GlobalCables::pitch>(randomValue); // nope    
          } 		    
      
      	// Parameter Functions -------------------------------------------------------------------------
      	
      	template <int P> void setParameter(double v)
      	{
      		if (P == 0)
      		{            
                  if (v >= 0.5) { monitorOutput.store(true); }
                  else { monitorOutput.store(false); }    
      		}
      		
      	}
      	
      	void createParameters(ParameterDataList& data)
      	{		
              {
                  parameter::data monitor("Monitor", { 0.0, 1.0 });
                  registerCallback<0>(monitor);
                  monitor.setDefaultValue(0.0);            
                  data.add(std::move(monitor));
              }        
      	}
      
      private:
      
      	std::atomic<bool> monitorOutput{ false };
      	
      };
      }
      
      posted in Scripting
      iamlampreyI
      iamlamprey
    • RE: SlotFX (Hardcoded) Persistence?

      @HISEnberg said in SlotFX (Hardcoded) Persistence?:

      Engine.addModuleStateToUserPreset(var moduleId)

      Yeh this seems to be working, I still have a dereferenced nullptr on the interface somewhere when I try and delete the plugin that I have to track down but otherwise it's doing the thing

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: SlotFX (Hardcoded) Persistence?

      @Christoph-Hart said in SlotFX (Hardcoded) Persistence?:

      @iamlamprey you could add the module to the user preset state so it gets recalled correctly.

      Ah cool, I didn't know about this function, thank you.

      @Chazrox said in SlotFX (Hardcoded) Persistence?:

      @iamlamprey sorry to piggy back your post.

      No problem 🥳

      posted in General Questions
      iamlampreyI
      iamlamprey
    • RE: SlotFX (Hardcoded) Persistence?

      @Chazrox The issue with a json/local file is if the end user has multiple instances of the plugin, it would either overwrite (worst-case) or end up making a bunch of loose json files somewhere

      posted in General Questions
      iamlampreyI
      iamlamprey