Modify velocity power on the volume
-
Hey!
As in many synth you can control the power of the velocity on the volume.
I found the module, we can manually control its consequence on the volume, but not assign it...
Is there another way to do it? -
I think you just need to add a velocity modulator to the gain section of your sampler and tweak the table to suit your needs.
-
That's what I did but I can't assign the small bar here to a knob:
-
Yes this is because it's the "Intensity" of the modulator and not a parameter. This would be one of the cases where you have to go into Javascript and use the method
setIntensity()
. -
Like this: in the onControl Callback of the interface script:
function onControl(number, value) { switch(number) { case Knob: { VelocityModulator.setIntensity(value); break; } }; }
You of course have to have
const var VelocityModulator = Synth.getModulator("Velocity Modulator");
in the onInit CallbackBest,
d -
Wow it works so good! Thank you a lot Dominik!
-
I'm trying the same for the impact of LFO on volume.
My knob name is LFODepth.
So I entered
case LFODepth:
{
NAME.setIntensity(value);
break;
}In the LFO modulator I added a LFO Intensity Mod, then a constant.
So what is the name of that mod?
I entered
{
LFOIntensityMod.setIntensity(value);
break;
}But it writes me:
Interface:! onControl: Line 19, column 23: Unknown function 'setIntensity'
Ergh why?
In Oninit callback I have this written:
const var LFODepth = Content.addKnob("LFODepth", 637, 84);
// [JSON LFODepth]
Content.setPropertiesFromJSON("LFODepth", {
"width": 43,
"height": 40,
"filmstripImage": "{PROJECT_FOLDER}All k.png",
"numStrips": "101"
});
// [/JSON LFODepth]I don't have a line as yours ' const var VelocityModulator = Synth.getModulator("Velocity Modulator"); '
So I guess that is problem, but I don't know how to correct it, I don't have the name of the modulator... -
I found something simplier!
Add a AHDSR on LFO Intensity Mod, with:
A.0
H.0
D.0
R.2000And Sustain linked with knob.
When you turn sustain<40dB then we on't hear anymore LFO, the more it comes from 0 dB the more the LFO is powerful!
This is much simplier :P
-
Why don't you just use
setIntensity
on the LFO Modulator directly? No need to add an Envelope... -
Ahem.... :D
How would you write its syntax here, just to know? Or in general case? -
// Somewhere in the onInit callback: const var LFOModulator = Synth.getModulator("LFO Modulator"); // or whatever the name is // This line in your control callback: LFOModulator.setIntensity(0.2);
-
This post is deleted! -
Where do we find the name of the modules, like here in red "LFO Modulator" ?
Is there a list with function names? -
It's the name that is displayed in the header bar of each module. You can also right click on the header and choose "Create Script Variable Declaration", which creates this very line for you automatically.
-
Thanks :)