set_event_mark()
Adds the supplied event to the requested event group. This can be used to
i.e. conveniently manipulate a set of notes simultaniously with one single call
using the helper function by_marks()
. The latter acts as placeholder
for all event IDs of that group.
Function Prototype
set_event_mark(event-id, group-id)
Arguments
Argument Name | Data Type | Description |
---|---|---|
event-id |
Event ID Number | Event to be assigned to the group. [required] |
group-id |
Event Group ID Number | Event group where the event shall be added to. You should pass one
of the built-in constant variables $MARK_1 to
$MARK_28 for this argument to select one of the
28 available groups.[required] |
Return Value
None.
Examples
The following example implements two "exclusive" keyboard zones with a
split point at key 36
. The script enforces that only
notes of either one of the two keyboard zones may play at the same time.
So for example if you start playing notes left of the split point, all
sounds play as usual. Now however, as soon as you hit a note on the
right side of the split point, it will cause all notes left of the split
point to be released immediately.
- on note
- if ($EVENT_NOTE < 36)
- set_event_mark($EVENT_ID, $MARK_1)
- note_off(by_marks($MARK_2))
- else
- set_event_mark($EVENT_ID, $MARK_2)
- note_off(by_marks($MARK_1))
- end if
- end on