Skip to content

How can I extrack the Tempo from a Track chunk? #201

Answered by melanchall
fbarrera asked this question in Q&A
Discussion options

You must be logged in to vote

First of all, with

var tempoMap = midiFile.GetTempoMap();

you can get tempo map - an object containing information about all tempo and time signature changes (please read the article in the documentation - https://melanchall.github.io/drywetmidi/articles/high-level-managing/Tempo-map.html).

Then you can get tempo at any point in the time:

var startTempo = tempoMap.GetTempoAtTime((MidiTimeSpan)0);

or you can get all tempo changes:

var tempoChanges = tempoMap.GetTempoChanges();

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@melanchall
Comment options

@LeoMassaFM
Comment options

@melanchall
Comment options

@LeoMassaFM
Comment options

@melanchall
Comment options

Answer selected by fbarrera
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Just question about the library
3 participants