SNEX Shaper Sliders *SOLVED*
-
Hi there,
once again with a noob question (sorry sorry) :As i have had quite some success implementing some FAUST DSP algos in Hise, i wanted to take it a step further and do some waveshaping in snex. Code compiles fine, but what i dont get is :
how can i implement a simple button ?
In Faust node, a button simply will be added when i define a variable "gain" and use it in my function. This does not seem to happen in snex.
Would you be so kind and help me (once again)?
Btw i am so happy that you guys offer your help. Thank you !!
-
@Ben-Catman There is no button in the scriptnode system. Knobs are used as all kind of parameters, so a knob with 0 and 1 values will be your button.
In the plugin GUI, you will link a button to this knob, it works without any issues.
-
@orange
thx, so for me, as i am a bit slow, for starters i wanted to say KNOB , not button, but anyways..can you point me into the right directs - i have compiled my node and use it as hardcoded effect - but how can i expose my values that i want to change ? for example: i have defined float inputGain = 0.0f - how can i expose this value to hise ?
thank you so much
ben -
@Ben-Catman you can add params with the interface:
-
@Lindon
OH i see,awesome, will try at home!
Thank you all! -
This post is deleted! -
-
ok, next question - i created the slider with "add parameter" and connected it in my script with :
template <int P> void setParameter(double v) { if (P == 1) // { gainValue = (float)v; } }
problem1: it was showing me in the shaper "preview" that changes to my function where happening, but the sound stayed the same.
then i restarted hise, and suddenly the slider was not working at all, and since then i cant connect it to my script at all. i checked if the ID is set correctly and everything. but i have NO IDEA what has happened ? can you pls help out once again?
-
@Ben-Catman needs to be zero based index I think...
template <int P> void setParameter(double v) { if(P == 0) { a = (float)v; }; if(P == 1) { mode = (float)v; }; if(P == 2) { fback = (float)v; }; }
-
yep, i GUESS thats the problem. Kind of unstable, it seems, as sometimes it crashes hise. Anyways, SNEX is AWESOME!
Thank you !