%Table of all 13 notes in one octave
%note returns the name of the note played
%add returns where the search starts in the string array, 'list'
function [note, add] = freq_table(peak)

if(peak<339)
    note = 'E    ';
    add = 1;
elseif(peak<359)
    note = 'F    ';
    add = 2;
elseif(peak<381)
    note = 'F#/Gb';
    add = 3;
elseif(peak<397)
    note = 'G    ';
    add = 4;
elseif(peak<427.5)
    note = 'G#/Ab';
    add = 5;
elseif(peak<453)
    note = 'A    ';
    add = 6;
elseif(peak<479.75)
    note = 'A#/Bb';
    add = 7;
elseif(peak<508)
    note = 'B    ';
    add = 8;
elseif(peak<538)
    note = 'C    ';
    add = 9;
elseif(peak<569.75)
    note = 'C#/Db';
    add = 10;
elseif(peak<605)
    note = 'D    ';
    add = 11;
elseif(peak<640.5)
    note = 'D#/Eb';
    add = 12;
else
    note = 'ERROR';
    add = 1;
end
    
    


