diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/base/Pitch.h	Wed Feb 01 14:49:49 2006 +0000
@@ -0,0 +1,34 @@
+/* -*- c-basic-offset: 4 -*-  vi:set ts=8 sts=4 sw=4: */
+
+/*
+    A waveform viewer and audio annotation editor.
+    Chris Cannam, Queen Mary University of London, 2005-2006
+    
+    This is experimental software.  Not for distribution.
+*/
+
+#ifndef _PITCH_H_
+#define _PITCH_H_
+
+#include <QString>
+
+class Pitch
+{
+public:
+    static float getFrequencyForPitch(int midiPitch,
+				      float centsOffset = 0,
+				      float concertA = 440.0);
+
+    static int getPitchForFrequency(float frequency,
+				    float *centsOffsetReturn = 0,
+				    float concertA = 440.0);
+
+    static QString getPitchLabel(int midiPitch,
+				 float centsOffset = 0);
+
+    static QString getPitchLabelForFrequency(float frequency,
+					     float concertA = 440.0);
+};
+
+
+#endif