Linking parameters to SNEX
-
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?
-
@dustbro Thank you man! One question about multi parameters. You've used this for one parameter (a = Drive knob):
template <int P> void setParameter(double v) { if (P == 0) { a = (float)v; } }
If we use 2 parameters (let's say a and c), would it be like this? Or anything more needed?
template <int P> void setParameter(double v) { if (P == 0) { a = (float)v; } else if (P == 1) { c = (float)v; } }
-
@Steve-Mohican You got it! (P==1) (P==2) etc...
-
@Steve-Mohican @dustbro It's easier to use an enum:
enum MyParameters { Gain = 0, whatever1, whatever2 } template <int P> void setParameter(double v) { if (P == MyParameters::Gain) { a = (float)v; } else if (P == MyParameters::whatever1) { b = (float)v * 2.0f; } else if (P == MyParameters::whatever2) { c = (float)v / 4.5f; } }