spessasynth_core documentation
    Preparing search index...

    Interface GSInsertionBlock

    The Insertion effect (EFX) processes the parts (channels) that have EFX assigned (see ChannelMIDIParameter.efxAssign) and is routed straight to the output. It can additionally send its output to the reverb, chorus and delay.

    This is a Roland GS-compatible insertion interface.

    It is used when GlobalMIDIParameter.system is gm gm2 or gs, but it is only enabled when an insertion parameter is set via a system exclusive message.

    SpessaSynthProcessor allows you to supply a custom insertion block. A custom insertion block must implement this interface.

    Editing the parameters can be done via GS system exclusive messages.

    interface GSInsertionBlock {
        sendLevelToChorus: number;
        sendLevelToDelay: number;
        sendLevelToReverb: number;
        applySnapshot(snapshot: GSInsertionBlockSnapshot): void;
        getSnapshot(): GSInsertionBlockSnapshot;
        getType(): number;
        process(
            inputLeft: Float32Array,
            inputRight: Float32Array,
            outputLeft: Float32Array,
            outputRight: Float32Array,
            outputReverb: Float32Array,
            outputChorus: Float32Array,
            outputDelay: Float32Array,
            startIndex: number,
            sampleCount: number,
        ): void;
        reset(): void;
        setParameter(param: number, value: number): void;
        setType(type: number): void;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    sendLevelToChorus: number

    0-127

    This parameter sets the amount of insertion sound that will be sent to the chorus. Higher values result in more sound being sent.

    sendLevelToDelay: number

    0-127

    This parameter sets the amount of insertion sound that will be sent to the delay. Higher values result in more sound being sent.

    sendLevelToReverb: number

    0-127

    This parameter sets the amount of insertion sound that will be sent to the reverb. Higher values result in more sound being sent.

    • Process the effect and adds it to the output.

      Parameters

      • inputLeft: Float32Array

        The left input buffer to process. It always starts at index 0.

      • inputRight: Float32Array

        The right input buffer to process. It always starts at index 0.

      • outputLeft: Float32Array

        The left output buffer.

      • outputRight: Float32Array

        The right output buffer.

      • outputReverb: Float32Array

        The mono input for reverb. It always starts at index 0.

      • outputChorus: Float32Array

        The mono input for chorus. It always starts at index 0.

      • outputDelay: Float32Array

        The mono input for delay. It always starts at index 0.

      • startIndex: number

        The index to start mixing at into the output buffers.

      • sampleCount: number

        The amount of samples to mix. This will never be larger than SynthProcessorOptions.maxBufferSize of the parent SpessaSynthProcessor instance.

      Returns void