From 1a551c32ee9395ee83cc96245d7a5d30d3eebe13 Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Sat, 16 Apr 2011 04:19:10 +0000 Subject: Invert drum 'slivers' in arranger drum parts. --- muse2/muse/arranger/pcanvas.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'muse2/muse/arranger/pcanvas.cpp') 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); } } -- cgit v1.2.3