63 |
<p> |
<p> |
64 |
The following example implements a simple MIDI controller filter. |
The following example implements a simple MIDI controller filter. |
65 |
It causes all MIDI volume control change events (MIDI CC#7) to be dropped. |
It causes all MIDI volume control change events (MIDI CC#7) to be dropped. |
66 |
<p> |
</p> |
67 |
<code> |
<code> |
68 |
on init |
on init |
69 |
{ MIDI controller number for MIDI "volume change" events } |
{ MIDI controller number for MIDI "volume change" events } |
80 |
end if |
end if |
81 |
end on |
end on |
82 |
</code> |
</code> |
83 |
|
<p> |
84 |
|
Since you are almost always passing <code>$EVENT_ID</code> to <code>ignore_controller()</code>, |
85 |
|
you can also omit that optional argument with NKSP. So the following |
86 |
|
would behave identical with the example above. |
87 |
|
</p> |
88 |
|
<code> |
89 |
|
on init |
90 |
|
{ MIDI controller number for MIDI "volume change" events } |
91 |
|
declare const $volumeCC := 7 |
92 |
|
end on |
93 |
|
|
94 |
|
on controller |
95 |
|
if ($CC_NUM = $volumeCC) |
96 |
|
ignore_controller() |
97 |
|
end if |
98 |
|
end on |
99 |
|
</code> |
100 |
|
|
101 |
<note> |
<note> |
102 |
Dynamic, optional arguments are only supported by NKSP. If you want to |
Dynamic, optional arguments are only supported by NKSP. If you want to |