How to update current tempo/time signature in real time #270
-
Continuing from issue #201: I got all the tempo changes of my MIDI file with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi,
// ...
_playback.EventPlayed += OnEventPlayed;
// ...
private static void OnEventPlayed(object? sender, MidiEventPlayedEventArgs e)
{
if (e.Event is SetTempoEvent setTempoEvent)
{
var newBpm = new Tempo(setTempoEvent.MicrosecondsPerQuarterNote).BeatsPerMinute;
}
} But if you want to solve the task manually without |
Beta Was this translation helpful? Give feedback.
Hi,
Playback
is the best choice in my opinion. Please read the library documentation. You need to subscribe to theEventPlayed
event and check if it's aSetTempoEvent
one:But if you want to solve the task manually without
Playback
, I can't help you unfortunately. The area of responsibility of the DryWetMIDI ends when you gettempoChanges
. What you're going to do with all those tempos is up to you. It's yo…