HISE Logo Forum
    • Categories
    • Register
    • Login

    ScriptNode - update parameter min/max from snex_node

    Scheduled Pinned Locked Moved ScriptNode
    1 Posts 1 Posters 197 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.
    • O
      Orvillain
      last edited by

      How would I update a ScriptNode's top level parameter min and max values, from inside a snex_node that sits inside the DSP network?

      Essentially I want to use the setExternalData function to pass my data.numSamples variable to a top level parameter. Is this possible?

      @Christoph-Hart - any ideas? This is using your SNEX one shot sampler snippet.

      	// Use this function to setup the external data
      	void setExternalData(const ExternalData& ed, int index)
      	{
      		data = ed;
      
      		ed.referBlockTo(sample[0], 0);
      		ed.referBlockTo(sample[1], 1);
      		
      		if(data.numSamples > 0 && sr != 0.0)
      		{
      			
      			const auto delta = (data.sampleRate / sr) * pitch;
      
      			for(auto& v: voiceData)
      			{
      				v.delta = delta;
      				updateDelta();
      			}
      		}
      		
      		// I want to send a message here to the SNEX node's DSP Network main container
      		// I want to send data.numSamples to a parameter called "Loop End" and I want to use it to set
      		// the max value attribute.
      		reset();
      	}
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      28

      Online

      1.8k

      Users

      12.0k

      Topics

      104.7k

      Posts