Mercurial > hg > adaptinstrspec
annotate functions/midiPitch2Freq.m @ 0:b4e26b53072f tip
Initial commit.
author | Holger Kirchhoff <holger.kirchhoff@eecs.qmul.ac.uk> |
---|---|
date | Tue, 04 Dec 2012 13:57:15 +0000 |
parents | |
children |
rev | line source |
---|---|
holger@0 | 1 function freq = midiPitch2Freq(midiPitch, tuningFreqInHz) |
holger@0 | 2 % freq = midiPitch2Freq(midiPitch, tuningFreqInHz) |
holger@0 | 3 % |
holger@0 | 4 % converts midi pitch index to frequency given a tuning frequeny |
holger@0 | 5 |
holger@0 | 6 freq = tuningFreqInHz * 2.^((midiPitch - 69)/12); % midi pitch 69 belongs to A4, the standard pitch, for which the tuning freq is given |