/[svn]/doc/docbase/instrument_scripts/nksp/reference/functions/nksp_change_tune_time_function.html
ViewVC logotype

Diff of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_change_tune_time_function.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3196 by schoenebeck, Sat May 20 14:27:01 2017 UTC revision 3217 by schoenebeck, Thu May 25 16:28:34 2017 UTC
# Line 41  change_tune_time(??note??, ??duration-us Line 41  change_tune_time(??note??, ??duration-us
41      <p>None.</p>      <p>None.</p>
42    
43      <h3>Examples</h3>      <h3>Examples</h3>
44      <p>None yet.<p>      <p>The following example demonstrates a simple, custom pitch envelope generator.</p>
45            <code>
46    on init
47      declare const $time1US := 800000 { 0.8 seconds }
48      declare const $time2US := 1600000 { 1.6 seconds }
49      declare const $time3US := 3000000 { 3 seconds }
50    end on
51    
52    on note
53      { Start the note with a (immediately) decreased tuning
54        of -100 cents. }
55      change_tune($EVENT_ID, -100000)
56    
57      { Fade the note's tuning within 0.8s from -100 cents up to
58        its normal tuning, that is to +-0 cents. }
59      change_tune_time($EVENT_ID, $time1US)
60      change_tune($EVENT_ID, 0)
61    
62      { Remain in this stage with +-0 cents for 1.6 seconds. }
63      wait($time1US + $time2US)
64    
65      { Now fade the note's tuning further up from +-0 cents
66        up to +200 cents within 3 seconds. }
67      change_tune_time($EVENT_ID, $time3US)
68      change_tune($EVENT_ID, 200000)
69    end on
70        </code>
71    
72      <h3>See also</h3>      <h3>See also</h3>
73      <p><code>change_tune()</code><p>      <p><code>change_tune()</code><p>
74    

Legend:
Removed from v.3196  
changed lines
  Added in v.3217

  ViewVC Help
Powered by ViewVC