annotate base/Pitch.h @ 30:a6ef94ecbe74

* As previous commit
author Chris Cannam
date Fri, 17 Feb 2006 18:11:08 +0000
parents 090c22aa726a
children 39ae3dee27b9
rev   line source
Chris@19 1 /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */
Chris@19 2
Chris@19 3 /*
Chris@19 4 A waveform viewer and audio annotation editor.
Chris@19 5 Chris Cannam, Queen Mary University of London, 2005-2006
Chris@19 6
Chris@19 7 This is experimental software. Not for distribution.
Chris@19 8 */
Chris@19 9
Chris@19 10 #ifndef _PITCH_H_
Chris@19 11 #define _PITCH_H_
Chris@19 12
Chris@19 13 #include <QString>
Chris@19 14
Chris@19 15 class Pitch
Chris@19 16 {
Chris@19 17 public:
Chris@19 18 static float getFrequencyForPitch(int midiPitch,
Chris@19 19 float centsOffset = 0,
Chris@19 20 float concertA = 440.0);
Chris@19 21
Chris@19 22 static int getPitchForFrequency(float frequency,
Chris@19 23 float *centsOffsetReturn = 0,
Chris@19 24 float concertA = 440.0);
Chris@19 25
Chris@19 26 static QString getPitchLabel(int midiPitch,
Chris@26 27 float centsOffset = 0,
Chris@26 28 bool useFlats = false);
Chris@19 29
Chris@19 30 static QString getPitchLabelForFrequency(float frequency,
Chris@26 31 float concertA = 440.0,
Chris@26 32 bool useFlats = false);
Chris@19 33 };
Chris@19 34
Chris@19 35
Chris@19 36 #endif