AlphaTab.Audio.Generator.MidiFileHandler.AddTempo C# (CSharp) Method

AddTempo() public method

public AddTempo ( int tick, int tempo ) : void
tick int
tempo int
return void
        public void AddTempo(int tick, int tempo)
        {
            // bpm -> microsecond per quarter note
            var tempoInUsq = (60000000 / tempo);
            AddEvent(_midiFile.InfoTrack, tick,
                BuildMetaMessage(0x51,
                    new[] { (byte)((tempoInUsq >> 16) & 0xFF), (byte)((tempoInUsq >> 8) & 0xFF), (byte)(tempoInUsq & 0xFF) }));
        }