Documents
Writing Docs Gigedit SFZ Instrument Scripts NKSP Language NKSP Reference

change_amp_lfo_depth()

This function can be used to modify the amplitude LFO depth of active voices. Since LFOs are per voice, you need to pass the note ID(s) of the voices you want to alter. This function will change the amplitude LFO depth of all active voices associated with the requested note. So if you are using a layered instrument patch, then it will change the amplitude LFO depth of all layers.

The LFO depth changes set by calling this function are always applied relatively to all other LFO depth sources defined for controlling the LFO (i.e. an internal constant LFO depth value, an associated MIDI controller defined in the instrument preset to control the LFO depth, etc.). Or in other words: the depth value passed to this function will not replace the overall LFO depth, it will rather be multiplied against all other LFO depth control sources.

There will only be audible changes with this function if the amplitude LFO is actually already turned on (i.e. by enabling it in the instrument patch) and only if the LFO is not disabled by other LFO control sources. So you may for example set a certain constant internal LFO depth value with the instrument preset first, before actually making use of this function. Release Trigger Samples: In case the affected voices cause release trigger samples to be spawned later on, the LFO of those release trigger voices will not be affected by this function at all. So if you need to control the LFO of release trigger samples by script, then you might rather also trigger those release trigger samples by script with play_note() instead of using the sampler format's internal support for release trigger samples.

Function Prototype

change_amp_lfo_depth(note, depth)

Arguments

Argument Name Data Type Description
note Note ID Number or Note ID Array All voices of this note will be modified.
[required]
depth Integer Number New LFO Depth Value (abstract absolute value between 0 and 1000000).
[required]

Return Value

None.

Examples

None yet.

Availability

Since LinuxSampler 2.0.0.svn44.

This function exists only with NKSP, it is not available with KSP.

Document Updated:  2017-05-28  |  Author:  Christian Schoenebeck