Mercurial > hg > qm-dsp
annotate base/Pitch.h @ 116:fac40444b8c3 pvoc
Dependencies
author | Chris Cannam |
---|---|
date | Wed, 02 Oct 2013 15:05:43 +0100 |
parents | e5907ae6de17 |
children | 0d3b3c66652b |
rev | line source |
---|---|
cannam@0 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
cannam@0 | 2 |
cannam@0 | 3 /* |
cannam@0 | 4 QM DSP library |
cannam@0 | 5 Centre for Digital Music, Queen Mary, University of London. |
cannam@0 | 6 This file Copyright 2006 Chris Cannam. |
Chris@84 | 7 |
Chris@84 | 8 This program is free software; you can redistribute it and/or |
Chris@84 | 9 modify it under the terms of the GNU General Public License as |
Chris@84 | 10 published by the Free Software Foundation; either version 2 of the |
Chris@84 | 11 License, or (at your option) any later version. See the file |
Chris@84 | 12 COPYING included with this distribution for more information. |
cannam@0 | 13 */ |
cannam@0 | 14 |
cannam@0 | 15 #ifndef _PITCH_H_ |
cannam@0 | 16 #define _PITCH_H_ |
cannam@0 | 17 |
cannam@0 | 18 class Pitch |
cannam@0 | 19 { |
cannam@0 | 20 public: |
cannam@0 | 21 static float getFrequencyForPitch(int midiPitch, |
cannam@0 | 22 float centsOffset = 0, |
cannam@0 | 23 float concertA = 440.0); |
cannam@0 | 24 |
cannam@0 | 25 static int getPitchForFrequency(float frequency, |
cannam@0 | 26 float *centsOffsetReturn = 0, |
cannam@0 | 27 float concertA = 440.0); |
cannam@0 | 28 }; |
cannam@0 | 29 |
cannam@0 | 30 |
cannam@0 | 31 #endif |