1;

function retval = hz4Midi( notenum)
retval = 6.875 * 2^((3+notenum)/12);
endfunction

function retval = phaseI4Midi( notenum )
samplingRate = 20000;
overMax = 2^16;
retval = floor( hz4Midi(notenum) * overMax / samplingRate);
endfunction

# handle = fopen("notedef.txt", "w");

printf("const int carrierIncrements[] = {")
for i = [36 : 83]
printf("%d, ", phaseI4Midi(i));
endfor
printf("%d};\n", phaseI4Midi(84));
