by_marks()

Returns an array of event IDs of all events being members of the requested event group. These are events which had previously been added to that event group by calling the set_event_mark() function. The by_marks() function acts as placeholder for all event IDs of the particular group and allows to manipulate a set of events this way with only one call.

After notes died, this function may still return those recently died notes' IDs for a certain while, that means for example that num_elements(by_marks($MARK_1)) may return a higher value than the actual amount of currently active notes. This does not mean that you have to remove dead notes from their groups by calling delete_event_mark(). The sampler automatically removes dead notes from their groups automatically after a certain amount of time, and in practice this lag does not have any negative impact on using this function, since all built-in functions automatically detect invalid IDs and are automatically ignoring IDs of dead notes.

Function Prototype

by_marks(??group-id??)

Arguments

Argument Name Data Type Description
??group-id?? Event Group ID Number Event group that shall be referenced. 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

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