--- doc/docbase/instrument_scripts/nksp/reference/functions/nksp_ignore_event_function.html 2017/05/25 12:40:21 3210 +++ doc/docbase/instrument_scripts/nksp/reference/functions/nksp_ignore_event_function.html 2017/05/25 13:02:03 3211 @@ -57,7 +57,7 @@
The following example implements a simple split point behavior for your sound. It only plays notes starting at C5, all note-on events below C5 will be dropped. -
+
on init
{ MIDI note number for "C5" }
@@ -74,6 +74,23 @@
end if
end on
+
+ Since you are almost always passing $EVENT_ID
to ignore_event()
,
+ you can also omit that optional argument with NKSP. So the following
+ would behave identical with the example above.
+
+on init
+ { MIDI note number for "C5" }
+ declare const $splitPoint := 60
+end on
+
+on note
+ if ($EVENT_NOTE < $splitPoint)
+ ignore_event()
+ end if
+end on
+