|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-14 18:43:34
|
Module: performous
Branch: dance
Commit: b649ab6a24e40649cdc3170c62e2cb68ea23c418
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Nov 11 15:02:47 2009 +0100
Fixed some midi parsing
---
game/midifile.cc | 2 ++
game/songparser-ini.cc | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/game/midifile.cc b/game/midifile.cc
index 7f5c74b..a762f47 100644
--- a/game/midifile.cc
+++ b/game/midifile.cc
@@ -275,6 +275,8 @@ void MidiFileParser::process_midi_event(Track& track, uint8_t t, uint8_t arg1, u
}
// special management for lyrics
if (track.name == "PART VOCALS") {
+ // Discard note effects
+ if( arg1 < 20 ) return;
if (t == 8 || (t == 9 && arg2 == 0)) {
// end of note (note off or note on with zero velocity)
if( !m_lyric.empty() ) {
diff --git a/game/songparser-ini.cc b/game/songparser-ini.cc
index a55d489..5184e83 100644
--- a/game/songparser-ini.cc
+++ b/game/songparser-ini.cc
@@ -156,6 +156,7 @@ void SongParser::iniParse() {
{
char ch = *syl.rbegin();
if (ch == '-') syl.erase(syl.size() - 1);
+ else if (ch == '=') { *syl.rbegin() = '-'; }
else if (ch != '~') syl += ' ';
}
}
|