--- doc/docbase/instrument_scripts/nksp/reference/functions/nksp_change_tune_time_function.html 2017/05/20 14:27:01 3196 +++ doc/docbase/instrument_scripts/nksp/reference/functions/nksp_change_tune_time_function.html 2017/05/25 16:28:34 3217 @@ -41,8 +41,34 @@

None.

Examples

-

None yet.

- +

The following example demonstrates a simple, custom pitch envelope generator.

+ +on init + declare const $time1US := 800000 { 0.8 seconds } + declare const $time2US := 1600000 { 1.6 seconds } + declare const $time3US := 3000000 { 3 seconds } +end on + +on note + { Start the note with a (immediately) decreased tuning + of -100 cents. } + change_tune($EVENT_ID, -100000) + + { Fade the note's tuning within 0.8s from -100 cents up to + its normal tuning, that is to +-0 cents. } + change_tune_time($EVENT_ID, $time1US) + change_tune($EVENT_ID, 0) + + { Remain in this stage with +-0 cents for 1.6 seconds. } + wait($time1US + $time2US) + + { Now fade the note's tuning further up from +-0 cents + up to +200 cents within 3 seconds. } + change_tune_time($EVENT_ID, $time3US) + change_tune($EVENT_ID, 200000) +end on + +

See also

change_tune()