Adding back removed modify function

This commit is contained in:
2023-08-31 22:37:20 +03:00
parent 61e03fb1e1
commit 109d7283b8

View File

@ -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",