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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3249 - (show annotations) (download) (as text)
Sun May 28 22:38:59 2017 UTC (3 years, 2 months ago) by schoenebeck
File MIME type: text/html
File size: 2446 byte(s)
- NKSP: cross linked newly added change_vol_curve() and change_tune_curve()
  functions.

1 <html>
2 <head>
3 <meta name="author" content="Christian Schoenebeck">
4 <title>change_tune_time() function</title>
5 <meta name="description" content="Changes the duration of tuning changes.">
6 </head>
7 <body>
8 <h1>change_tune_time()</h1>
9 <p>
10 This function can be used to override the internal fade time of tuning
11 changes upon calls to <code lang="nksp">change_tune()</code>. That
12 fade time is not set globally, but rather on a per-note level.
13 </p>
14 <p>
15 Additionally you might call <code>change_tune_curve()</code> to override
16 the default fade curve shape type.
17 </p>
18
19 <h3>Function Prototype</h3>
20 <p/>
21 <code lang="nksp">
22 change_tune_time(??note??, ??duration-us??)
23 </code>
24
25 <h3>Arguments</h3>
26 <table>
27 <tr>
28 <th>Argument Name</th> <th>Data Type</th> <th>Description</th>
29 </tr>
30 <tr>
31 <td><code>??note??</code></td>
32 <td>Note ID Number or Note ID Array</td>
33 <td>All voices of this note will be modified.<br>
34 [required]</td>
35 </tr>
36 <tr>
37 <td><code>??duration-us??</code></td>
38 <td>Integer Number</td>
39 <td>Fade time in microseconds.<br>
40 [required]</td>
41 </tr>
42 </table>
43
44 <h3>Return Value</h3>
45 <p>None.</p>
46
47 <h3>Examples</h3>
48 <p>The following example demonstrates a simple, custom pitch envelope generator.</p>
49 <code>
50 on init
51 declare const $time1US := 800000 { 0.8 seconds }
52 declare const $time2US := 1600000 { 1.6 seconds }
53 declare const $time3US := 3000000 { 3 seconds }
54 end on
55
56 on note
57 { Start the note with a (immediately) decreased tuning
58 of -100 cents. }
59 change_tune($EVENT_ID, -100000)
60
61 { Fade the note's tuning within 0.8s from -100 cents up to
62 its normal tuning, that is to +-0 cents. }
63 change_tune_time($EVENT_ID, $time1US)
64 change_tune($EVENT_ID, 0)
65
66 { Remain in this stage with +-0 cents for 1.6 seconds. }
67 wait($time1US + $time2US)
68
69 { Now fade the note's tuning further up from +-0 cents
70 up to +200 cents within 3 seconds. }
71 change_tune_time($EVENT_ID, $time3US)
72 change_tune($EVENT_ID, 200000)
73 end on
74 </code>
75
76 <h3>See also</h3>
77 <p><code>change_tune()</code>, <code>change_tune_curve()</code><p>
78
79 <h3>Availability</h3>
80 <p>Since LinuxSampler 2.0.0.svn45.<p>
81
82 <note>
83 This function exists only with NKSP, it is not available with KSP.
84 </note>
85
86 </body>
87 </html>

  ViewVC Help
Powered by ViewVC