summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2011-04-16 04:19:10 +0000
committerTim E. Real <termtech@rogers.com>2011-04-16 04:19:10 +0000
commit1a551c32ee9395ee83cc96245d7a5d30d3eebe13 (patch)
treebae149df3915e41d428c289624f63901e64a7d83 /muse2/muse
parent15ceeacaf980aff12311a25293e2c4772087af04 (diff)
Invert drum 'slivers' in arranger drum parts.
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/arranger/pcanvas.cpp4
-rw-r--r--muse2/muse/osc.cpp4
2 files changed, 5 insertions, 3 deletions
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index ca2a16b0..57cccbf7 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -1719,6 +1719,7 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect& bb, EventList* events, M
iEvent ito(events->lower_bound(to));
//printf("PartCanvas::drawItem pTick:%d from:%d to:%d\n", pTick, from, to);
+ bool isdrum = (mt->type() == Track::DRUM);
for (iEvent i = events->begin(); i != ito; ++i) {
int t = i->first + pTick;
int te = t + i->second.lenTick();
@@ -1741,7 +1742,8 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect& bb, EventList* events, M
int pitch = i->second.pitch();
int th = int(mt->height() * 0.75); // only draw on three quarters
int hoffset = (mt->height() - th ) / 2; // offset from bottom
- int y = hoffset + (r.y() + th - (pitch * (th) / 127));
+ //int y = hoffset + (r.y() + th - (pitch * (th) / 127));
+ int y = hoffset + r.y() + th - (isdrum?127-pitch:pitch) * th / 127;
p.drawLine(t, y, te, y);
}
}
diff --git a/muse2/muse/osc.cpp b/muse2/muse/osc.cpp
index 66242e17..edaede1f 100644
--- a/muse2/muse/osc.cpp
+++ b/muse2/muse/osc.cpp
@@ -942,8 +942,8 @@ bool OscIF::oscInitGui(const QString& typ, const QString& baseName, const QStrin
if(_oscGuiQProc == 0)
//_oscGuiQProc = new QProcess(muse);
_oscGuiQProc = new QProcess();
-
- //QString program(fi.filePath());
+
+ //QString program(fi.filePath());
QString program(guiPath);
QStringList arguments;
arguments << oscUrl