|
From: Tapio V. <aa...@us...> - 2012-03-07 17:25:22
|
Author: Tapio Vierros <tap...@gm...>
Date: Wed Mar 7 19:24:35 2012 +0200
Fixed MIDI writer doubling the timecode of the first lyric.
---
songwriter-ini.cc | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/songwriter-ini.cc b/songwriter-ini.cc
index 31cced5..8df181c 100644
--- a/songwriter-ini.cc
+++ b/songwriter-ini.cc
@@ -52,12 +52,14 @@ void FoFMIDIWriter::writeMIDI() const {
// End the previous sentence (if not at the beginning)
if (sentenceOn) {
ev.arg2 = 0;
- writer.writeEvent(ev);
+ writer.writeEvent(ev); // Note OFF
ev.timecode = 0; // Reset time for the next event
- } // Note OFF
+ }
sentenceOn = true;
// Begin a new one
- ev.arg2 = 127; writer.writeEvent(ev); // Note ON
+ ev.arg2 = 127;
+ writer.writeEvent(ev); // Note ON
+ ev.timecode = 0; // Reset time for the next event
}
// Write lyric
QByteArray bytes = it->syllable.toUtf8();
|