alphaTab.midi.MidiFile
Represents a midi file with a single track that can be played via AlphaSynth
class MidiFileProperties​
division​
Gets or sets the division per quarter notes.
- JavaScript
- C#
- Kotlin
division: number;double Division { get; set; }var division: Doubleevents​
Gets a list of midi events sorted by time.
format​
Gets or sets the midi file format to use.
- JavaScript
- C#
- Kotlin
tickShift​
An indicator by how many midi-ticks the song contents are shifted. Grace beats at start might require a shift for the first beat to start at 0. This information can be used to translate back the player time axis to the music notation.
- JavaScript
- C#
- Kotlin
tickShift: number;double TickShift { get; set; }var tickShift: Doubletracks​
Gets a list of midi tracks.
Methods​
addEvent​
Adds the given midi event a the correct time position into the file.
| Parameter | Summary |
|---|---|
eAll | (no description) |
toBinary​
Writes the midi file into a binary format.
- JavaScript
- C#
- Kotlin
toBinary(): Uint8ArrayUint8Array ToBinary()fun toBinary(): Uint8ArrayReturns​
The binary midi file.
writeTo​
Writes the midi file as binary into the given stream.
- JavaScript
- C#
- Kotlin
| Parameter | Summary |
|---|---|
sAll | (no description) |
Returns​
The stream to write to.
writeVariableInt​
(no description)
- JavaScript
- C#
- Kotlin
static writeVariableInt(s: IWriteable, value: number): voidstatic void WriteVariableInt(IWriteable s, double value)fun writeVariableInt(s: IWriteable, value: Double): Unit| Parameter | Summary |
|---|---|
sAll | (no description) |
valueAll | (no description) |