diff base/Pitch.cpp @ 1429:48e9f538e6e9

Untabify
author Chris Cannam
date Thu, 01 Mar 2018 18:02:22 +0000
parents cc27f35aa75c
children
line wrap: on
line diff
--- a/base/Pitch.cpp	Thu Mar 01 14:43:40 2018 +0000
+++ b/base/Pitch.cpp	Thu Mar 01 18:02:22 2018 +0000
@@ -21,8 +21,8 @@
 
 double
 Pitch::getFrequencyForPitch(int midiPitch,
-			    double centsOffset,
-			    double concertA)
+                            double centsOffset,
+                            double concertA)
 {
     if (concertA <= 0.0) {
         concertA = Preferences::getInstance()->getTuningFrequency();
@@ -33,8 +33,8 @@
 
 int
 Pitch::getPitchForFrequency(double frequency,
-			    double *centsOffsetReturn,
-			    double concertA)
+                            double *centsOffsetReturn,
+                            double concertA)
 {
     if (concertA <= 0.0) {
         concertA = Preferences::getInstance()->getTuningFrequency();
@@ -45,12 +45,12 @@
     double centsOffset = (p - midiPitch) * 100.0;
 
     if (centsOffset >= 50.0) {
-	midiPitch = midiPitch + 1;
-	centsOffset = -(100.0 - centsOffset);
+        midiPitch = midiPitch + 1;
+        centsOffset = -(100.0 - centsOffset);
     }
     if (centsOffset < -50.0) {
-	midiPitch = midiPitch - 1;
-	centsOffset = (100.0 + centsOffset);
+        midiPitch = midiPitch - 1;
+        centsOffset = (100.0 + centsOffset);
     }
     
     if (centsOffsetReturn) *centsOffsetReturn = centsOffset;
@@ -80,8 +80,8 @@
     double centsOffset = (p - midiPitch) * 100.0;
 
     if (centsOffset >= 50.0) {
-	midiPitch = midiPitch + 1;
-	centsOffset = -(100.0 - centsOffset);
+        midiPitch = midiPitch + 1;
+        centsOffset = -(100.0 - centsOffset);
     }
     
     if (centsOffsetReturn) *centsOffsetReturn = centsOffset;
@@ -120,12 +120,12 @@
     // spelled from a MIDI pitch + flats flag in isolation.
 
     if (midiPitch < 0) {
-	while (midiPitch < 0) {
-	    midiPitch += 12;
-	    --octave;
-	}
+        while (midiPitch < 0) {
+            midiPitch += 12;
+            --octave;
+        }
     } else {
-	octave = midiPitch / 12 + baseOctave;
+        octave = midiPitch / 12 + baseOctave;
     }
 
     note = midiPitch % 12;
@@ -133,8 +133,8 @@
 
 QString
 Pitch::getPitchLabel(int midiPitch,
-		     double centsOffset,
-		     bool useFlats)
+                     double centsOffset,
+                     bool useFlats)
 {
     int note, octave;
     getNoteAndOctaveForPitch(midiPitch, note, octave);
@@ -149,8 +149,8 @@
 
 QString
 Pitch::getPitchLabelForFrequency(double frequency,
-				 double concertA,
-				 bool useFlats)
+                                 double concertA,
+                                 bool useFlats)
 {
     if (concertA <= 0.0) {
         concertA = Preferences::getInstance()->getTuningFrequency();