/[svn]/doc/docbase/instrument_scripts/nksp/reference/01_nksp_reference.html
ViewVC logotype

Diff of /doc/docbase/instrument_scripts/nksp/reference/01_nksp_reference.html

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

revision 3223 by schoenebeck, Fri May 26 19:14:44 2017 UTC revision 3396 by schoenebeck, Wed Dec 6 18:53:32 2017 UTC
# Line 11  Line 11 
11      <p>      <p>
12        This document gives you an overview of all built-in functions and built-in        This document gives you an overview of all built-in functions and built-in
13        variables provided by the NKSP real-time instrument script language.        variables provided by the NKSP real-time instrument script language.
14          If you are new to NKSP, then you may want to read the
15          <a href="01_nksp.html">NKSP language tour</a> first.
16      </p>      </p>
17    
18      <h2>Built-In Functions</h2>      <h2>Built-In Functions</h2>
19      <p>      <p>
20        These are the built-in functions available with the NKSP realt-time        These are the built-in functions available with the NKSP real-time
21        instrument script language.        instrument script language.
22      </p>      </p>
23    
# Line 28  Line 30 
30          <th>Function</th> <th>Description</th>          <th>Function</th> <th>Description</th>
31        </tr>        </tr>
32        <tr>        <tr>
33            <td><code lang="nksp">abort()</code></td>
34            <td>Stops execution of a script callback.</td>
35          </tr>
36          <tr>
37          <td><code lang="nksp">array_equal()</code></td>          <td><code lang="nksp">array_equal()</code></td>
38          <td>Check whether two arrays are equal.</td>          <td>Check whether two arrays are equal.</td>
39        </tr>        </tr>
40        <tr>        <tr>
41            <td><code>fork()</code></td>
42            <td>Creates new execution instances (threads).</td>
43          </tr>
44          <tr>
45            <td><code>callback_status()</code></td>
46            <td>Returns the current status of a callback (thread).</td>
47          </tr>
48          <tr>
49          <td><code lang="nksp">dec()</code></td>          <td><code lang="nksp">dec()</code></td>
50          <td>Decrements the passed integer variable by one.</td>          <td>Decrements the passed integer variable by one.</td>
51        </tr>        </tr>
# Line 119  Line 133 
133          <td>Changes panning of voices (stereo balance).</td>          <td>Changes panning of voices (stereo balance).</td>
134        </tr>        </tr>
135        <tr>        <tr>
136            <td><code>change_pan_time()</code></td>
137            <td>Changes the duration of panning (stereo balance) changes.</td>
138          </tr>
139          <tr>
140            <td><code>change_pan_curve()</code></td>
141            <td>Changes the curve type of panning (stereo balance) changes.</td>
142          </tr>
143          <tr>
144            <td><code>change_play_pos()</code></td>
145            <td>Change the sample playback position.</td>
146          </tr>
147          <tr>
148          <td><code>change_tune()</code></td>          <td><code>change_tune()</code></td>
149          <td>Changes the tuning of voices.</td>          <td>Changes the tuning of voices.</td>
150        </tr>        </tr>
# Line 127  Line 153 
153          <td>Changes the duration of tuning changes.</td>          <td>Changes the duration of tuning changes.</td>
154        </tr>        </tr>
155        <tr>        <tr>
156            <td><code>change_tune_curve()</code></td>
157            <td>Changes the curve type of tuning changes.</td>
158          </tr>
159          <tr>
160          <td><code>change_vol()</code></td>          <td><code>change_vol()</code></td>
161          <td>Changes the volume of voices.</td>          <td>Changes the volume of voices.</td>
162        </tr>        </tr>
# Line 135  Line 165 
165          <td>Changes the duration of volume changes.</td>          <td>Changes the duration of volume changes.</td>
166        </tr>        </tr>
167        <tr>        <tr>
168            <td><code>change_vol_curve()</code></td>
169            <td>Changes the curve type of volume changes.</td>
170          </tr>
171          <tr>
172          <td><code>change_cutoff()</code></td>          <td><code>change_cutoff()</code></td>
173          <td>Changes filter cutoff frequency of voices.</td>          <td>Changes filter cutoff frequency of voices.</td>
174        </tr>        </tr>
# Line 144  Line 178 
178        </tr>        </tr>
179        <tr>        <tr>
180          <td><code>change_attack()</code></td>          <td><code>change_attack()</code></td>
181          <td>Modifies the attack time of voices.</td>          <td>Modifies the amplitude attack time of voices.</td>
182        </tr>        </tr>
183        <tr>        <tr>
184          <td><code>change_decay()</code></td>          <td><code>change_decay()</code></td>
185          <td>Modifies the decay time of voices.</td>          <td>Modifies the amplitude decay time of voices.</td>
186          </tr>
187          <tr>
188            <td><code>change_sustain()</code></td>
189            <td>Modifies the amplitude sustain level of voices.</td>
190        </tr>        </tr>
191        <tr>        <tr>
192          <td><code>change_release()</code></td>          <td><code>change_release()</code></td>
193          <td>Modifies the release time of voices.</td>          <td>Modifies the amplitude release time of voices.</td>
194          </tr>
195    
196          <tr>
197            <td><code>change_cutoff_attack()</code></td>
198            <td>Modifies the filter cutoff attack time of voices.</td>
199          </tr>
200          <tr>
201            <td><code>change_cutoff_decay()</code></td>
202            <td>Modifies the filter cutoff decay time of voices.</td>
203        </tr>        </tr>
204        <tr>        <tr>
205            <td><code>change_cutoff_sustain()</code></td>
206            <td>Modifies the filter cutoff sustain level of voices.</td>
207          </tr>
208          <tr>
209            <td><code>change_cutoff_release()</code></td>
210            <td>Modifies the filter cutoff release time of voices.</td>
211          </tr>
212    
213          <tr>
214          <td><code>change_amp_lfo_depth()</code></td>          <td><code>change_amp_lfo_depth()</code></td>
215          <td>Modifies the amplitude LFO depth.</td>          <td>Modifies the amplitude LFO depth.</td>
216        </tr>        </tr>
# Line 162  Line 218 
218          <td><code>change_amp_lfo_freq()</code></td>          <td><code>change_amp_lfo_freq()</code></td>
219          <td>Modifies the amplitude LFO frequency.</td>          <td>Modifies the amplitude LFO frequency.</td>
220        </tr>        </tr>
221    
222          <tr>
223            <td><code>change_cutoff_lfo_depth()</code></td>
224            <td>Modifies the filter cutoff LFO depth.</td>
225          </tr>
226          <tr>
227            <td><code>change_cutoff_lfo_freq()</code></td>
228            <td>Modifies the filter cutoff LFO frequency.</td>
229          </tr>
230    
231        <tr>        <tr>
232          <td><code>change_pitch_lfo_depth()</code></td>          <td><code>change_pitch_lfo_depth()</code></td>
233          <td>Modifies the pitch LFO depth.</td>          <td>Modifies the pitch LFO depth.</td>
# Line 237  Line 303 
303          <td><code>gig_set_dim_zone()</code></td>          <td><code>gig_set_dim_zone()</code></td>
304          <td>Changes the currently active dimension zone.</td>          <td>Changes the currently active dimension zone.</td>
305        </tr>        </tr>
306          <tr>
307            <td><code>same_region()</code></td>
308            <td>Check whether two keys are mapped to the same region.</td>
309          </tr>
310      </table>      </table>
311    
312      <h2>Built-In Variables</h2>      <h2>Built-In Variables</h2>
# Line 255  Line 325 
325          <th>Variable</th> <th>Description</th>          <th>Variable</th> <th>Description</th>
326        </tr>        </tr>
327        <tr>        <tr>
328            <td><code>$CALLBACK_STATUS_QUEUE</code></td>
329            <td>Built-in constant reflecting the status of a callback to be
330                alive but suspended. See <code>callback_status()</code> for details.</td>
331          </tr>
332          <tr>
333            <td><code>$CALLBACK_STATUS_RUNNING</code></td>
334            <td>Built-in constant reflecting the status of a callback to be
335                alive and currently executing. See <code>callback_status()</code>
336                for details.</td>
337          </tr>
338          <tr>
339            <td><code>$CALLBACK_STATUS_TERMINATED</code></td>
340            <td>Built-in constant reflecting the status of a callback to be
341                not alive. See <code>callback_status()</code> for details.</td>
342          </tr>
343          <tr>
344          <td><code>$KSP_TIMER</code></td>          <td><code>$KSP_TIMER</code></td>
345          <td>Preserved for compatiblity reasons with KSP, returns the same value          <td>Preserved for compatiblity reasons with KSP, returns the same value
346             as <code>$NKSP_REAL_TIMER</code> (refer to the latter for details).             as <code>$NKSP_REAL_TIMER</code> (refer to the latter for details).
# Line 299  Line 385 
385          </td>          </td>
386        </tr>        </tr>
387        <tr>        <tr>
388            <td><code>%NKSP_CALLBACK_CHILD_ID[]</code></td>
389            <td>
390              Reflects the callback IDs of all child threads which the current
391              script callback instance spawned by having called <code>fork()</code> before.
392              See the latter function for details about this array variable.
393            </td>
394          </tr>
395          <tr>
396            <td><code>$NKSP_CALLBACK_PARENT_ID</code></td>
397            <td>
398              If the current execution thread is a child thread spawned by a <code>fork()</code>
399              call before, then this variable reflects the callback ID of the parent
400              thread which created this child thread. Otherwise this variable is <code>0</code>.
401              See <code>fork()</code> for more details about this variable.
402            </td>
403          </tr>
404          <tr>
405          <td><code>$NKSP_REAL_TIMER</code></td>          <td><code>$NKSP_REAL_TIMER</code></td>
406          <td>Returns the current time stamp in reality (in microseconds). You may          <td>Returns the current time stamp in reality (in microseconds). You may
407              read this variable from time to time to take              read this variable from time to time to take
# Line 477  Line 580 
580              as index to this array variable (see also <code>event_status()</code>).</td>              as index to this array variable (see also <code>event_status()</code>).</td>
581        </tr>        </tr>
582        <tr>        <tr>
583            <td><code>$NKSP_EASE_IN_EASE_OUT</code></td>
584            <td>Used to select a fade curve with "ease in and ease out" shape.</td>
585          </tr>
586          <tr>
587            <td><code>$NKSP_LINEAR</code></td>
588            <td>Used to select a fade curve with linear shape.</td>
589          </tr>
590          <tr>
591          <td><code>$VCC_MONO_AT</code></td>          <td><code>$VCC_MONO_AT</code></td>
592          <td>Constant identifying the MIDI monophonic aftertouch controller (also          <td>Constant identifying the MIDI monophonic aftertouch controller (also
593              called <i title="Amount of force on held-down key.">              called <i title="Amount of force on held-down key.">
# Line 550  Line 661 
661          <td>Constant that identifies the <i>keyboard position dimension</i>.</td>          <td>Constant that identifies the <i>keyboard position dimension</i>.</td>
662        </tr>        </tr>
663        <tr>        <tr>
664          <td><code>$GIG_DIM_ROUNDROBIN"</code></td>          <td><code>$GIG_DIM_ROUNDROBIN</code></td>
665          <td>Constant that identifies the <i>round robin dimension</i>.</td>          <td>Constant that identifies the <i>round robin dimension</i>.</td>
666        </tr>        </tr>
667        <tr>        <tr>
# Line 658  Line 769 
769          <td>Constant that identifies the <i>general purpose 8 MIDI controller dimension</i>.</td>          <td>Constant that identifies the <i>general purpose 8 MIDI controller dimension</i>.</td>
770        </tr>        </tr>
771      </table>      </table>
772    
773            <h2>Built-In Preprocessor Conditions</h2>
774        <p>
775          These are the built-in preprocessor conditions available with the NKSP realt-time
776          instrument script language.
777        </p>
778            
779        <h3>Core Language Preprocessor Conditions</h3>
780        <p>
781          Most fundamental NKSP built-in preprocessor conditions, independent from
782          any purpose of being used in a sampler.
783        </p>
784        <table>
785          <tr>
786            <th>Condition</th> <th>Description</th>
787          </tr>
788          <tr>
789            <td><code>NKSP_NO_MESSAGE</code></td>
790            <td>
791              By default this condition is not set. By explicitly enabling this
792              condition with <code>SET_CONDITION(NKSP_NO_MESSAGE)</code> it
793              causes all subsequent <code>message()</code> calls to be ignored
794              and filtered out on preprocessor level. See function <code>message()</code>
795              for details.
796            </td>
797          </tr>
798        </table>
799    
800    </body>    </body>
801  </html>  </html>

Legend:
Removed from v.3223  
changed lines
  Added in v.3396

  ViewVC Help
Powered by ViewVC