const int crotchet = 100; //negra
const int minim = 2*crotchet; //blanca
const int semibreve = 4*crotchet; //redonda
const int  quaver = crotchet/2; // corchera
const int semiQuaver = crotchet/4; //semicorchera
const int deniSemiQuaver = crotchet/8; //fusa
const int crotchetWithPoint = crotchet + square;
const int minimWithPoint = minim+crotchet;
const int crotchetSilence = crotchet;
const int minimSilence = minim;
const int semiBreveSilence = semibreve;
const int quaverSilence =  square;
const int semiQuaverSilence= semiQuaver;
const long DO = 523.25;
const long RE = 587.33;
const long MI = 659.26;
const long FA = 698.46;
const long SOL = 783.99;
const long LA = 880;
const long SI = 987.77;
const long  PAU = 300000; //pausa 
const int speakerOut=8; //pin
const int nextNote=200; //siguiente nota
const int nextBlock = 300;
const int elements = 24;

void setup (){
pinMode (speakerOut, OUTPUT);
}


void loop (){
int melody [] = {SOL, SOL, LA, SOL, DO, SI, SOL, SOL, LA, SOL, RE, DO, DO, MI, SOL, MI, DO, SI, LA, FA, FA, MI, DO, RE};
int  duration []= {square, crotchet, crotchet, crotchet, minim, square, crotchet, crotchet, crotchet, minim, square, crotchet, crotchet, crotchet, crotchet, crotchet, square, crotchet, crotchet, crotchet};
for (int note = 0; note< elements; note++){
tone (speakerOut , melody[note]);
delay (duration [note]);
noTone(speakerOut);}}

Las notas que hay son --> (0, C)Do, (1)Do#, (2, D)Re, (3)Re#, (4,E)Mi, (5, F)Fa, (6)Fa#, (7, G)Sol, (8)Sol#, (9, A)La, (10)La#, (11, B)Si

Para saber la frecuencia --> Nota x(i=1, 1< 13) = freq de Do(261,63) * raíz 12 de 2^i

Un piano completo tiene 7 octavas

Para saber la freq. según su octava --> Nota x(i=1, 1< 13) = freq de Do(261,63) * raíz 12 de 2^i*núm de octava