Skip to main content

alphaTab.midi.MidiFileGenerator

This generator creates a midi file using a score.

 class MidiFileGenerator

Properties​

applyTranspositionPitches​

Gets or sets whether transposition pitches should be applied to the individual midi events or not.

applyTranspositionPitches: boolean;

ornamentKeysDown​

For every note within the octave, the number of keys to go down when playing ornaments. This is typically only a key down.

Ornaments are not really a strictly defined element, alphaTab is using shipping some default.

static readonly ornamentKeysDown: number[];

syncPoints​

The computed sync points for synchronizing the midi file with an external backing track.

syncPoints: BackingTrackSyncPoint[];

tickLookup​

Gets a lookup object which can be used to quickly find beats and bars at a given midi tick position.

readonly tickLookup: MidiTickLookup;

transpositionPitches​

Gets the transposition pitches for the individual midi channels.

readonly transpositionPitches: Map<number, number>;

vibratoResolution​

(no description)

vibratoResolution: number;

Methods​

buildTranspositionPitches​

(no description)

static buildTranspositionPitches(score: Score, settings: Settings): Map<number, number>
ParameterSummary
scoreAll

(no description)

settingsAll

(no description)

generate​

Starts the generation of the midi file.

generate(): void

generateSingleBeat​

(no description)

generateSingleBeat(beat: Beat): void
ParameterSummary
beatAll

(no description)

generateSingleNote​

(no description)

generateSingleNote(note: Note): void
ParameterSummary
noteAll

(no description)

generateSyncPoints​

Generates the sync points for the given score without re-generating the midi itself. Use this method if a re-generation of the sync points after modification is required. It correctly handles repeats and places sync points accoridng to their absolute midi tick when they need to be considered for synchronization.

static generateSyncPoints(score: Score, createNew?: boolean): BackingTrackSyncPoint[]
ParameterSummary
scoreAll

The song for which to regenerate the sync points.

createNewAll

Whether a new set of sync points should be generated for the sync (start, stop and tempo changes).

Returns​

The generated sync points for usage in the backing track playback.

getPitchWheel​

Calculates the midi pitch wheel value for the give bend value.

static getPitchWheel(bendValue: number): number
ParameterSummary
bendValueAll

(no description)

prepareSingleBeat​

(no description)

prepareSingleBeat(beat: Beat): number
ParameterSummary
beatAll

(no description)