xen-midi
    Preparing search index...

    Class MidiIn

    Wrapper for webmidi.js input. Listens on multiple channels.

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Construct a new wrapper for a webmidi.js input device.

      Parameters

      • callback: NoteOnCallback

        Function to call when a note-on event is received on any of the available channels.

      • channels: Set<number>

        Channels to listen on.

      • Optionallog: (msg: string) => void

        Logging function.

      Returns MidiIn

    Properties

    callback: NoteOnCallback
    channels: Set<number>
    log: (msg: string) => void

    Methods

    • Fire global note-off.

      Returns void

    • Make this wrapper (and your callback) respond to note-on/off events from this MIDI input.

      Parameters

      • input: Input

        MIDI input to listen to.

      Returns void

    • Make this wrapper (and your callback) stop responding to note-on/off events from this MIDI input.

      Parameters

      • input: Input

        MIDI input that was listened to.

      Returns void