Math - Modulator question.
-
EDIT: I can see that I am being super unclear , lets try to fix that.
So I am trying to recreate this envelope controller in Scriptnode that I did in another program. Everything is fine so far but what I need to do is to be able to add that MIN offset , see GIF where I move the MIN Knob and the gray area rises.
The envelope in HISE is putting out its normal values but I want to be able to add to it the MIN value. ( without raising the value of the whole envelope)
When I use the MIN/MAX node in Scriptnode the MIN distorts the envelope output, rather the just add a "DC" value.
You could think of it as the envelope would be controlling a cutoff but the MIN would set the "knob" position and therefore the envelope has no effect until it goes above the MIN/Cutoff Knob.
Hope I am being clear?....probably not
-
@lalalandsynth Use a
math.expr
node withoutput = Math.max(input, value)
-
@Christoph-Hart Beautiful ! Exactly what I needed !
On another note, after adding that node into my project , all my previous XML saves now contain the same scriptnode setup as the last save !? Never seen this before ?
I can go back quite a few XML saves and all the scriptnode setups are the same ? -
@Christoph-Hart When trying to export it says " Expr needs to be wrapped into a compilable DSP network "
What does that mean ? -
@lalalandsynth You have 2 choices :
either you keep your scriptnode graph as is, and only compile the node :- select the
expr
node and wrap it into a DSP network :
- Reload HISE
- Click on the menu : Export > Compile DSP network as DLL
- Reload HISE
- Compile your plugin.
Or, compile the whole network directly by allowing compilation :
- Save your project
- Click on the menu : Export > Compile DSP network as DLL
- Reload HISE
Choosing between the 2 solutions depends on your graph and on your project. You'll find more info in some recent threads.
Also, David has posted a video a few days ago on this subject on his patreon channel. - select the
-
@Matt_SF Thanks mate , will test this :)
-
@Matt_SF Quick question , will an exported DLL also work on mac or how does all of that work?
If I make my own hardcoded fx , will they work in mac ? -
@lalalandsynth If you want to load and work in HISE on macOS you will also need to export it there.
If you just want to export it on macOS you don't need to bother with this: if you export the DLL on Windows it will also create the C++ files and put it in the AdditionalSourceCode directory so they will be compiled by Xcode with the rest of the project.
-
@Matt_SF wow, this is so cool :)