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

Diff of /doc/docbase/instrument_scripts/nksp/reference/functions/nksp_ignore_controller_function.html

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

revision 2881 by schoenebeck, Tue Apr 19 16:09:52 2016 UTC revision 3209 by schoenebeck, Thu May 25 12:08:04 2017 UTC
# Line 21  Line 21 
21        Dropping control change events with this function only succeeds if the        Dropping control change events with this function only succeeds if the
22        event just "recently" occurred. That effectively means you should drop        event just "recently" occurred. That effectively means you should drop
23        the control change event in the <code>controller</code> event handler        the control change event in the <code>controller</code> event handler
24        before any <code>wait() calls, and before entering any loops that may        before any <code>wait()</code> calls, and before entering any loops that may
25        execute your script for a very long time. Because in both cases the        execute your script for a very long time. Because in both cases the
26        sampler may suspend your script for a certain amount of time and once        sampler may suspend your script for a certain amount of time and once
27        your script got resumed, the respective control change event may already        your script got resumed, the respective control change event may already
# Line 51  ignore_controller([??event-id??]) Line 51  ignore_controller([??event-id??])
51        <tr>        <tr>
52          <td><code>??event-id??</code></td>          <td><code>??event-id??</code></td>
53          <td>Event ID Number</td>          <td>Event ID Number</td>
54          <td>MIDI control change event to be dropped.<br>          <td>Event ID of the MIDI control change event to be dropped.<br>
55              [optional, default: ID of the event handler's event]</td>              [optional, default: ID of the event handler's event]</td>
56        </tr>        </tr>
57      </table>      </table>
# Line 60  ignore_controller([??event-id??]) Line 60  ignore_controller([??event-id??])
60      <p>None.</p>      <p>None.</p>
61            
62      <h3>Examples</h3>      <h3>Examples</h3>
63      <p>None yet.<p>      <p>
64          The following example implements a simple MIDI controller filter.
65          It causes all MIDI volume control change events (MIDI CC#7) to be dropped.
66        <p>
67        <code>
68    on init
69      { MIDI controller number for MIDI "volume change" events }
70      declare const $volumeCC := 7
71    end on
72    
73    on controller
74      if ($CC_NUM = $volumeCC)
75        { $EVENT_ID is a built-in variable which always reflects
76          the ID of the event which caused the execution of this
77          specific event handler instance, i.e. here it reflects
78          the respective MIDI control change event }
79        ignore_event($EVENT_ID)
80      end if
81    end on
82        </code>
83    
84      <note>      <note>
85        Dynamic, optional arguments are only supported by NKSP. If you want to        Dynamic, optional arguments are only supported by NKSP. If you want to

Legend:
Removed from v.2881  
changed lines
  Added in v.3209

  ViewVC Help
Powered by ViewVC