spessasynth_lib documentation
    Preparing search index...

    Interface WorkerRenderAudioOptions

    Options for rendering audio in a WorkerSynthesizer. The public methods accept RenderAudioOptions, which omits separateChannels.

    interface WorkerRenderAudioOptions {
        enableEffects: boolean;
        extraTime: number;
        loopCount: number;
        preserveSynthParams: boolean;
        progressCallback?: (progress: number, stage: number) => unknown;
        separateChannels: boolean;
        sequencerID: number;
    }
    Index
    enableEffects: boolean

    If the effects should be enabled.

    extraTime: number

    Extra fade-out time after the song finishes, in seconds.

    loopCount: number

    The number of times to loop the song.

    preserveSynthParams: boolean

    If the current parameters of the synthesizer should be preserved.

    progressCallback?: (progress: number, stage: number) => unknown

    The function that tracks the rendering progress.

    Type Declaration

      • (progress: number, stage: number): unknown
      • Parameters

        • progress: number

          The progress, from 0 to 1.

        • stage: number

          Always 0, as the output and visuals are rendered in a single pass.

        Returns unknown

    separateChannels: boolean

    If channels should be rendered separately. This is set automatically by WorkerSynthesizer.renderAudio and WorkerSynthesizer.renderAudioSplit.

    sequencerID: number

    Which sequencer to render. Defaults to the first one (0).