57 |
<p> |
<p> |
58 |
The following example implements a simple split point behavior for your sound. |
The following example implements a simple split point behavior for your sound. |
59 |
It only plays notes starting at C5, all note-on events below C5 will be dropped. |
It only plays notes starting at C5, all note-on events below C5 will be dropped. |
60 |
<p> |
</p> |
61 |
<code> |
<code> |
62 |
on init |
on init |
63 |
{ MIDI note number for "C5" } |
{ MIDI note number for "C5" } |
74 |
end if |
end if |
75 |
end on |
end on |
76 |
</code> |
</code> |
77 |
|
<p> |
78 |
|
Since you are almost always passing <code>$EVENT_ID</code> to <code>ignore_event()</code>, |
79 |
|
you can also omit that optional argument with NKSP. So the following |
80 |
|
would behave identical with the example above. |
81 |
|
</p> |
82 |
|
<code> |
83 |
|
on init |
84 |
|
{ MIDI note number for "C5" } |
85 |
|
declare const $splitPoint := 60 |
86 |
|
end on |
87 |
|
|
88 |
|
on note |
89 |
|
if ($EVENT_NOTE < $splitPoint) |
90 |
|
ignore_event() |
91 |
|
end if |
92 |
|
end on |
93 |
|
</code> |
94 |
|
|
95 |
<note> |
<note> |
96 |
Passing an array of event IDs is only supported by NKSP. If you want |
Passing an array of event IDs is only supported by NKSP. If you want |