qm-dsp  1.8
Pitch.h
Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     QM DSP library
00005     Centre for Digital Music, Queen Mary, University of London.
00006     This file Copyright 2006 Chris Cannam.
00007 
00008     This program is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU General Public License as
00010     published by the Free Software Foundation; either version 2 of the
00011     License, or (at your option) any later version.  See the file
00012     COPYING included with this distribution for more information.
00013 */
00014 
00015 #ifndef _PITCH_H_
00016 #define _PITCH_H_
00017 
00022 class Pitch
00023 {
00024 public:
00025     static float getFrequencyForPitch(int midiPitch,
00026                                       float centsOffset = 0,
00027                                       float concertA = 440.0);
00028 
00029     static int getPitchForFrequency(float frequency,
00030                                     float *centsOffsetReturn = 0,
00031                                     float concertA = 440.0);
00032 };
00033 
00034 
00035 #endif