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 | |
parent | 15ceeacaf980aff12311a25293e2c4772087af04 (diff) |
Invert drum 'slivers' in arranger drum parts.
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/ChangeLog | 2 | ||||
-rw-r--r-- | muse2/muse/arranger/pcanvas.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/osc.cpp | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 9d5e7237..6378495e 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,5 @@ +15.04.2011: + - And while we're at it... Invert drum track 'slivers' in arranger parts. (Tim) 14.04.2011: - Fixed notes 'sliver' drawing in arranger midi parts. Invert if too dark. (Tim) - Gave arranger part name text drawing a shadow to help contrast with drawn events. 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 |