Documents
Writing Docs Gigedit SFZ Instrument Scripts NKSP Language NKSP Reference

change_cutoff_lfo_depth()

This function can be used to modify the filter cutoff 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 filter cutoff 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 filter cutoff 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 filter cutoff 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_cutoff_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 non-negative value, 0 for zero depth, 1000000 for neutral depth factor, 2000000 for doubling the effective LFO depth).
[required]

Return Value

None.

Remarks

This functions accepts finalness for its argument depth.

Examples

None yet.

Availability

Since LinuxSampler 2.0.0.svn77.

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

Document Updated:  2020-01-13  |  Author:  Christian Schoenebeck