node_properties.json file for costum c++ modules
-
Hi there, I'm currently trying to use costum c++ modules in HISE but I don't understand what I should write in the node_properties.json file. Can anyone give me an example? Thanks
-
You don't need to write anything in that file, it's automatically maintained. Compiling networks as .dll inside of hise automatically updates this metadata file
-
@griffinboy ok but why does my exported Module in HardcodedMasterFX only have this one Slider called "MyParameter"?
-
You will have to share more detail with us about both what you have done, and the result that you are getting
-
@griffinboy I've copied the .h file into the dspnetworks/thirdparty folder and the .cpp file into the src folder then I've created the node_properties.json file and named it like the .cpp file.
Then I've opened the .xcodeproj from the dspnetworks/binaries folder in xcode.
go Product > Scheme > Edit Scheme and changed Release in "Run" to Debug
and then I've Pressed play.
I can see the Module now but there is only one slider with the Name "MyParameter" and this doesn't do anything
-
Have you compiled DSP networks as dll inside of hise? I think it's either under tools or export.
Sometimes compiling from visual studio is not the same as compiling in hise. I think since the latest update this has been different. -
@griffinboy I have already tried both but in the end I only have this "MyParameter" slider in the module which has no function
-
Can you show the node code for the parameters?
Is this your own programmed node? The framework you need to se is very specific. I think I don't really understand the problem you are describing. Is this an issue with a specific node? The MyParameter parameter is from the default c++ external node template and usually means you are basically running an empty node that hasn't been programmed to anything yet... So possibly the compilation is not working? -
@griffinboy stretchcpp.zip here is one of the files I tried that I've found online and the others where made for me.
-
This post is deleted! -
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) { }