Added null to sound()
This commit is contained in:
@ -28,6 +28,7 @@ import {
|
|||||||
import { Speaker } from "./StringExtensions";
|
import { Speaker } from "./StringExtensions";
|
||||||
import { getScaleNotes } from "zifferjs";
|
import { getScaleNotes } from "zifferjs";
|
||||||
import { OscilloscopeConfig, blinkScript } from "./AudioVisualisation";
|
import { OscilloscopeConfig, blinkScript } from "./AudioVisualisation";
|
||||||
|
import { SkipEvent } from './classes/SkipEvent';
|
||||||
|
|
||||||
interface ControlChange {
|
interface ControlChange {
|
||||||
channel: number;
|
channel: number;
|
||||||
@ -1879,8 +1880,9 @@ export class UserAPI {
|
|||||||
// Trivial functions
|
// Trivial functions
|
||||||
// =============================================================
|
// =============================================================
|
||||||
|
|
||||||
sound = (sound: string | string[]) => {
|
sound = (sound: string | string[] | null | undefined) => {
|
||||||
return new SoundEvent(sound, this.app);
|
if(sound) return new SoundEvent(sound, this.app);
|
||||||
|
else return new SkipEvent();
|
||||||
};
|
};
|
||||||
|
|
||||||
snd = this.sound;
|
snd = this.sound;
|
||||||
|
|||||||
Reference in New Issue
Block a user