ViewVC logotype

Contents of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_ignore_event_function.html

Parent Directory Parent Directory | Revision Log Revision Log

Revision 2881 - (show annotations) (download) (as text)
Tue Apr 19 16:09:52 2016 UTC (6 years, 5 months ago) by schoenebeck
File MIME type: text/html
File size: 2296 byte(s)
* NKSP: updated reference documentation for development changes
  regarding play_note(), ignore_event() and ignore_controller()

1 <html>
2 <head>
3 <meta name="author" content="Christian Schoenebeck">
4 <title>ignore_event() function</title>
5 <meta name="description" content="Drops the given event.">
6 </head>
7 <body>
8 <h1>ignore_event()</h1>
9 <p>
10 Drops the given event and thus prevents the supplied event to be further
11 processed by the sampler. You can use this function i.e. to filter out
12 MIDI note on and MIDI note off events, before they are causing new notes
13 to be triggered, or to drop certain MIDI control change events before
14 they can cause any sound to be changed.
15 </p>
16 <p>
17 Dropping events with this function only succeeds if the event just
18 "recently" occurred. That effectively means you should drop the event in
19 the respective event handler before any <code>wait() calls, and before
20 entering any loops that may execute your script for a very long time.
21 Because in both cases the sampler may suspend your script for a certain
22 amount of time and once your script got resumed, the respective event may
23 already have entered the sampler's regular event processing chain and
24 thus can no longer be dropped.
25 </p>
26 <p>
27 There is also an <code lang="nksp">ignore_controller()</code> function,
28 intended for explicitly dropping control change events. With NKSP you
29 you can also use <code>ignore_event()</code> though to
30 drop control change events. So <code>ignore_controller()</code>
31 merely exists due to compatibility reasons with KSP.
32 </p>
34 <h3>Function Prototype</h3>
35 <p/>
36 <code>
37 ignore_event(??event-id??)
38 </code>
40 <h3>Arguments</h3>
41 <table>
42 <tr>
43 <th>Argument Name</th> <th>Data Type</th> <th>Description</th>
44 </tr>
45 <tr>
46 <td><code>??event-id??</code></td>
47 <td>Event ID Number or Event ID Array</td>
48 <td>MIDI event(s) to be dropped.<br>
49 [required]</td>
50 </tr>
51 </table>
53 <h3>Return Value</h3>
54 <p>None.</p>
56 <h3>Examples</h3>
57 <p>None yet.<p>
59 <note>
60 Passing an array of event IDs is only supported by NKSP. If you want
61 to keep compatibility to KSP, then you should only pass a single
62 event ID to this function.
63 </note>
65 </body>
66 </html>

  ViewVC Help
Powered by ViewVC