Zone Parameters
Zone Parameters
These set the parameters for the user zones via KSP in the same manner and ranges as available on the mapping editor. They can be set with set_zone_par()
and retrieved with get_zone_par()
commands. When the user zones are declared, all these parameters are set to 0 by default.
|
---|
Sets the high key for the zone. Range: 0 ... 127. |
|
---|
Sets the low key of the zone. Range: 0 ... 127. |
|
---|
Sets the maximum velocity response of the zone. Range: 1 ... 127. |
|
---|
Sets the minimum velocity response of the zone. Range: 1 ... 127. |
|
---|
Sets the root key of the zone. Range: 0 ... 127. |
|
---|
Optionally use this parameter to create zone crossfades. The value is set in the form of a distance to the Range: |
|
---|
Optionally use this parameter to create zone crossfades. The value is set in the form of a distance to the Range: |
|
---|
Optionally use this parameter to create zone crossfades. The value is set in the form of a distance to the $ Range: |
|
---|
Optionally use this parameter to create zone crossfades. The value is set in the form of a distance to the Range: |
|
---|
Sets the volume of the zone. Range: -3600 ... 3600 . |
|
---|
Sets the panning of the zone. Range: -1000 ... 1000 . |
|
---|
Sets the tuning of the zone. Range: -3600 ... 3600 . |
|
---|
Sets the group of the user zone. By default a user zone is placed in group 0. |
|
---|
Sets the sample start value of the sample attached to the zone. |
|
---|
Sets the sample end value of the sample attached to the zone. |
|
---|
Sets the sample start modulation range of the sample attached to the zone. This is the S.Mod parameter in Kontakt's Wave Editor. |
|
---|
Gets the sample rate of the sample attached to the zone. This zone parameter cannot be used with |
|
---|
Returns 1 if the zone is selected in Kontakt's Mapping Editor, or 0 if it's not selected. This zone parameter cannot be used with |
Examples
on init message("") set_num_user_zones(4) set_zone_par(%NI_USER_ZONE_IDS[0], $ZONE_PAR_GROUP, 0) set_zone_par(%NI_USER_ZONE_IDS[1], $ZONE_PAR_GROUP, 1) set_zone_par(%NI_USER_ZONE_IDS[2], $ZONE_PAR_GROUP, 2) set_zone_par(%NI_USER_ZONE_IDS[3], $ZONE_PAR_GROUP, 3) end on
Creates 4 user zones in an instrument and assigns each to a separate group. Make sure that you have enough empty groups defined in the instrument when testing this example!
Loop Parameters
|
---|
The loop playback mode of the selected loop within the zone. 0: Loop off 1: Loop until end 2: Loop until end, bidirectional 3: Loop until release 4: Loop until release, bidirectional |
|
---|
The starting point in samples of the selected loop within the zone. If this parameter is not set, the loop will start at the beginning of the sample. |
|
---|
The loop length in samples of the selected loop within the zone. If this parameter is not set, the loop length will correspond to the entire sample. |
|
---|
The crossfade duration in microseconds for the selected loop within the zone. |
|
---|
The number of times the selected loop within the zone will repeat. If this parameter is not set (or is set to 0), the loop will play indefinitely. |
|
---|
Sets the tuning offset inside the loop area for the selected loop within the zone. This offset is applied on the first repeat of the loop, and for all successive repeats (as defined by |
Examples
on init message("") set_num_user_zones(1) set_sample(%NI_USER_ZONE_IDS[0], "path/to/sample.wav") end on on ui_control ($SampleLoopOn) wait_async(set_loop_par(%NI_USER_ZONE_IDS[0], 0, $LOOP_PAR_MODE, $SampleLoopOn)) end on
Enable or disable the loop of a sample loaded into a user zone.
Sample Parameters
|
---|
The file name of a zone’s sample (corresponds to the zone name). |
|
---|
The full path of a zone’s sample (same result as without the parameter). |
|
---|
The full OS path of a zone’s sample (uses backslashes on Windows). |
|
---|
The file extension of a zone’s sample (without the dot). |