Linking parameters to SNEX
-
@ustk Thank you so much, I will check it.
-
Adding
template <int P> void setParameter(double v) { Driven = (float)v; }
Solved the parameter link issue. Thank you so much.
-
@ustk I just wanted to try this snex network compiling with @Fortune s code. What I do is:
Insert a Script FX > Create a new DSP Network File
Then this procedure:
https://www.youtube.com/watch?v=20BUXqh6D80
Terminal says "success" but It throws an
'getError' has C-linkage specified, but returns user-defined type 'scriptnode::Error' which is incompatible with C [-Wreturn-type-c-linkage]
error, you can see it in the video. Also I can't see the compiled DSP network in the scriptnode.What is the missing part?
-
@orange Well, I'm playing with SNEX sometimes but never exported anything because there are so many reported bugs that are still not fixed... I got a major project that needs DSP/SNEX pending for more than 2 years, but in the waiting I focus my attention on other projects that don't need DSP because I'm not confident at all it'll consistently work for marketable projects one day...
Guys who don't release sample based plugins are still the poor children of Hise -
@orange it could be a bunch of things. Did you wrap the SNEX node in a DSP network? Also, remove any unused parameters from the main container.
I'll try to make a full video on how to implement this dsp tonight. -
@ustk said in Linking parameters to SNEX:
Guys who don't release sample based plugins are still the poor children of Hise
Yes unfortunately. But fx stuff is much stronger than it seems
-
@dustbro said in Linking parameters to SNEX:
Did you wrap the SNEX node in a DSP network?
What I do is
Create a new DSP Network File
? Is this wrapping? This is another short video about how I start.https://www.youtube.com/watch?v=Hz_1SvWBpJk
I'll try to make a full video on how to implement this dsp tonight.
A video would be great and would bring some light to this dark area :)
-
@dustbro always getting some errors here but a video about a full working process would be awesome :folded_hands:
@orange in the meantime you'll find some info here : https://forum.hise.audio/topic/4364/snex_node-needs-to-be-wrapped-into-a-compileable-dsp-network
As Christoph explains, you select the SNEX node and click on the small 'cube' icon to wrap it in a DSP network : -
float Drive = 0.1f; float getSample(float input) { return Math.tanh(Drive*input)/Math.tanh(Drive); } template <int P> void setParameter(double v) { Drive = (float)v; }
For the above code, I get bunch of errors below:
ā non-type template argument is not a constant expression using FixBlockType = snex::Types::ProcessData<NumChannels>; ^ ā type 'int' cannot be used prior to '::' because it has no members if constexpr (T::hasCompileTimeSize()) ^ ā static_cast from 'snex::Types::InternalData *' to 'int *' is not allowed return *static_cast<T*>(this); ^ ā type 'typename node<instance<1>>::MetadataClass' (aka 'int') is not a structure or union
-
@orange I would love to help you with that but I'm not that advanced
Maybe try to write your saturation formula in aMath.expr
node, wrap it and see if HISE manages to compile it into a DLL, or if it throws some errors again.
Won't help you much - depending on what you want to do - but it might be useful for debugging purposes... -
@orange Since you don't seem to place your node inside a frame2_block, you don't need the processFrame function so remove it and test if it works...
-
@dustbro said in Linking parameters to SNEX:
I'll try to make a full video on how to implement this dsp tonight.
Hey @dustbro, have you got a chance to do it? Following, please :)
-
@Fortune Not yet. I got a little jammed up with the "day job" :beaming_face_with_smiling_eyes:
-
Finally had a second to make a quick video. I apologize for the poor quality and zero planning... but you get the idea
-
@dustbro Awesome, man ! Thank you very much for taking the time to do it.
I'm usually facing errors while compiling wrapped nodes, but I'll review my process and report back if I find what I was doing wrong.Edit : wrapping and compiling dll is working fine here. (Tested with SNEX and Math.expr nodes).
So clearly I was doing something wrong... I just have to find it out. -
@dustbro That's very helpful, Thank you!
-
FYI I tried the same code in SNEX shaper and got compiling errors. I think something is wrong with that node.
I was previously able to compile shaper nodes so I'll take a closer look at what's going on. -
@dustbro said in Linking parameters to SNEX:
FYI I tried the same code in SNEX shaper and got compiling errors. I think something is wrong with that node.
I was previously able to compile shaper nodes so I'll take a closer look at what's going on.Yes, that's what I've got the above errors I posted were in the snex shaper node. That node has definitely got some issues. But will try in normal snex node too.
-
@dustbro Again, thank you for putting us on the right path :)
I made some tests and found out some things, so I'll leave that here if others are also having problems wilth compiling the DLL.
What I did before, and what generated error when compiling my networks : I always enabled "Allow compilation" of the whole network >> this generates errors. You only wrap and compile into the dll, the
node
or thechain
containing the graph. ( @DanH )I tried to compile more complex networks, but some nodes seem to throw errors during the DLL compilation process. (i.e. the
xFader.node
).
Also, avoid renaming chains/nodes/etc... during the wrapping process. I'm not sure but HISE doesn't seem to like it.I managed to compile a
SNEX
& aMath.expr
node and it's working fine. I also managed to compile a chorus & a delay into a DLL, then compiling the whole plugin, for the sake of comparing performances. For a simple graph, there's not much of a difference (on HISE's perfLabel, there's about 1-2% of performance gain, but it's worth testing it with more complex graphs).I'll make some more tests during the next days...
EDIT :
I'll update a list of the nodes which produce errors when compiling :control.xfader
control.converter
-
@dustbro Thank you so much for this awesome tutorial.
@Christoph-Hart it would be very helpful, if there are some snex examples (one parameter or multiple parameters, different DSP examples...etc.) at least in Hise Tutorial projects. Can you add please?
Otherwise most of us won't be able to use this beauty. The SNEX documentation is very lacking. Maybe still not ready to use since there are lots of errors and bugs?