@treynterrio
template <int P> void setParameter(double v)
{
if (P == 0)
{
// This will be executed for MyParameter (see below)
jassertfalse;
}
}
void createParameters(ParameterDataList& data)
{
{
// Create a parameter like this
parameter::data p("MyParameter", { 0.0, 1.0 });
// The template parameter (<0>) will be forwarded to setParameter<P>()
registerCallback<0>(p);
p.setDefaultValue(0.5);
data.add(std::move(p));
}
}
};
The .h file is the scriptnode itself. As you can see, it has one parameter called MyParameter
I think it's not been set up properly, whoever you got this from has not set up the node to do any processing, as seen by the empty process and process frame
template <typename T> void process(T& data)
{
static constexpr int NumChannels = getFixChannelAmount();
// Cast the dynamic channel data to a fixed channel amount
auto& fixData = data.template as<ProcessData<NumChannels>>();
// Create a FrameProcessor object
auto fd = fixData.toFrameData();
while(fd.next())
{
// Forward to frame processing
processFrame(fd.toSpan());
}
}
template <typename T> void processFrame(T& data)
{
}