From 99d887610d23dc84c1a66a8ea929dad5c0a805aa Mon Sep 17 00:00:00 2001 From: JGHFunRun <52897905+JGHFunRun@users.noreply.github.com> Date: Mon, 8 Nov 2021 23:53:31 -0600 Subject: [PATCH] Fix a bug where the BPM is modulo'd by 256 on MIDI export (#6215) Also fixes code formatting of the relevant function. --- plugins/MidiExport/MidiFile.hpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/MidiExport/MidiFile.hpp b/plugins/MidiExport/MidiFile.hpp index a1f91de2f..79c8dcce2 100644 --- a/plugins/MidiExport/MidiFile.hpp +++ b/plugins/MidiExport/MidiFile.hpp @@ -239,10 +239,15 @@ class MIDITrack addEvent(event); } - inline void addTempo(uint8_t tempo, uint32_t time) + inline void addTempo(uint32_t tempo, uint32_t time) { - Event event; event.channel = channel; - event.type = Event::TEMPO; event.time=time; event.tempo = tempo; + Event event; + event.channel = channel; + + event.type = Event::TEMPO; + event.time = time; + event.tempo = tempo; + addEvent(event); }