comparison base/Pitch.cpp @ 1038:cc27f35aa75c cxx11

Introducing the signed 64-bit frame index type, and fixing build failures from inclusion of -Wconversion with -Werror. Not finished yet.
author Chris Cannam
date Tue, 03 Mar 2015 15:18:24 +0000
parents 88b54a185a0a
children 48e9f538e6e9
comparison
equal deleted inserted replaced
1037:bf0e5944289b 1038:cc27f35aa75c
139 int note, octave; 139 int note, octave;
140 getNoteAndOctaveForPitch(midiPitch, note, octave); 140 getNoteAndOctaveForPitch(midiPitch, note, octave);
141 141
142 QString plain = (useFlats ? flatNotes : notes)[note].arg(octave); 142 QString plain = (useFlats ? flatNotes : notes)[note].arg(octave);
143 143
144 int ic = lrint(centsOffset); 144 long ic = lrint(centsOffset);
145 if (ic == 0) return plain; 145 if (ic == 0) return plain;
146 else if (ic > 0) return QString("%1+%2c").arg(plain).arg(ic); 146 else if (ic > 0) return QString("%1+%2c").arg(plain).arg(ic);
147 else return QString("%1%2c").arg(plain).arg(ic); 147 else return QString("%1%2c").arg(plain).arg(ic);
148 } 148 }
149 149
174 ++semis; 174 ++semis;
175 cents -= 100.0; 175 cents -= 100.0;
176 } 176 }
177 } 177 }
178 178
179 int ic = lrint(cents); 179 long ic = lrint(cents);
180 180
181 if (ic == 0) { 181 if (ic == 0) {
182 if (semis >= 12) { 182 if (semis >= 12) {
183 return QString("%1'%2").arg(semis/12).arg(semis - 12*(semis/12)); 183 return QString("%1'%2").arg(semis/12).arg(semis - 12*(semis/12));
184 } else { 184 } else {