summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-05-24 09:38:48 +0000
committerFlorian Jung <flo@windfisch.org>2011-05-24 09:38:48 +0000
commit605b5bd05b7bcd20437ed07f0e0fe41f94fe9f1f (patch)
tree58ed9c9c21c0d4c8503765612680cc871dc8274b /muse2
parent5e04b219a6de8e41f132fcaec26876ecdb5ae9b5 (diff)
fixed bug with y-stretch and added debug messages
Diffstat (limited to 'muse2')
-rw-r--r--muse2/muse/arranger/pcanvas.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index 9b0a65b9..54785200 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -1796,7 +1796,7 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect&, EventList* events, Midi
if (config.canvasShowPartType & 4) //y-stretch?
{
- for (iEvent i = events->begin(); i != ito; ++i)
+ for (iEvent i = events->begin(); i != events->end(); ++i)
{
if (i->second.type()==Note)
{
@@ -1831,6 +1831,19 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect&, EventList* events, Midi
lowest_pitch--;
highest_pitch++;
}
+
+ if (heavyDebugMsg)
+ {
+ if (!isdrum)
+ printf("DEBUG: arranger: cakewalk enabled, y-stretching from %i to %i. eventlist=%i\n",lowest_pitch, highest_pitch, events);
+ else
+ {
+ printf("DEBUG: arranger: cakewalk enabled, y-stretching drums: ");;
+ for (map<int,int>::iterator it=y_mapper.begin(); it!=y_mapper.end(); it++)
+ printf("%i ", it->first);
+ printf("; eventlist=%i\n",events);
+ }
+ }
}
else
{
@@ -1840,6 +1853,8 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect&, EventList* events, Midi
if (isdrum)
for (int cnt=0;cnt<127;cnt++)
y_mapper[cnt]=cnt;
+
+ if (heavyDebugMsg) printf("DEBUG: arranger: cakewalk enabled, y-stretch disabled\n");
}
p.setPen(QColor(color_brightness,color_brightness,color_brightness));