//NOTES
//3rd OCTAVE

//NATURALS
#define cTH 130.81
#define dTH 146.83
#define eTH 164.81
#define fTH 174.61
#define gTH 196
#define aTH 220
#define bTH 246.94

//SHARPS OR FLATS
#define csTH 138.59
#define dsTH 155.56
#define fsTH 185
#define gsTH 207.65
#define asTH 233.08

//4TH OCTAVE

//NATURALS
#define c 261.63
#define d 293.66
#define e 329.63
#define f 349.23
#define g 392
#define a 440
#define b 493.88

//SHARPS OR FLATS
#define cs 277.18
#define ds 311.13
#define fs 369.99
#define gs 415.30
#define as 466.16
//No Sound
#define NT  0

//END
int button = 2;
int buzzer = 3;

//ARRAYS

//Song One
int cO  [] = {gTH,c,c ,d ,c ,bTH,aTH,aTH,aTH,d,d,e ,d ,c ,bTH,gTH,gTH,e,e ,f ,e ,d ,c,aTH,NT,aTH,gTH,aTH,d,bTH,c,NT,gTH,c,c,c,bTH,bTH,c,bTH,aTH,gTH,gTH,e,e,d,c ,d ,g ,gTH,gTH,gTH,aTH,d,bTH,c};
int dO  [] = {4  ,4,12,12,12,12 ,4  ,4  ,4  ,4,8,12,12,12,4  ,4  ,4  ,4,12,12,12,12,4,4  ,32,12 ,4  ,4  ,4,4  ,2,8 ,2  ,4,4,4,2  ,4  ,4,4  ,4  ,2  ,4  ,4,4,8,12,12,4 ,4  ,12 ,12 ,4  ,4,4  ,4};



void setup() 
{
  for (int i = button; i <= buzzer ; i++)
  {
    if(i == button)
    {
      pinMode(button,INPUT_PULLUP);
    }
    else
    {
    	pinMode(i,OUTPUT); 
    }
  }
  
}
void loop() 
{
  while(digitalRead(button)==1);
  {
    songO();
  }
}

void sound(int FREQ, int DURA)
{
  //You can Prolly add lights here (Array)
  tone(buzzer,FREQ);
  delay(DURA);
  //You can Prolly add lights here (Array)
  noTone(buzzer);
  delay(100);

}

//We Wish You A Merry Christmas
void songO()
{
for(int s = 0 ; s < 56 ; s++)
    {
      int nD = 1000 / dO[s]; //note Duration
      sound(cO[s], nD);

      int pBN = nD * 0.10; // pause Between Notes
      delay(pBN);
    }
}
$abcdeabcde151015202530fghijfghij