change_tune_time()
This function can be used to override the internal fade time of tuning
changes upon calls to change_tune()
. That
fade time is not set globally, but rather on a per-note level.
Additionally you might call change_tune_curve()
to override
the default fade curve shape type.
Function Prototype
change_tune_time(note, duration-us)
Arguments
Argument Name | Data Type | Description |
---|---|---|
note |
Note ID Number or Note ID Array | All voices of this note will be modified. [required] |
duration-us |
Integer Number or Real Number |
Fade time in microseconds. [required] |
Return Value
None.
Remarks
This functions optionally accepts s
as standard unit
for its argument duration-us
.
Examples
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()
, change_tune_curve()
Availability
Since LinuxSampler 2.0.0.svn45.
Document Updated: 2019-09-16 | Author: Christian Schoenebeck