alphaTab.midi.MidiFileGenerator
This generator creates a midi file using a score.
class MidiFileGeneratorProperties​
applyTranspositionPitches​
Gets or sets whether transposition pitches should be applied to the individual midi events or not.
- JavaScript
- C#
- Kotlin
applyTranspositionPitches: boolean;bool ApplyTranspositionPitches { get; set; }var applyTranspositionPitches: BooleanornamentKeysDown​
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.
- JavaScript
- C#
- Kotlin
static readonly ornamentKeysDown: number[];static IList<double> OrnamentKeysDown { get; }companion object { val ornamentKeysDown: alphaTab.collections.DoubleList }syncPoints​
The computed sync points for synchronizing the midi file with an external backing track.
- JavaScript
- C#
- Kotlin
syncPoints: BackingTrackSyncPoint[];IList<BackingTrackSyncPoint> SyncPoints { get; set; }var syncPoints: alphaTab.collections.List<BackingTrackSyncPoint>tickLookup​
Gets a lookup object which can be used to quickly find beats and bars at a given midi tick position.
- JavaScript
- C#
- Kotlin
readonly tickLookup: MidiTickLookup;MidiTickLookup TickLookup { get; }val tickLookup: MidiTickLookuptranspositionPitches​
Gets the transposition pitches for the individual midi channels.
- JavaScript
- C#
- Kotlin
readonly transpositionPitches: Map<number, number>;Map<double, double> TranspositionPitches { get; }val transpositionPitches: alphaTab.collections.DoubleDoubleMap<Double, Double>vibratoResolution​
(no description)
- JavaScript
- C#
- Kotlin
vibratoResolution: number;double VibratoResolution { get; set; }var vibratoResolution: DoubleMethods​
buildTranspositionPitches​
(no description)
- JavaScript
- C#
- Kotlin
| Parameter | Summary |
|---|---|
scoreAll | (no description) |
settingsAll | (no description) |
generate​
Starts the generation of the midi file.
- JavaScript
- C#
- Kotlin
generate(): voidvoid Generate()fun generate(): UnitgenerateSingleBeat​
(no description)
| Parameter | Summary |
|---|---|
beatAll | (no description) |
generateSingleNote​
(no description)
| Parameter | Summary |
|---|---|
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.
- JavaScript
- C#
- Kotlin
static generateSyncPoints(score: Score, createNew?: boolean): BackingTrackSyncPoint[]static IList<BackingTrackSyncPoint> GenerateSyncPoints(Score score, bool? createNew)fun generateSyncPoints(score: Score, createNew: Boolean?): alphaTab.collections.List<BackingTrackSyncPoint>| Parameter | Summary |
|---|---|
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.
- JavaScript
- C#
- Kotlin
static getPitchWheel(bendValue: number): numberstatic double GetPitchWheel(double bendValue)fun getPitchWheel(bendValue: Double): Double| Parameter | Summary |
|---|---|
bendValueAll | (no description) |
prepareSingleBeat​
(no description)
| Parameter | Summary |
|---|---|
beatAll | (no description) |