xen-midi
    Preparing search index...

    Type Alias Note

    Free-pitch MIDI note to be played at a later time.

    type Note = {
        duration: DOMHighResTimeStamp;
        frequency: number;
        rawAttack?: number;
        rawRelease?: number;
        time: DOMHighResTimeStamp | string;
    }
    Index

    Properties

    duration: DOMHighResTimeStamp

    Note duration in milliseconds (ms).

    frequency: number

    Frequency in Hertz (Hz).

    rawAttack?: number

    Attack velocity from 0 to 127.

    rawRelease?: number

    Release velocity from 0 to 127.

    time: DOMHighResTimeStamp | string

    Note-on time in milliseconds (ms) as measured by WebMidi.time.

    • If this is a number, it is treated as an absolute WebMidi timestamp.
    • If this is a string prefixed with "+", the note is delayed by that many milliseconds from the moment playNotes is called.
    • Otherwise, a string is parsed as a numeric absolute timestamp in milliseconds.