Documents
Writing Docs Gigedit SFZ Instrument Scripts NKSP Language NKSP Reference

change_cutoff()

This function can be used to modify the filter cutoff frequency of active voices during their entire life time. You need to pass the note ID of the voices you want to alter. This function will change the cutoff frequency of all active voices associated with the requested note. So if you are using a layered instrument patch, then it will change the cutoff frequency of all layers.

The cutoff frequency changes set by calling this function are always applied relatively to the cutoff frequency calculated by the synthesis model and sampler format. That means the various sources of cutoff frequency factors like Filter Envelopes, Filter LFOs and other cutoff frequency factors that may be defined by the instrument patch, are always processed and calculated for the voices first, and the final cutoff frequency applied is always a relative combination of all those factors and the one set with this function call. Or in other words: you cannot replace the cutoff frequency set by other synthesis sources with this function.

There will only be audible changes with this function if a filter is actually already turned on (i.e. by enabling it in the instrument patch) and only if the filter is not closed by other sources (i.e. cutoff frequency should be set open in the instrument patch). Release Trigger Samples: In case the affected voices cause release trigger samples to be spawned later on, the cutoff frequency of those release trigger voices will not be affected by this function at all. So if you need to control the cutoff frequency 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(note, cutoff)

Arguments

Argument Name Data Type Description
note Note ID Number or Note ID Array All voices of this note will be modified.
[required]
cutoff Integer Number or
Real Number
New Cutoff Frequency (abstract non-negative value, 0 for smallest cutoff frequency, 1000000 for neutral cutoff frequency factor, 2000000 for doubling the effective cutoff frequency).
[required]

Return Value

None.

Remarks

This functions optionally accepts Hz as standard unit and finalness for its argument cutoff.

Examples

None yet.

Availability

Since LinuxSampler 2.0.0.svn12.

This function exists only with NKSP, it is not available with KSP, because KSP does not allow to change filter parameters on note level.

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