spessasynth_core documentation
    Preparing search index...

    Interface ChannelMIDIParameter

    Channel MIDI Parameters are MIDI-only parameters that affect a single MIDI channel.

    They are MIDI Parameters, meaning that they can only be changed via MIDI messages, and not via the API. They get reset via MIDI reset messages.

    DEFAULT_CHANNEL_MIDI_PARAMETERS is provided with the library, containing the defaults.

    They also have an associated event (ChannelMIDIParameterChangeEvent) and can be locked.

    Examples:

    • pitchWheel
    • pressure
    interface ChannelMIDIParameter {
        assignMode: number;
        cc1: MIDIController;
        cc2: MIDIController;
        drumMap: number;
        dryLevel: number;
        efxAssign: boolean;
        fineTune: number;
        keyShift: number;
        modulationDepth: number;
        pitchWheel: number;
        pitchWheelRange: number;
        polyMode: boolean;
        pressure: number;
        randomPan: boolean;
        rxChannel: number;
        velocitySenseDepth: number;
        velocitySenseOffset: number;
    }
    Index
    assignMode: number

    Assign mode for the channel:

    • 0 - A new note will kill the previous one if it is still playing.
    • Any other value - A new note will not kill the previous notes (default).

    While GS and XG differentiate 1 (Limited Multi for GS/Multi for XG) and 2 (Full Multi for GS/Inst (for Drum)), SpessaSynth treats them both as full Multi. (no note killing is performed)

    This may be useful for emulating SC-55 hi-hat cutoff or MSGS note cutoff.

    CC1 for GS controller matrix. An arbitrary MIDI controller, which can be bound to any synthesis parameter. Default is 16.

    CC2 for GS controller matrix. An arbitrary MIDI controller, which can be bound to any synthesis parameter. Default is 17.

    drumMap: number

    Drum map for system exclusive tracking. Only used for selecting the correct channel when setting drum parameters through sysEx, as those don't specify the channel, but the drum number.

    For GS, default is 1 for channel 9 and 0 for all others.

    For XG, default is 2 for channel 9 and 0 for all others.

    Setting this to any value other than 0 turns the channel into a drum channel.

    dryLevel: number

    The dry audio data amount being sent to the output. 127 is full, 0 is none (only effect audio). For example setting dry to 0 and reverb send to 127 results in only reverb. Setting dry to 0 and all sends to 0 effectively mutes the channel.

    efxAssign: boolean

    Indicates whether this channel uses the GS insertion EFX processor.

    fineTune: number

    Cents, RPN/SysEx for fine-tuning. Drum channels ignore this value.

    keyShift: number

    The key shift of the channel (in semitones). Drum channels ignore this value.

    modulationDepth: number

    The modulation depth in cents. This is internally converted to a multiplier by dividing by 50.

    The MIDI specification assumes the default modulation depth is 50 cents, but it may vary for different sound banks. For example, if a MIDI requests a modulation depth of 100 cents, the multiplier will be 2, which, for a preset with a depth of 50, will create a total modulation depth of 100 cents.

    pitchWheel: number

    The current pitch wheel value (0-16,383) of this channel.

    pitchWheelRange: number

    The current pitch wheel range, in semitones.

    polyMode: boolean

    If the channel is in the poly mode.

    • true - POLY ON - regular playback.
    • false - MONO ON - one note per channel, highest still pressed note is restored after releasing the currently playing one.
    pressure: number

    The current pressure (aftertouch) of this channel.

    randomPan: boolean

    Enables random panning for every note played on this channel.

    Disabled on any pan (CC#10) changes.

    rxChannel: number

    The channel's receiving number (0-based index). This allows triggering multiple parts (channels) with a single note message.

    -1 indicates OFF (no channel).

    velocitySenseDepth: number

    The relation between the input and the actual velocity.

    If Velocity Depth is increased, small differences in your playing dynamics will make a large difference in the loudness of the sound. If Velocity Depth is decreased, even large differences in your playing dynamics will make only a small difference in the loudness of the sound.

    Examples (with offset being set to normal):

    • 64 is normal.
    • 32 is half velocity at max volume.
    • 127 is max velocity at half volume.
    velocitySenseOffset: number

    The offset to add to the input velocity.

    If Velocity Offset is set higher than 64, even softly played notes (i.e., notes with a low velocity) will be sounded loudly. If Velocity Offset is set lower than 64, even strongly played notes (i.e., notes with a high velocity) will be sounded softly.

    Examples (with depth set to normal):

    • 64 is normal.
    • 32 is silent until half velocity, max velocity is half volume.
    • 96 starts at half volume and reaches max volume at half velocity.
    • 127 always forces velocity to max.