/[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 2742 by schoenebeck, Wed Apr 29 00:22:59 2015 UTC revision 3580 by schoenebeck, Thu Aug 29 13:44:35 2019 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">message()</code></td>          <td><code lang="nksp">abort()</code></td>
34          <td>Prints text to the sampler's terminal.</td>          <td>Stops execution of a script callback.</td>
35          </tr>
36          <tr>
37            <td><code>abs()</code></td>
38            <td>Calculates the absolute value of a given value.</td>
39          </tr>
40          <tr>
41            <td><code lang="nksp">array_equal()</code></td>
42            <td>Check whether two arrays are equal.</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>
50            <td>Decrements the passed integer variable by one.</td>
51        </tr>        </tr>
52        <tr>        <tr>
53          <td><code>exit()</code></td>          <td><code>exit()</code></td>
54          <td>Stops execution of the current event handler instance.</td>          <td>Stops execution of the current event handler instance.</td>
55        </tr>        </tr>
56        <tr>        <tr>
57          <td><code>wait()</code></td>          <td><code>fork()</code></td>
58          <td>Pauses execution for a certain amount of time.</td>          <td>Creates new execution instances (threads).</td>
59        </tr>        </tr>
60        <tr>        <tr>
61          <td><code>abs()</code></td>          <td><code>inc()</code></td>
62          <td>Calculates the absolute value of a given value.</td>          <td>Increments the passed integer variable by one.</td>
63        </tr>        </tr>
64        <tr>        <tr>
65          <td><code>random()</code></td>          <td><code>in_range()</code></td>
66          <td>Random number generator.</td>          <td>Checks whether a value is between two other values.</td>
67          </tr>
68          <tr>
69            <td><code>max()</code></td>
70            <td>Calculates the maximum value of two given values.</td>
71          </tr>
72          <tr>
73            <td><code lang="nksp">message()</code></td>
74            <td>Prints text to the sampler's terminal.</td>
75          </tr>
76          <tr>
77            <td><code>min()</code></td>
78            <td>Calculates the minimum value of two given values.</td>
79        </tr>        </tr>
80        <tr>        <tr>
81          <td><code>num_elements()</code></td>          <td><code>num_elements()</code></td>
82          <td>Returns the size of the requested array variable.</td>          <td>Returns the size of the requested array variable.</td>
83        </tr>        </tr>
84          <tr>
85            <td><code>random()</code></td>
86            <td>Random number generator.</td>
87          </tr>
88          <tr>
89            <td><code>search()</code></td>
90            <td>Search for a certain value within an array.</td>
91          </tr>
92          <tr>
93            <td><code>sh_left()</code></td>
94            <td>Calculates a left bit shifted value.</td>
95          </tr>
96          <tr>
97            <td><code>sh_right()</code></td>
98            <td>Calculates a right bit shifted value.</td>
99          </tr>
100          <tr>
101            <td><code>sort()</code></td>
102            <td>Sort the given array.</td>
103          </tr>
104          <tr>
105            <td><code>stop_wait()</code></td>
106            <td>Resumes execution of a suspended script callback.</td>
107          </tr>
108          <tr>
109            <td><code>wait()</code></td>
110            <td>Pauses execution for a certain amount of time.</td>
111          </tr>
112      </table>      </table>
113        
114      <h3>Common Sampler Functions</h3>      <h3>Common Sampler Functions</h3>
115      <p>      <p>
116        Basic sampler related functions, independent from a particular sampler        Basic sampler related functions, independent from a particular sampler
# Line 63  Line 121 
121          <th>Function</th> <th>Description</th>          <th>Function</th> <th>Description</th>
122        </tr>        </tr>
123        <tr>        <tr>
124          <td><code>play_note()</code></td>          <td><code>by_marks()</code></td>
125          <td>Triggers a new note.</td>          <td>Returns all events of an event group.</td>
126        </tr>        </tr>
127        <tr>        <tr>
128          <td><code>set_controller()</code></td>          <td><code>change_amp_lfo_depth()</code></td>
129          <td>Creates a MIDI control change event.</td>          <td>Modifies the amplitude LFO depth.</td>
130        </tr>        </tr>
131        <tr>        <tr>
132          <td><code>ignore_event()</code></td>          <td><code>change_amp_lfo_freq()</code></td>
133          <td>Drops the given event.</td>          <td>Modifies the amplitude LFO frequency.</td>
134          </tr>
135          <tr>
136            <td><code>change_attack()</code></td>
137            <td>Modifies the amplitude attack time of voices.</td>
138          </tr>
139          <tr>
140            <td><code>change_cutoff()</code></td>
141            <td>Changes filter cutoff frequency of voices.</td>
142          </tr>
143          <tr>
144            <td><code>change_cutoff_attack()</code></td>
145            <td>Modifies the filter cutoff attack time of voices.</td>
146          </tr>
147          <tr>
148            <td><code>change_cutoff_decay()</code></td>
149            <td>Modifies the filter cutoff decay time of voices.</td>
150          </tr>
151          <tr>
152            <td><code>change_cutoff_lfo_depth()</code></td>
153            <td>Modifies the filter cutoff LFO depth.</td>
154          </tr>
155          <tr>
156            <td><code>change_cutoff_lfo_freq()</code></td>
157            <td>Modifies the filter cutoff LFO frequency.</td>
158          </tr>
159          <tr>
160            <td><code>change_cutoff_release()</code></td>
161            <td>Modifies the filter cutoff release time of voices.</td>
162          </tr>
163          <tr>
164            <td><code>change_cutoff_sustain()</code></td>
165            <td>Modifies the filter cutoff sustain level of voices.</td>
166          </tr>
167          <tr>
168            <td><code>change_decay()</code></td>
169            <td>Modifies the amplitude decay time of voices.</td>
170          </tr>
171          <tr>
172            <td><code>change_note()</code></td>
173            <td>Change MIDI note number of note.</td>
174          </tr>
175          <tr>
176            <td><code>change_pan()</code></td>
177            <td>Changes panning of voices (stereo balance).</td>
178          </tr>
179          <tr>
180            <td><code>change_pan_curve()</code></td>
181            <td>Changes the curve type of panning (stereo balance) changes.</td>
182          </tr>
183          <tr>
184            <td><code>change_pan_time()</code></td>
185            <td>Changes the duration of panning (stereo balance) changes.</td>
186          </tr>
187          <tr>
188            <td><code>change_pitch_lfo_depth()</code></td>
189            <td>Modifies the pitch LFO depth.</td>
190          </tr>
191          <tr>
192            <td><code>change_pitch_lfo_freq()</code></td>
193            <td>Modifies the pitch LFO frequency.</td>
194          </tr>
195          <tr>
196            <td><code>change_play_pos()</code></td>
197            <td>Change the sample playback position.</td>
198          </tr>
199          <tr>
200            <td><code>change_release()</code></td>
201            <td>Modifies the amplitude release time of voices.</td>
202          </tr>
203          <tr>
204            <td><code>change_reso()</code></td>
205            <td>Changes filter resonance of voices.</td>
206          </tr>
207          <tr>
208            <td><code>change_sustain()</code></td>
209            <td>Modifies the amplitude sustain level of voices.</td>
210          </tr>
211          <tr>
212            <td><code>change_tune()</code></td>
213            <td>Changes the tuning of voices.</td>
214          </tr>
215          <tr>
216            <td><code>change_tune_curve()</code></td>
217            <td>Changes the curve type of tuning changes.</td>
218          </tr>
219          <tr>
220            <td><code>change_tune_time()</code></td>
221            <td>Changes the duration of tuning changes.</td>
222          </tr>
223          <tr>
224            <td><code>change_velo()</code></td>
225            <td>Change MIDI velocity of note.</td>
226          </tr>
227          <tr>
228            <td><code>change_vol()</code></td>
229            <td>Changes the volume of voices.</td>
230          </tr>
231          <tr>
232            <td><code>change_vol_curve()</code></td>
233            <td>Changes the curve type of volume changes.</td>
234          </tr>
235          <tr>
236            <td><code>change_vol_time()</code></td>
237            <td>Changes the duration of volume changes.</td>
238          </tr>
239          <tr>
240            <td><code>delete_event_mark()</code></td>
241            <td>Removes an event from some event group.</td>
242          </tr>
243          <tr>
244            <td><code>event_status()</code></td>
245            <td>Checks and returns whether a particular note is still alive.</td>
246          </tr>
247          <tr>
248            <td><code>fade_in()</code></td>
249            <td>Fade the requested note in.</td>
250          </tr>
251          <tr>
252            <td><code>fade_out()</code></td>
253            <td>Fade the requested note out.</td>
254          </tr>
255          <tr>
256            <td><code>get_event_par()</code></td>
257            <td>Get the current value of a specific note parameter.</td>
258        </tr>        </tr>
259        <tr>        <tr>
260          <td><code>ignore_controller()</code></td>          <td><code>ignore_controller()</code></td>
261          <td>Drops the given MIDI control change event.</td>          <td>Drops the given MIDI control change event.</td>
262        </tr>        </tr>
263        <tr>        <tr>
264            <td><code>ignore_event()</code></td>
265            <td>Drops the given event.</td>
266          </tr>
267          <tr>
268          <td><code>note_off()</code></td>          <td><code>note_off()</code></td>
269          <td>Releases the requested note.</td>          <td>Releases the requested note.</td>
270        </tr>        </tr>
271        <tr>        <tr>
272          <td><code>set_event_mark()</code></td>          <td><code>play_note()</code></td>
273          <td>Adds an event to an event group.</td>          <td>Triggers a new note.</td>
274        </tr>        </tr>
275        <tr>        <tr>
276          <td><code>delete_event_mark()</code></td>          <td><code>set_controller()</code></td>
277          <td>Removes an event from some event group.</td>          <td>Creates a MIDI control change event.</td>
278        </tr>        </tr>
279        <tr>        <tr>
280          <td><code>by_marks()</code></td>          <td><code>set_event_mark()</code></td>
281          <td>Returns all events of an event group.</td>          <td>Adds an event to an event group.</td>
282          </tr>
283          <tr>
284            <td><code>set_event_par()</code></td>
285            <td>Change the value of a specific note parameter.</td>
286        </tr>        </tr>
287      </table>      </table>
288        
289      <h3>GigaStudio Format Functions</h3>      <h3>GigaStudio Format Functions</h3>
290      <p>      <p>
291        Sampler format specific functions, dedicated to the individual features        Sampler format specific functions, dedicated to the individual features
# Line 109  Line 299 
299          <td><code>gig_set_dim_zone()</code></td>          <td><code>gig_set_dim_zone()</code></td>
300          <td>Changes the currently active dimension zone.</td>          <td>Changes the currently active dimension zone.</td>
301        </tr>        </tr>
302          <tr>
303            <td><code>same_region()</code></td>
304            <td>Check whether two keys are mapped to the same region.</td>
305          </tr>
306      </table>      </table>
307    
308      <h2>Built-In Variables</h2>      <h2>Built-In Variables</h2>
# Line 116  Line 310 
310        These are the built-in variables and built-in constants available with the        These are the built-in variables and built-in constants available with the
311        NKSP realt-time instrument script language.        NKSP realt-time instrument script language.
312      </p>      </p>
313        
314        <h3>Core Language Variables</h3>
315        <p>
316          Most fundamental NKSP built-in variables, independent from any purpose of
317          being used in a sampler.
318        </p>
319        <table>
320          <tr>
321            <th>Variable</th> <th>Description</th>
322          </tr>
323          <tr>
324            <td><code>$CALLBACK_STATUS_QUEUE</code></td>
325            <td>Built-in constant reflecting the status of a callback to be
326                alive but suspended. See <code>callback_status()</code> for details.</td>
327          </tr>
328          <tr>
329            <td><code>$CALLBACK_STATUS_RUNNING</code></td>
330            <td>Built-in constant reflecting the status of a callback to be
331                alive and currently executing. See <code>callback_status()</code>
332                for details.</td>
333          </tr>
334          <tr>
335            <td><code>$CALLBACK_STATUS_TERMINATED</code></td>
336            <td>Built-in constant reflecting the status of a callback to be
337                not alive. See <code>callback_status()</code> for details.</td>
338          </tr>
339          <tr>
340            <td><code>$KSP_TIMER</code></td>
341            <td>Preserved for compatiblity reasons with KSP, returns the same value
342               as <code>$NKSP_REAL_TIMER</code> (refer to the latter for details).
343               Note that KSP's <code>reset_ksp_timer()</code> function is not available with
344               NKSP. However when calculating time differences between two time
345               stamps taken with <code>$NKSP_REAL_TIMER</code>, calling such a reset
346               function is not required, because the underlying clock does not stop
347               when it reached its value limit (which happens every 71 minutes), instead the clock
348               will automatically restart from zero and the calculated time difference
349               even between such transitions will reflect correct durations.</td>
350          </tr>
351          <tr>
352            <td><code>$NKSP_PERF_TIMER</code></td>
353            <td>Returns the current performance time stamp (in microseconds) of the
354                script running. You may read this variable from time to time to take
355                time stamps which can be used to calculate the time difference
356                (in microseconds) which elapsed between them. A performance time
357                stamp is based on the script's actual CPU execution time. So the
358                internal clock which is used for generating such time stamps is only
359                running forward if the respective script is actually executed by the
360                CPU. Whenever your script is not really executed by the CPU (i.e. because
361                your script got suspended by a wait() call or got forcely suspended due to
362                real-time constraints, or when the entire sampler application got suspended
363                by the OS for other applications or OS tasks) then the underlying internal
364                clock is paused as well.
365                <note class="important">
366                  You should only use this built-in variable for script development
367                  purposes (i.e. for bench marking the performance of your script).
368                  You should <b>not</b> use it with your final production sounds!
369                  It is not appropriate for being used in a musical context, because
370                  when an offline bounce is performed for instance, the musical timing
371                  will be completely unrelated to the CPU execution time. Plus using
372                  this variable may cause audio drop outs on some systems. In a musical
373                  context you should use <code>$ENGINE_UPTIME</code> instead, which is
374                  also safe for offline bounces.
375                </note>
376                <note>
377                  On some systems <code>$NKSP_REAL_TIMER</code> and
378                  <code>$NKSP_PERF_TIMER</code> will actually return the same value. So the
379                  difference between them is not implemented for all systems at the moment.
380                </note>
381            </td>
382          </tr>
383          <tr>
384            <td><code>%NKSP_CALLBACK_CHILD_ID[]</code></td>
385            <td>
386              Reflects the callback IDs of all child threads which the current
387              script callback instance spawned by having called <code>fork()</code> before.
388              See the latter function for details about this array variable.
389            </td>
390          </tr>
391          <tr>
392            <td><code>$NKSP_CALLBACK_PARENT_ID</code></td>
393            <td>
394              If the current execution thread is a child thread spawned by a <code>fork()</code>
395              call before, then this variable reflects the callback ID of the parent
396              thread which created this child thread. Otherwise this variable is <code>0</code>.
397              See <code>fork()</code> for more details about this variable.
398            </td>
399          </tr>
400          <tr>
401            <td><code>$NKSP_REAL_TIMER</code></td>
402            <td>Returns the current time stamp in reality (in microseconds). You may
403                read this variable from time to time to take
404                time stamps which can be used to calculate the time difference
405                (in microseconds) which elapsed between them. A "real" time
406                stamp is based on an internal clock which constantly proceeds, so this
407                internal clock also continues counting while your script is either suspended
408                (i.e. because your script got suspended by a wait() call or got forcely
409                suspended due to real-time constraints) and it also continues counting
410                even if the entire sampler application got suspended by the OS (i.e. to
411                execute other applications for multi-tasking or to perform OS tasks).
412                <note class="important">
413                  You should only use this built-in variable for script development
414                  purposes (i.e. for bench marking the performance of your script).
415                  You should <b>not</b> use it with your final production sounds!
416                  It is not appropriate for being used in a musical context, because
417                  when an offline bounce is performed for instance, the musical timing
418                  will be completely unrelated to the CPU execution time. Plus using
419                  this variable may cause audio drop outs on some systems. In a musical
420                  context you should use <code>$ENGINE_UPTIME</code> instead, which is
421                  also safe for offline bounces.
422                </note>
423                <note>
424                  On some systems <code>$NKSP_REAL_TIMER</code> and
425                  <code>$NKSP_PERF_TIMER</code> will actually return the same value. So the
426                  difference between them is not implemented for all systems at the moment.
427                </note>
428            </td>
429          </tr>
430          <tr>
431            <td><code>$NI_CALLBACK_ID</code></td>
432            <td>Reflects the current event handler instance's unique callback ID.
433                For the same event type there may be more than
434                one event handler instances running. Each one of them has
435                its own callback ID. You can get the current event handler
436                instance's callback ID by reading this built-in variable.</td>
437          </tr>
438          <tr>
439            <td><code>$NI_CALLBACK_TYPE</code></td>
440            <td>Reflects the event type of the current event handler. This variable
441                may reflect one of the following built-in constants:
442                <code>$NI_CB_TYPE_INIT</code>, <code>$NI_CB_TYPE_NOTE</code>,
443                <code>$NI_CB_TYPE_RELEASE</code>, <code>$NI_CB_TYPE_CONTROLLER</code>.</td>
444          </tr>
445          <tr>
446            <td><code>$NI_CB_TYPE_INIT</code></td>
447            <td>Built-in constant reflecting an <code>init</code> event handler type.</td>
448          </tr>
449          <tr>
450            <td><code>$NI_CB_TYPE_NOTE</code></td>
451            <td>Built-in constant reflecting a <code>note</code> event handler type.</td>
452          </tr>
453          <tr>
454            <td><code>$NI_CB_TYPE_RELEASE</code></td>
455            <td>Built-in constant reflecting a <code>release</code> event handler type.</td>
456          </tr>
457          <tr>
458            <td><code>$NI_CB_TYPE_CONTROLLER</code></td>
459            <td>Built-in constant reflecting a <code>controller</code> event handler type.</td>
460          </tr>
461          <tr>
462            <td><code>$NKSP_IGNORE_WAIT</code></td>
463            <td>If this boolean built-in variable is <code>1</code> then all calls of your
464                event handler instance to function <code>wait()</code> will be ignored.
465                This may for example be the case if another event handler instance
466                resumed your paused script by calling <code>stop_wait()</code> and
467                passing <code>1</code> to the 2nd argument of that function.</td>
468          </tr>
469        </table>
470    
471      <h3>Common Sampler Variables</h3>      <h3>Common Sampler Variables</h3>
472      <p>      <p>
473        Basic sampler related built-in variables and constants, independent from a        Basic sampler related built-in variables and constants, independent from a
# Line 127  Line 478 
478          <th>Variable</th> <th>Description</th>          <th>Variable</th> <th>Description</th>
479        </tr>        </tr>
480        <tr>        <tr>
481            <td><code>%ALL_EVENTS</code></td>
482            <td>
483              Note IDs of all currently active notes of the current sampler part (a.k.a. sampler channel).
484              This may be passed to many built-in functions like <code>note_off()</code>.
485              This array variable only contains IDs of notes which were launched due
486              to MIDI note-on events. This variable does not contain IDs of child notes
487              (i.e. notes which were launched programmatically by calling <code>play_note()</code>).
488              <note>
489                In contrast to KSP this variable is an integer array type, whereas KSP's
490                pendent of this built-in variable is an integer constant (scalar) called
491                <code>$ALL_EVENTS</code>. Using the latter with NKSP will cause a
492                parser warning, the behavior will be the same though.
493              </note>
494            </td>
495          </tr>
496          <tr>
497          <td><code>$CC_NUM</code></td>          <td><code>$CC_NUM</code></td>
498          <td>MIDI controller number that caused the <code>controller</code>          <td>MIDI controller number that caused the <code>controller</code>
499              handler to be executed (only useful in the context of a              handler to be executed (only useful in the context of a
# Line 160  Line 527 
527              <code>note</code> or <code>release</code> handler).</td>              <code>note</code> or <code>release</code> handler).</td>
528        </tr>        </tr>
529        <tr>        <tr>
530            <td><code>$EVENT_STATUS_INACTIVE</code></td>
531            <td>Constant bit flag used as possible return value by
532                <code>event_status()</code> in case the requested
533                note is not "alive".</td>
534          </tr>
535          <tr>
536            <td><code>$EVENT_STATUS_NOTE_QUEUE</code></td>
537            <td>Constant bit flag used as possible return value by
538                <code>event_status()</code> in case the requested
539                note is still "alive".</td>
540          </tr>
541          <tr>
542            <td><code>$EVENT_PAR_NOTE</code></td>
543            <td>Constant value symbolizing the "note number" parameter. See
544                <code>get_event_par()</code> and <code>set_event_par()</code>
545                for details.</td>
546          </tr>
547          <tr>
548            <td><code>$EVENT_PAR_TUNE</code></td>
549            <td>Constant value symbolizing the "tune" parameter. See
550                <code>get_event_par()</code> and <code>set_event_par()</code>
551                for details.</td>
552          </tr>
553          <tr>
554            <td><code>$EVENT_PAR_VELOCITY</code></td>
555            <td>Constant value symbolizing the "note velocity" parameter. See
556                <code>get_event_par()</code> and <code>set_event_par()</code>
557                for details.</td>
558          </tr>
559          <tr>
560            <td><code>$EVENT_PAR_VOLUME</code></td>
561            <td>Constant value symbolizing the "volume" parameter. See
562                <code>get_event_par()</code> and <code>set_event_par()</code>
563                for details.</td>
564          </tr>
565          <tr>
566            <td><code>$EVENT_PAR_0</code> to <code>$EVENT_PAR_3</code></td>
567            <td>Four constant values symbolizing the 4 possible user specific
568                parameters, which i.e. might be used to pass data from one script
569                (slot) to another script (slot). See  <code>get_event_par()</code>
570                and <code>set_event_par()</code> for details.</td>
571          </tr>
572          <tr>
573          <td><code>%KEY_DOWN[]</code></td>          <td><code>%KEY_DOWN[]</code></td>
574          <td>This can be used in any context to check whether a certain MIDI          <td>This can be used in any context to check whether a certain MIDI
575              key is currently pressed down. Use the respective MIDI note number              key is currently pressed down. Use the respective MIDI note number
576              as index to this array variable.</td>              as index to this array variable (see also <code>event_status()</code>).</td>
577          </tr>
578          <tr>
579            <td><code>$NKSP_EASE_IN_EASE_OUT</code></td>
580            <td>Used to select a fade curve with "ease in and ease out" shape.</td>
581          </tr>
582          <tr>
583            <td><code>$NKSP_LINEAR</code></td>
584            <td>Used to select a fade curve with linear shape.</td>
585        </tr>        </tr>
586        <tr>        <tr>
587          <td><code>$VCC_MONO_AT</code></td>          <td><code>$VCC_MONO_AT</code></td>
# Line 183  Line 601 
601              This is somewhat different than in the MIDI standard. With              This is somewhat different than in the MIDI standard. With
602              NKSP pitch bend is handled like an additional "regular" MIDI CC controller.              NKSP pitch bend is handled like an additional "regular" MIDI CC controller.
603              Therefore use              Therefore use
604              <code>%CC[$VCC_PITCH_BEND]</code> to obtain the current aftertouch value              <code>%CC[$VCC_PITCH_BEND]</code> to obtain the current pitch bend wheel value
605              in the context of a <code>controller</code> event handler.</td>              in the context of a <code>controller</code> event handler.</td>
606        </tr>        </tr>
607        <tr>        <tr>
# Line 191  Line 609 
609          <td>Used to select one of the available 28 event groups.          <td>Used to select one of the available 28 event groups.
610          See <code>set_event_mark()</code> for details.</td>          See <code>set_event_mark()</code> for details.</td>
611        </tr>        </tr>
612          <tr>
613            <td><code>$ENGINE_UPTIME</code></td>
614            <td>Returns the current time stamp (in milliseconds) for being
615                used in a musical context. You may read this variable from time to time
616                to take time stamps which can be used to calculate the time difference
617                (in milliseconds) which elapsed between them. These timing values are
618                based on the internal sample rate and thus it can safely be used to
619                perform musical timing related tasks in your scripts. Especially
620                your script will also continue to behave correctly when an offline bounce
621                of a song is performed.
622            </td>
623          </tr>
624      </table>      </table>
625    
626      <h3>GigaStudio Format Variables</h3>      <h3>GigaStudio Format Variables</h3>
# Line 227  Line 657 
657          <td>Constant that identifies the <i>keyboard position dimension</i>.</td>          <td>Constant that identifies the <i>keyboard position dimension</i>.</td>
658        </tr>        </tr>
659        <tr>        <tr>
660          <td><code>$GIG_DIM_ROUNDROBIN"</code></td>          <td><code>$GIG_DIM_ROUNDROBIN</code></td>
661          <td>Constant that identifies the <i>round robin dimension</i>.</td>          <td>Constant that identifies the <i>round robin dimension</i>.</td>
662        </tr>        </tr>
663        <tr>        <tr>
# Line 335  Line 765 
765          <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>
766        </tr>        </tr>
767      </table>      </table>
768    
769            <h2>Built-In Preprocessor Conditions</h2>
770        <p>
771          These are the built-in preprocessor conditions available with the NKSP realt-time
772          instrument script language.
773        </p>
774            
775        <h3>Core Language Preprocessor Conditions</h3>
776        <p>
777          Most fundamental NKSP built-in preprocessor conditions, independent from
778          any purpose of being used in a sampler.
779        </p>
780        <table>
781          <tr>
782            <th>Condition</th> <th>Description</th>
783          </tr>
784          <tr>
785            <td><code>NKSP_NO_MESSAGE</code></td>
786            <td>
787              By default this condition is not set. By explicitly enabling this
788              condition with <code>SET_CONDITION(NKSP_NO_MESSAGE)</code> it
789              causes all subsequent <code>message()</code> calls to be ignored
790              and filtered out on preprocessor level. See function <code>message()</code>
791              for details.
792            </td>
793          </tr>
794        </table>
795    
796    </body>    </body>
797  </html>  </html>

Legend:
Removed from v.2742  
changed lines
  Added in v.3580

  ViewVC Help
Powered by ViewVC