// tangga nada C
// #define NOTE_C4 262 // DO  1
// #define NOTE_D4 294 // RE  2
// #define NOTE_E4 330 // MI  3
// #define NOTE_F4 349 // FA  4
// #define NOTE_G4 392 // SOL 5
// #define NOTE_A4 440 // LA  6
// #define NOTE_B4 494 // SI  7
// #define NOTE_C5 523 // DO  1.

#define NOTE_C4 262 // DO  1  i
#define NOTE_D4 294 // RE  2  bu
#define NOTE_E4 330 // MI  3  ki
#define NOTE_F4 349 // FA  4  ta
#define NOTE_G4 392 // SOL 5  kar
#define NOTE_E4 330 // MI  3  ti
#define NOTE_C4 262 // DO  1  ni
#define NOTE_A4 440 // LA  6  pu
#define NOTE_C5 523 // DO  1. tri
#define NOTE_B4 494 // SI  7  se
#define NOTE_A4 440 // LA  6  ja 
#define NOTE_G4 392 // SOL 5ref1  ti
#define NOTE_F4 349 // FA  4  pu
#define NOTE_A4 440 // LA  6  tri
#define NOTE_G4 392 // SOL 5  in
#define NOTE_F4 349 // FA  4  do
#define NOTE_E4 330 // MI  3  ne
#define NOTE_G4 392 // SOL 5
#define NOTE_C4 262 // DO  1  sia
#define NOTE_D4 294 // RE  2  ha
#define NOTE_F4 349 // FA  4  rum
#define NOTE_E4 330 // MI  3  na
#define NOTE_D4 294 // RE  2  ma
#define NOTE_C4 262 // DO  1  nya
// speaker ada di pin 9
const int pinSpeaker = 9;

void setup() {
  // put your setup code here, to run once:
pinMode(pinSpeaker, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
// tone(pinSpeaker, NOTE_C4, 500);
//  delay(500); //1
//  tone(pinSpeaker, NOTE_D4, 500);
//  delay(500);  //2
//  tone(pinSpeaker, NOTE_E4, 500);
//  delay(500);  //3
//  tone(pinSpeaker, NOTE_F4, 500);
//  delay(500);  //4
//  tone(pinSpeaker, NOTE_G4, 500);
//  delay(500);  //5
//  tone(pinSpeaker, NOTE_A4, 500);
//  delay(500);   //6
//  tone(pinSpeaker, NOTE_B4, 500);
//  delay(500);   //7
//  tone(pinSpeaker, NOTE_C5, 500);
//  delay(500);   //1.
 

tone(pinSpeaker, NOTE_C4, 500);
 delay(700); //1 
 tone(pinSpeaker, NOTE_D4, 500);
 delay(500);  //2
 tone(pinSpeaker, NOTE_E4, 500);
 delay(500);  //3
 tone(pinSpeaker, NOTE_F4, 500);
 delay(500);  //4
 tone(pinSpeaker, NOTE_G4, 500);
 delay(500);  //5
tone(pinSpeaker, NOTE_E4, 500);
 delay(500);  //3
tone(pinSpeaker, NOTE_C4, 500);
 delay(500); //1
tone(pinSpeaker, NOTE_A4, 500);
 delay(500);   //6
tone(pinSpeaker, NOTE_C5, 500);
 delay(500);   //1.
tone(pinSpeaker, NOTE_B4, 500);
 delay(500);   //7
 tone(pinSpeaker, NOTE_A4, 500);
 delay(500);   //6
tone(pinSpeaker, NOTE_G4, 500);
 delay(500);  //5'''''
 tone(pinSpeaker, NOTE_F4, 500);
 delay(500);  //4
 tone(pinSpeaker, NOTE_A4, 500);
 delay(500);   //6
 tone(pinSpeaker, NOTE_G4, 500);
 delay(500);  //5
  tone(pinSpeaker, NOTE_F4, 500);
 delay(500);  //4
 tone(pinSpeaker, NOTE_E4, 500);
 delay(500);  //3
 tone(pinSpeaker, NOTE_G4, 500);
 delay(500);  //5
 tone(pinSpeaker, NOTE_C4, 500);
 delay(500); //1
   tone(pinSpeaker, NOTE_D4, 500);
 delay(500);  //2
 tone(pinSpeaker, NOTE_F4, 500);
 delay(500);  //4
 tone(pinSpeaker, NOTE_E4, 500);
 delay(500);  //3
    tone(pinSpeaker, NOTE_D4, 500);
 delay(500);  //2

tone(pinSpeaker, NOTE_C4, 500);
 delay(500); //1

 noTone(pinSpeaker);
 delay(1000);

}