Skip to main content

alphaTab.synth.AudioExportOptions

The options controlling how to export the audio.

 class AudioExportOptions

Properties​

masterVolume​

The current master volume as percentage. (range: 0.0-3.0, default 1.0)

masterVolume: number;

metronomeVolume​

The metronome volume. (range: 0.0-3.0, default 0.0)

metronomeVolume: number;

playbackRange​

The range of the song that should be exported. Set this to null to play the whole song.

playbackRange?: PlaybackRange;

sampleRate​

The output sample rate.

sampleRate: number;

soundFonts​

The soundfonts to load and use for generating the audio. If not provided, the already loaded soundfonts of the synthesizer will be used. If no existing synthesizer is initialized, the generated audio might not contain any hearable audio.

soundFonts?: Uint8Array[];

trackTranspositionPitches​

The additional semitone pitch transpose to apply for individual tracks. The key is the track index, and the value is the number of semitones to apply. No values from the currently active synthesizer are applied.

The meaning of the key changes when used with AlphaSynth directly, in this case the key is the midi channel .

trackTranspositionPitches: Map<number, number>;

trackVolume​

The volume for individual tracks as percentage (range: 0.0-3.0). The key is the track index, and the value is the relative volume. The configured volume (as per data model) still applies, this is an additional volume control. If no custom value is set, 100% is used. No values from the currently active synthesizer are applied.

The meaning of the key changes when used with AlphaSynth directly, in this case the key is the midi channel .

trackVolume: Map<number, number>;

useSyncPoints​

Whether to respect sync point information during export. If the song contains sync point information for synchronization with an external media, this option allows controlling whether the synthesized audio is aligned with these points.

This is useful when mixing the exported audio together with external media, keeping the same timing.

Disable this option if you want the original/exact timing as per music sheet in the exported audio.

useSyncPoints: boolean;