qm-dsp 1.8
Pitch.h
Go to the documentation of this file.
1/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3/*
4 QM DSP library
5 Centre for Digital Music, Queen Mary, University of London.
6 This file Copyright 2006 Chris Cannam.
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version. See the file
12 COPYING included with this distribution for more information.
13*/
14
15#ifndef _PITCH_H_
16#define _PITCH_H_
17
22class Pitch
23{
24public:
25 static float getFrequencyForPitch(int midiPitch,
26 float centsOffset = 0,
27 float concertA = 440.0);
28
29 static int getPitchForFrequency(float frequency,
30 float *centsOffsetReturn = 0,
31 float concertA = 440.0);
32};
33
34
35#endif
Convert between musical pitch (i.e.
Definition Pitch.h:23
static int getPitchForFrequency(float frequency, float *centsOffsetReturn=0, float concertA=440.0)
Definition Pitch.cpp:29
static float getFrequencyForPitch(int midiPitch, float centsOffset=0, float concertA=440.0)
Definition Pitch.cpp:20