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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3250 - (hide annotations) (download) (as text)
Sun May 28 22:59:27 2017 UTC (6 years, 10 months ago) by schoenebeck
File MIME type: text/html
File size: 2429 byte(s)
- Just minor cosmetics.

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

  ViewVC Help
Powered by ViewVC