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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2932 - (hide annotations) (download) (as text)
Sat Jul 9 14:41:00 2016 UTC (7 years, 9 months ago) by schoenebeck
File MIME type: text/html
File size: 12812 byte(s)
* NKSP: Added change_pan() built-in function.
* NKSP: Added change_tune() built-in function.
* NKSP: Added change_vol() built-in function.

1 schoenebeck 2732 <html>
2     <head>
3     <meta name="author" content="Christian Schoenebeck">
4     <title>NKSP Reference</title>
5     <urlpath>Reference</urlpath>
6     <navpath>Reference Manual</navpath>
7     <meta name="description" content="Reference documentation of the NKSP real-time instrument script language.">
8     </head>
9     <body>
10     <h1>NKSP Reference</h1>
11     <p>
12     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.
14     </p>
15    
16     <h2>Built-In Functions</h2>
17     <p>
18     These are the built-in functions available with the NKSP realt-time
19     instrument script language.
20     </p>
21    
22     <h3>Core Language Functions</h3>
23     <p>
24     Most fundamental NKSP functions, independent from any purpose of being used in a sampler.
25     </p>
26     <table>
27     <tr>
28     <th>Function</th> <th>Description</th>
29     </tr>
30     <tr>
31 schoenebeck 2742 <td><code lang="nksp">message()</code></td>
32 schoenebeck 2732 <td>Prints text to the sampler's terminal.</td>
33     </tr>
34     <tr>
35     <td><code>exit()</code></td>
36     <td>Stops execution of the current event handler instance.</td>
37     </tr>
38     <tr>
39     <td><code>wait()</code></td>
40     <td>Pauses execution for a certain amount of time.</td>
41     </tr>
42     <tr>
43     <td><code>abs()</code></td>
44     <td>Calculates the absolute value of a given value.</td>
45     </tr>
46     <tr>
47     <td><code>random()</code></td>
48     <td>Random number generator.</td>
49     </tr>
50     <tr>
51     <td><code>num_elements()</code></td>
52     <td>Returns the size of the requested array variable.</td>
53     </tr>
54     </table>
55    
56     <h3>Common Sampler Functions</h3>
57     <p>
58     Basic sampler related functions, independent from a particular sampler
59     format or sampler engine.
60     </p>
61     <table>
62     <tr>
63     <th>Function</th> <th>Description</th>
64     </tr>
65     <tr>
66     <td><code>play_note()</code></td>
67     <td>Triggers a new note.</td>
68     </tr>
69     <tr>
70 schoenebeck 2932 <td><code>change_pan()</code></td>
71     <td>Changes panning of voices (stereo balance).</td>
72     </tr>
73     <tr>
74     <td><code>change_tune()</code></td>
75     <td>Changes the tuning of voices.</td>
76     </tr>
77     <tr>
78     <td><code>change_vol()</code></td>
79     <td>Changes the volume of voices.</td>
80     </tr>
81     <tr>
82 schoenebeck 2732 <td><code>set_controller()</code></td>
83     <td>Creates a MIDI control change event.</td>
84     </tr>
85     <tr>
86     <td><code>ignore_event()</code></td>
87     <td>Drops the given event.</td>
88     </tr>
89     <tr>
90     <td><code>ignore_controller()</code></td>
91     <td>Drops the given MIDI control change event.</td>
92     </tr>
93     <tr>
94     <td><code>note_off()</code></td>
95     <td>Releases the requested note.</td>
96     </tr>
97     <tr>
98     <td><code>set_event_mark()</code></td>
99     <td>Adds an event to an event group.</td>
100     </tr>
101     <tr>
102     <td><code>delete_event_mark()</code></td>
103     <td>Removes an event from some event group.</td>
104     </tr>
105     <tr>
106     <td><code>by_marks()</code></td>
107     <td>Returns all events of an event group.</td>
108     </tr>
109     </table>
110    
111     <h3>GigaStudio Format Functions</h3>
112     <p>
113     Sampler format specific functions, dedicated to the individual features
114     of the GigaStudio format engine.
115     </p>
116     <table>
117     <tr>
118     <th>Function</th> <th>Description</th>
119     </tr>
120     <tr>
121     <td><code>gig_set_dim_zone()</code></td>
122     <td>Changes the currently active dimension zone.</td>
123     </tr>
124     </table>
125    
126     <h2>Built-In Variables</h2>
127     <p>
128     These are the built-in variables and built-in constants available with the
129     NKSP realt-time instrument script language.
130     </p>
131    
132     <h3>Common Sampler Variables</h3>
133     <p>
134     Basic sampler related built-in variables and constants, independent from a
135     particular sampler format or sampler engine.
136     </p>
137     <table>
138     <tr>
139     <th>Variable</th> <th>Description</th>
140     </tr>
141     <tr>
142     <td><code>$CC_NUM</code></td>
143     <td>MIDI controller number that caused the <code>controller</code>
144     handler to be executed (only useful in the context of a
145     <code>controller</code> handler).</td>
146     </tr>
147     <tr>
148     <td><code>%CC[]</code></td>
149     <td>Provides access to all current MIDI controller values. This can be
150     used in any context. Use the respective MIDI controller number as
151     index to this integer array variable. For instance <code>%CC[1]</code>
152     would give you the current value of the modulation wheel.
153     </td>
154     </tr>
155     <tr>
156     <td><code>$EVENT_ID</code></td>
157     <td>ID of the event that caused the current event handler to be executed. In
158     the context of a <code>note</code> handler this would be the event
159     ID of the note, within a <code>controller</code> handler it would
160     be the controller event ID, etc.</td>
161     </tr>
162     <tr>
163     <td><code>$EVENT_NOTE</code></td>
164     <td>MIDI note number that caused a note related
165     handler to be executed (only useful in the context of a
166     <code>note</code> or <code>release</code> handler).</td>
167     </tr>
168     <tr>
169     <td><code>$EVENT_VELOCITY</code></td>
170     <td>MIDI velocity value of the note that caused that note related
171     handler to be executed (only useful in the context of a
172     <code>note</code> or <code>release</code> handler).</td>
173     </tr>
174     <tr>
175     <td><code>%KEY_DOWN[]</code></td>
176     <td>This can be used in any context to check whether a certain MIDI
177     key is currently pressed down. Use the respective MIDI note number
178     as index to this array variable.</td>
179     </tr>
180     <tr>
181     <td><code>$VCC_MONO_AT</code></td>
182     <td>Constant identifying the MIDI monophonic aftertouch controller (also
183     called <i title="Amount of force on held-down key.">
184     MIDI channel pressure
185     </i>). This is somewhat different than in the MIDI standard. With
186     NKSP aftertouch is handled like an additional "regular" MIDI CC controller.
187     Therefore use
188     <code>%CC[$VCC_MONO_AT]</code> to obtain the current aftertouch value
189     in the context of a <code>controller</code> event handler.
190     </td>
191     </tr>
192     <tr>
193     <td><code>$VCC_PITCH_BEND</code></td>
194     <td>Constant identifying the pitch bend wheel controller.
195     This is somewhat different than in the MIDI standard. With
196     NKSP pitch bend is handled like an additional "regular" MIDI CC controller.
197     Therefore use
198     <code>%CC[$VCC_PITCH_BEND]</code> to obtain the current aftertouch value
199     in the context of a <code>controller</code> event handler.</td>
200     </tr>
201     <tr>
202     <td><code>$MARK_1</code> to <code>$MARK_28</code></td>
203     <td>Used to select one of the available 28 event groups.
204     See <code>set_event_mark()</code> for details.</td>
205     </tr>
206     </table>
207    
208     <h3>GigaStudio Format Variables</h3>
209     <p>
210     Sampler format specific built-in variables and constants, dedicated to the
211     individual features of the GigaStudio format engine.
212     </p>
213     <table>
214     <tr>
215     <th>Variable</th> <th>Description</th>
216     </tr>
217     <tr>
218     <td><code>$GIG_DIM_CHANNEL</code></td>
219     <td>Constant that identifies the <i>stereo dimension</i>.</td>
220     </tr>
221     <tr>
222     <td><code>$GIG_DIM_LAYER</code></td>
223     <td>Constant that identifies the <i>layer dimension</i>.</td>
224     </tr>
225     <tr>
226     <td><code>$GIG_DIM_VELOCITY</code></td>
227     <td>Constant that identifies the <i>velocity dimension</i>.</td>
228     </tr>
229     <tr>
230     <td><code>$GIG_DIM_AFTERTOUCH</code></td>
231     <td>Constant that identifies the <i>aftertouch dimension</i>.</td>
232     </tr>
233     <tr>
234     <td><code>$GIG_DIM_RELEASE</code></td>
235     <td>Constant that identifies the <i>release trigger dimension</i>.</td>
236     </tr>
237     <tr>
238     <td><code>$GIG_DIM_KEYBOARD</code></td>
239     <td>Constant that identifies the <i>keyboard position dimension</i>.</td>
240     </tr>
241     <tr>
242     <td><code>$GIG_DIM_ROUNDROBIN"</code></td>
243     <td>Constant that identifies the <i>round robin dimension</i>.</td>
244     </tr>
245     <tr>
246     <td><code>$GIG_DIM_RANDOM</code></td>
247     <td>Constant that identifies the <i>random dimension</i>.</td>
248     </tr>
249     <tr>
250     <td><code>$GIG_DIM_SMARTMIDI</code></td>
251     <td>Constant that identifies the <i>start MIDI dimension</i> (a.k.a iMIDI rules).</td>
252     </tr>
253     <tr>
254     <td><code>$GIG_DIM_ROUNDROBINKEY</code></td>
255     <td>Constant that identifies the <i>round robin key dimension</i>.</td>
256     </tr>
257     <tr>
258     <td><code>$GIG_DIM_MODWHEEL</code></td>
259     <td>Constant that identifies the <i>modulation wheel dimension</i>.</td>
260     </tr>
261     <tr>
262     <td><code>$GIG_DIM_SUSTAIN</code></td>
263     <td>Constant that identifies the <i>sustain pedal dimension</i> (a.k.a. hold pedal).</td>
264     </tr>
265     <tr>
266     <td><code>$GIG_DIM_PORTAMENTO</code></td>
267     <td>Constant that identifies the <i>portamento MIDI controller dimension</i>.</td>
268     </tr>
269     <tr>
270     <td><code>$GIG_DIM_SOSTENUTO</code></td>
271     <td>Constant that identifies the <i>sostenuto MIDI controller dimension</i>.</td>
272     </tr>
273     <tr>
274     <td><code>$GIG_DIM_SOFT</code></td>
275     <td>Constant that identifies the <i>soft pedal dimension</i>.</td>
276     </tr>
277     <tr>
278     <td><code>$GIG_DIM_BREATH</code></td>
279     <td>Constant that identifies the <i>breath controller dimension</i>.</td>
280     </tr>
281     <tr>
282     <td><code>$GIG_DIM_FOOT</code></td>
283     <td>Constant that identifies the <i>foot pedal dimension</i>.</td>
284     </tr>
285     <tr>
286     <td><code>$GIG_DIM_PORTAMENTOTIME</code></td>
287     <td>Constant that identifies the <i>portamento time controller dimension</i>.</td>
288     </tr>
289     <tr>
290     <td><code>$GIG_DIM_EFFECT1</code></td>
291     <td>Constant that identifies the <i>effect 1 MIDI controller dimension</i>.</td>
292     </tr>
293     <tr>
294     <td><code>$GIG_DIM_EFFECT2</code></td>
295     <td>Constant that identifies the <i>effect 2 MIDI controller dimension</i>.</td>
296     </tr>
297     <tr>
298     <td><code>$GIG_DIM_EFFECT1DEPTH</code></td>
299     <td>Constant that identifies the <i>effect 1 depth MIDI controller dimension</i>.</td>
300     </tr>
301     <tr>
302     <td><code>$GIG_DIM_EFFECT2DEPTH</code></td>
303     <td>Constant that identifies the <i>effect 2 depth MIDI controller dimension</i>.</td>
304     </tr>
305     <tr>
306     <td><code>$GIG_DIM_EFFECT3DEPTH</code></td>
307     <td>Constant that identifies the <i>effect 3 depth MIDI controller dimension</i>.</td>
308     </tr>
309     <tr>
310     <td><code>$GIG_DIM_EFFECT4DEPTH</code></td>
311     <td>Constant that identifies the <i>effect 4 depth MIDI controller dimension</i>.</td>
312     </tr>
313     <tr>
314     <td><code>$GIG_DIM_EFFECT5DEPTH</code></td>
315     <td>Constant that identifies the <i>effect 5 depth MIDI controller dimension</i>.</td>
316     </tr>
317     <tr>
318     <td><code>$GIG_DIM_GENPURPOSE1</code></td>
319     <td>Constant that identifies the <i>general purpose 1 MIDI controller dimension</i>.</td>
320     </tr>
321     <tr>
322     <td><code>$GIG_DIM_GENPURPOSE2</code></td>
323     <td>Constant that identifies the <i>general purpose 2 MIDI controller dimension</i>.</td>
324     </tr>
325     <tr>
326     <td><code>$GIG_DIM_GENPURPOSE3</code></td>
327     <td>Constant that identifies the <i>general purpose 3 MIDI controller dimension</i>.</td>
328     </tr>
329     <tr>
330     <td><code>$GIG_DIM_GENPURPOSE4</code></td>
331     <td>Constant that identifies the <i>general purpose 4 MIDI controller dimension</i>.</td>
332     </tr>
333     <tr>
334     <td><code>$GIG_DIM_GENPURPOSE5</code></td>
335     <td>Constant that identifies the <i>general purpose 5 MIDI controller dimension</i>.</td>
336     </tr>
337     <tr>
338     <td><code>$GIG_DIM_GENPURPOSE6</code></td>
339     <td>Constant that identifies the <i>general purpose 6 MIDI controller dimension</i>.</td>
340     </tr>
341     <tr>
342     <td><code>$GIG_DIM_GENPURPOSE7</code></td>
343     <td>Constant that identifies the <i>general purpose 7 MIDI controller dimension</i>.</td>
344     </tr>
345     <tr>
346     <td><code>$GIG_DIM_GENPURPOSE8</code></td>
347     <td>Constant that identifies the <i>general purpose 8 MIDI controller dimension</i>.</td>
348     </tr>
349     </table>
350    
351     </body>
352     </html>

  ViewVC Help
Powered by ViewVC