|
From: Tapio V. <aa...@us...> - 2011-01-12 21:11:25
|
Module: editor
Branch: master
Commit: 353581cb45902e7db321b3c7c4ab4e3f04b310b7
Author: Tapio Vierros <tap...@gm...>
Date: Wed Jan 12 23:10:31 2011 +0200
Use pitch info from TXT (hack).
---
notegraphwidget.cc | 6 +++---
songparser-txt.cc | 4 +---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/notegraphwidget.cc b/notegraphwidget.cc
index dffe5eb..5b1a54a 100644
--- a/notegraphwidget.cc
+++ b/notegraphwidget.cc
@@ -92,13 +92,13 @@ void NoteGraphWidget::setLyrics(const Notes ¬es)
clear();
for (Notes::const_iterator it = notes.begin(); it != notes.end(); ++it) {
// TODO: Implement proper seconds-to-pixels mapping and note height thingy
- const float sec2pix = 100;
+ const float sec2pix = 200;
if (it->type == Note::NORMAL || it->type == Note::GOLDEN || it->type == Note::FREESTYLE)
- m_notes.push_back(new NoteLabel(*it, this, QPoint(it->begin*sec2pix, 2 * noteYStep),
+ m_notes.push_back(new NoteLabel(*it, this, QPoint(it->begin*sec2pix, height() - it->note * noteYStep),
QSize((it->end - it->begin)*sec2pix, 0), false));
}
- finalizeNewLyrics();
+ updateNotes();
}
void NoteGraphWidget::finalizeNewLyrics()
diff --git a/songparser-txt.cc b/songparser-txt.cc
index e622846..6854f2a 100644
--- a/songparser-txt.cc
+++ b/songparser-txt.cc
@@ -148,10 +148,8 @@ bool SongParser::txtParseNote(std::string line, VocalTrack &vocal) {
if (n.type == Note::SLEEP) {
if (notes.empty()) return true; // Ignore sleeps at song beginning
n.begin = n.end = prevtime; // Normalize sleep notes
+ notes.back().lineBreak = true; // lineBreak flag for notes preceding SLEEPs
}
- // Add lineBreak flag for notes preceding SLEEPs
- if (notes.size() > 0 && n.type == Note::SLEEP)
- n.lineBreak = true;
notes.push_back(n);
return true;
}
|