diff layer/FlexiNoteLayer.cpp @ 623:49afde2dd704 tonioni

put the FlexiNote layer before the note layer to see what happens -- not much
author matthiasm
date Tue, 26 Mar 2013 20:14:08 +0000
parents 765bb3774c4f
children 1336439dc055
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.cpp	Tue Mar 26 17:00:45 2013 +0000
+++ b/layer/FlexiNoteLayer.cpp	Tue Mar 26 20:14:08 2013 +0000
@@ -45,11 +45,10 @@
     m_originalPoint(0, 0.0, 0, 1.f, tr("New Point")),
     m_editingPoint(0, 0.0, 0, 1.f, tr("New Point")),
     m_editingCommand(0),
-    m_verticalScale(AutoAlignScale),
-    m_scaleMinimum(0),
-    m_scaleMaximum(0)
+    m_verticalScale(MIDIRangeScale),
+    m_scaleMinimum(34),
+    m_scaleMaximum(77)
 {
-    
 }
 
 void
@@ -213,11 +212,14 @@
 bool
 FlexiNoteLayer::getDisplayExtents(float &min, float &max) const
 {
-    if (!m_model || shouldAutoAlign()) return false;
+    if (!m_model || shouldAutoAlign()) {
+		std::cerr << "No model or shouldAutoAlign()" << std::endl;
+		return false;
+	}
 
     if (m_verticalScale == MIDIRangeScale) {
         min = Pitch::getFrequencyForPitch(0);
-        max = Pitch::getFrequencyForPitch(127);
+        max = Pitch::getFrequencyForPitch(70);
         return true;
     }
 
@@ -631,7 +633,7 @@
 
         if (m_verticalScale == MIDIRangeScale) {
             min = Pitch::getFrequencyForPitch(0);
-            max = Pitch::getFrequencyForPitch(127);
+            max = Pitch::getFrequencyForPitch(70);
         } else if (shouldConvertMIDIToHz()) {
             min = Pitch::getFrequencyForPitch(lrintf(min));
             max = Pitch::getFrequencyForPitch(lrintf(max + 1));