spessasynth_core documentation
    Preparing search index...

    Interface ChannelSnapshot

    This interface is a snapshot of a MIDIChannel, capturing its current state, which can be saved and restored.

    See also SynthesizerSnapshot.

    interface ChannelSnapshot {
        channel: number;
        customVibrato: CustomChannelVibrato;
        drumChannel: boolean;
        drumParams: DrumParameter[];
        generators: ChannelGenerators;
        lockedControllers: boolean[];
        lockedMIDIParameters: Record<keyof ChannelMIDIParameter, boolean>;
        lockedSystem: MIDISystem;
        midiControllers: Int16Array;
        midiParameters: ChannelMIDIParameter;
        octaveTuning: Int8Array;
        patch?: MIDIPatchFull;
        perNotePitch: boolean;
        pitchWheels: Int16Array;
        systemParameters: ChannelSystemParameter;
    }
    Index
    channel: number

    The channel's number (0-based index).

    customVibrato: CustomChannelVibrato

    The vibrato settings for the channel.

    drumChannel: boolean

    Indicates whether this channel is a drum channel.

    drumParams: DrumParameter[]

    Parameters for each drum instrument.

    generators: ChannelGenerators

    Used for handling SF2/AWE32 NRPN generator adjustments.

    lockedControllers: boolean[]

    An array indicating if a controller, at the equivalent index in the midiControllers array, is locked (i.e., not allowed changing). A locked controller cannot be modified.

    lockedMIDIParameters: Record<keyof ChannelMIDIParameter, boolean>

    An object indicating if a Channel MIDI parameter, at the equivalent key, is locked (i.e., not allowed changing). A locked parameter cannot be modified.

    lockedSystem: MIDISystem

    Indicates the MIDI system when the preset was locked.

    midiControllers: Int16Array

    An array of MIDI controllers for the channel. This array is used to store the state of various MIDI controllers such as volume, pan, modulation, etc.

    A bit of an explanation: The controller table is stored as an int16 array, it stores 14-bit values, allowing for full 14-bit LSB resolution. The only exception from this are the Registered and Non-Registered Parameter Numbers. Data entries do store it!

    midiParameters: ChannelMIDIParameter

    The Channel MIDI Parameters of this channel. These are only editable via MIDI messages.

    octaveTuning: Int8Array

    An array of octave tuning values for each note on the channel. Each index corresponds to a note (0 = C, 1 = C#, ..., 11 = B). Note: Repeated every 12 notes.

    The currently selected MIDI patch of the channel.

    perNotePitch: boolean

    Per-note pitch wheel mode uses the pitchWheels table as source instead of the regular entry in the midiControllers table.

    pitchWheels: Int16Array

    An array for the MIDI 2.0 Per-note pitch wheels.

    systemParameters: ChannelSystemParameter

    The Channel System Parameters of this channel. These are only editable via the API.