F0 = midi2f0(midi_notes) Converts a vector of MIDI note numbers to corresponding fundamental frequencies (F0s) Assumes that middle-C is midi note 60, and that A440 tuning is used.
0001 function F0 = midi2f0(mn) 0002 % F0 = midi2f0(midi_notes) 0003 % 0004 % Converts a vector of MIDI note numbers to corresponding fundamental 0005 % frequencies (F0s) 0006 % 0007 % Assumes that middle-C is midi note 60, and that A440 tuning is used. 0008 % 0009 0010 % 09/13/01 PJ 0011 % 11/03/04 PJ Corrected to have MIDI note 69 = A440 0012 0013 a4 = 69; 0014 0015 F0 = 440 * (2 .^ ((mn-a4)/12)); 0016 0017 return