Mercurial > hg > svcore
annotate base/Pitch.h @ 19:a7ed14263fe4
* Add Chromagram plugin, and make a number of fixes to the dense 3d model
and colour 3d plot class to accommodate it
* Add pitch-conversion methods in base/Pitch
* Commit previously overlooked Command.cpp
author | Chris Cannam |
---|---|
date | Wed, 01 Feb 2006 14:49:49 +0000 |
parents | |
children | 090c22aa726a |
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@19 | 27 float centsOffset = 0); |
Chris@19 | 28 |
Chris@19 | 29 static QString getPitchLabelForFrequency(float frequency, |
Chris@19 | 30 float concertA = 440.0); |
Chris@19 | 31 }; |
Chris@19 | 32 |
Chris@19 | 33 |
Chris@19 | 34 #endif |