annotate base/Pitch.h @ 26:090c22aa726a
* Add the Note layer for pianoroll-type display of note-type data
* Complete the MIDI file importer (well, nearly -- it would be nice to
be able to import the non-note data as other sorts of models, and that's
not done yet).
* Minor refactoring in RealTime etc
author |
Chris Cannam |
date |
Fri, 10 Feb 2006 17:51:36 +0000 |
parents |
a7ed14263fe4 |
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
|