Buzzer freqencies.

I’m working on a project where I cannot use libraries and I’m struggling with how the buzzer works, I’ve initialized each note from A0 to C8 (The range of a piano) and my code works with the song array and the note length array but it seems the lower the number the higher the note actually played on the buzzer which is the reverse of frequency so I’m assuming the notes need to be initialized to other numbers but im not sure what it is. if anyone could help that would be great, Cheers.

float note_A0 = 27.5;
float note_Bb0 = 29.14;
float note_B0 = 30.87;
float note_C1 = 32.7;
float note_Cs1 = 34.65;
float note_D1 = 36.71;
float note_Eb1 = 38.89;
float note_E1 = 41.20;
float note_F1 = 43.65;
float note_Fs1 = 46.25;
float note_G1 = 49.0;
float note_Gs1 = 51.91;
float note_A1 = 55;
float note_Bb1 = 58.27;
float note_B1 = 61.74;
float note_C2 = 65.41;
float note_Cs2 = 69.30;
float note_D2 = 73.42;
float note_Eb2 = 77.78;
float note_E2 = 82.41;
float note_F2 = 87.31;
float note_Fs2 = 92.50;
float note_G2 = 98.0;
float note_Gs2 = 103.83;
float note_A2 = 110.0;
float note_Bb2 = 116.54;
float note_B2 = 123.47;
float note_C3 = 130.81;
float note_Cs3 = 138.59;
float note_D3 = 146.83;
float note_Eb3 = 155.56;
float note_E3 = 164.81;
float note_F3 = 174.61;
float note_Fs3 = 185.0;
float note_G3 = 196.0;
float note_Gs3 = 207.65;
float note_A3 = 220.0;
float note_Bb3 = 233.08;
float note_B3 = 246.94;
float note_C4 = 261.63;
float note_Cs4 = 277.18;
float note_D4 = 293.66;
float note_Eb4 = 311.13;
float note_E4 = 329.63;
float note_F4 = 349.23;
float note_Fs4 = 369.99;
float note_G4 = 392.0;
float note_Gs4 = 415.30;
float note_A4 = 440;
float note_Bb4 = 466.16;
float note_B4 = 493.88;
float note_C5 = 523.25;
float note_Cs5 = 554.37;
float note_D5 = 587.33;
float note_Eb5 = 622.25;
float note_E5 = 659.25;
float note_F5 = 698.46;
float note_Fs5 = 739.99;
float note_G5 = 783.99;
float note_Gs5 = 830.61;
float note_A5 = 880.0;
float note_Bb5 = 932.33;
float note_B5 = 987.77;
float note_C6 = 1046.50;
float note_Cs6 = 1108.73;
float note_D6 = 1174.66;
float note_Eb6 = 1244.51;
float note_E6 = 1318.51;
float note_F6 = 1396.91;
float note_Fs6 = 1479.98;
float note_G6 = 1567.98;
float note_Gs6 = 1661.22;
float note_A6 = 1760.00;
float note_Bb6 = 1864.66;
float note_B6 = 1975.53;
float note_C7 = 2093.0;
float note_Cs7 = 2217.46;
float note_D7 = 2349.32;
float note_Eb7 = 2489.02;
float note_E7 = 2637.02;
float note_F7 = 2793.83;
float note_Fs7 = 2959.96;
float note_G7 = 3135.96;
float note_Gs7 = 3322.44;
float note_A7 = 3520.00;
float note_Bb7 = 3729.31;
float note_B7 = 3951.07;
float note_C8 = 4186.01;
float potc[]= {
 note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5, note_D5,
note_A4, note_C5, note_D5, note_D5, note_D5, note_E5, note_F5, note_F5, note_F5, note_G5, note_E5, note_E5, note_D5, note_C5, note_C5, note_D5}    
;
int potcdur[]= {200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200};
int A=sizeof(potc)/sizeof(potc[0]); 
int tmp, i , j, Default = 1;
void setup() {
    DDRB = (1<<DDB7);  
    TCCR1A = (1<<COM1C1)|(1<<WGM11); 
    TCCR1B = (1<<WGM13)|(1<<WGM12)|(1<<CS12); 
}
void loop() {
    buzzer();
    _delay_ms(5000);
}
void buzzer() {
    for (i=0;i<A;i++){
        ICR1=potc[i]+3;
        OCR1C=potc[i]/2;
        TCNT1=0;
        for (j=0;j<potcdur[i];j++){_delay_ms(1);}
    } 
    ICR1=0;OCR1C=0;TCNT1=0;
}

const int tempo = 1.5;Oops. I stopped reading there

that part is unused I intended to implement that later

link123100: that part is unused I intended to implement that later

You intended to implement the part where you could store a floating point value in ant int? How?

that part was 100% wrong yes but, that was not the problem the problem is that I'm not sure what I'm supposed to initialize the notes too