comparison base/Pitch.h @ 141:4f26f623a8bc

* Finish preferences dialog (as far as it's going at the moment) and connect it up * Fix Parzen window shape (was triangular!) * Various fixes to spectrogram draw coordinates in smoothing mode etc * Draw C keys in grey on the piano
author Chris Cannam
date Fri, 21 Jul 2006 16:03:42 +0000
parents d397ea0a79f5
children e412f65884ee
comparison
equal deleted inserted replaced
140:a35098a9c814 141:4f26f623a8bc
19 #include <QString> 19 #include <QString>
20 20
21 class Pitch 21 class Pitch
22 { 22 {
23 public: 23 public:
24 /* If concertA <= 0, it will be taken from current preferences */
25
24 static float getFrequencyForPitch(int midiPitch, 26 static float getFrequencyForPitch(int midiPitch,
25 float centsOffset = 0, 27 float centsOffset = 0,
26 float concertA = 440.0); 28 float concertA = 0.0);
27 29
28 static int getPitchForFrequency(float frequency, 30 static int getPitchForFrequency(float frequency,
29 float *centsOffsetReturn = 0, 31 float *centsOffsetReturn = 0,
30 float concertA = 440.0); 32 float concertA = 0.0);
31 33
32 static QString getPitchLabel(int midiPitch, 34 static QString getPitchLabel(int midiPitch,
33 float centsOffset = 0, 35 float centsOffset = 0,
34 bool useFlats = false); 36 bool useFlats = false);
35 37
36 static QString getPitchLabelForFrequency(float frequency, 38 static QString getPitchLabelForFrequency(float frequency,
37 float concertA = 440.0, 39 float concertA = 0.0,
38 bool useFlats = false); 40 bool useFlats = false);
39 }; 41 };
40 42
41 43
42 #endif 44 #endif