toEventTypes method
Convert from a SYZ_EVENT_TYPES
member.
Implementation
EventTypes toEventTypes() {
switch (this) {
case SYZ_EVENT_TYPES.SYZ_EVENT_TYPE_INVALID:
return EventTypes.invalid;
case SYZ_EVENT_TYPES.SYZ_EVENT_TYPE_LOOPED:
return EventTypes.looped;
case SYZ_EVENT_TYPES.SYZ_EVENT_TYPE_FINISHED:
return EventTypes.finished;
case SYZ_EVENT_TYPES.SYZ_EVENT_TYPE_USER_AUTOMATION:
return EventTypes.userAutomation;
default:
throw SynthizerError(
'Unrecognised `SYZ_EVENT_TYPES` member.',
this,
);
}
}