web-music-score - v6.4.0
    Preparing search index...

    Interface Instrument

    Instrument is deprecated, will be removed in future release. Current platform supports midi instruments built-in.

    interface Instrument {
        getName(): string;
        playNote(note: string, duration: number, linearVolume: number): void;
        stop(): void;
    }
    Index

    Methods

    • Get instrument name.

      Returns string

      • Instrument name.
    • Play a note.

      Parameters

      • note: string

        Note to play (e.g. "C4").

      • duration: number

        Play duration in seconds.

      • linearVolume: number

        Linear volume in range [0, 1].

      Returns void

    • Stop playback.

      Returns void