annotate base/Pitch.h @ 34:aaf73f7309f2

* Add "Export Audio File" option * Make note layer align in frequency with any spectrogram layer on the same view (if it's set to frequency mode) * Start to implement mouse editing for ranges of points by dragging the selection * First scrappy attempt at a vertical scale for time value layer
author Chris Cannam
date Mon, 27 Feb 2006 17:34:41 +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