/[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 3217 - (show annotations) (download) (as text)
Thu May 25 16:28:34 2017 UTC (6 years, 10 months ago) by schoenebeck
File MIME type: text/html
File size: 2275 byte(s)
* NKSP: Added examples for change_vol_time() and change_tune_time().

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
15 <h3>Function Prototype</h3>
16 <p/>
17 <code lang="nksp">
18 change_tune_time(??note??, ??duration-us??)
19 </code>
20
21 <h3>Arguments</h3>
22 <table>
23 <tr>
24 <th>Argument Name</th> <th>Data Type</th> <th>Description</th>
25 </tr>
26 <tr>
27 <td><code>??note??</code></td>
28 <td>Note ID Number or Note ID Array</td>
29 <td>All voices of this note will be modified.<br>
30 [required]</td>
31 </tr>
32 <tr>
33 <td><code>??duration-us??</code></td>
34 <td>Integer Number</td>
35 <td>Fade time in microseconds.<br>
36 [required]</td>
37 </tr>
38 </table>
39
40 <h3>Return Value</h3>
41 <p>None.</p>
42
43 <h3>Examples</h3>
44 <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>
73 <p><code>change_tune()</code><p>
74
75 <h3>Availability</h3>
76 <p>Since LinuxSampler 2.0.0.svn45.<p>
77
78 <note>
79 This function exists only with NKSP, it is not available with KSP.
80 </note>
81
82 </body>
83 </html>

  ViewVC Help
Powered by ViewVC