diff options
author | Tim E. Real <termtech@rogers.com> | 2011-04-16 04:19:10 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2011-04-16 04:19:10 +0000 |
commit | 1a551c32ee9395ee83cc96245d7a5d30d3eebe13 (patch) | |
tree | bae149df3915e41d428c289624f63901e64a7d83 /muse2/muse/arranger/pcanvas.cpp | |
parent | 15ceeacaf980aff12311a25293e2c4772087af04 (diff) |
Invert drum 'slivers' in arranger drum parts.
Diffstat (limited to 'muse2/muse/arranger/pcanvas.cpp')
-rw-r--r-- | muse2/muse/arranger/pcanvas.cpp | 4 |
1 files changed, 3 insertions, 1 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); } } |