diff --git a/src/classes/SoundEvent.ts b/src/classes/SoundEvent.ts index c726b96..b4222a6 100644 --- a/src/classes/SoundEvent.ts +++ b/src/classes/SoundEvent.ts @@ -133,6 +133,20 @@ export class SoundEvent extends AudibleEvent { velocity = (value: number) => this.updateValue("velocity", value); vel = this.velocity; + // ================================================================================ + // AbstactEvent overrides + // ================================================================================ + + modify = (func: Function): this => { + const funcResult = func(this); + if (funcResult instanceof Object) return funcResult; + else { + func(this.values); + this.update(); + return this; + } + }; + update = (): void => { const [note, _] = noteFromPc( this.values.key || "C4",