Documents
Writing Docs Gigedit SFZ Instrument Scripts NKSP Language NKSP Reference

get_event_par()

This function can be used to retrieve the current value of a certain parameter of the requested note. If the passed note ID is valid, then this function returns the note's current value of the requested parameter type. If the note ID is invalid or the note is no longer alive, then the value returned by this function is undefined. So you should call event_status() to ensure the note is still alive before calling this function.

You might use function set_event_par() to change those parameters.

Function Prototype

get_event_par(note, parameter)

Arguments

Argument Name Data Type Description
note Note ID Number or Note ID Array The note whose current parameter shall be retrieved.
[required]
parameter Integer Number The actual parameter whose value should be retrieved. This must be one of the following built-in constants:
$EVENT_PAR_NOTE: To get the note's MIDI note number.
$EVENT_PAR_TUNE: To get the note's current tuning in milli cents (see change_tune()).
$EVENT_PAR_VELOCITY: To get the note's MIDI note velocity.
$EVENT_PAR_VOLUME: To get the note's current volume (see change_vol()).
$EVENT_PAR_0 to $EVENT_PAR_3: To get the current value of one of the 4 possible user specific parameters. These user parameters are not used by the sampler itself, they can be used by the script author to pass data from one script (slot) to another script (slot) for example, or as an alternative to polyphonic variables.
[required]

Return Value

Data Type Description
Integer Number Current value of the requested note's parameter.

Examples

None yet.

See also

set_event_par()

Availability

Since LinuxSampler 2.0.0.svn46.

Document Updated:  2019-08-29  |  Author:  Christian Schoenebeck