Home > utils > midi2f0.m

midi2f0

PURPOSE ^

F0 = midi2f0(midi_notes)

SYNOPSIS ^

function F0 = midi2f0(mn)

DESCRIPTION ^

 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.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003