ScriptNode - update parameter min/max from snex_node
-
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(); }