TUGAS PRAKTIKUM PERCOBAAN-9 "NADA'
Nama Kelompok :
1. Riski Ariyanto / 163600047
2. Mufti Maulana Rahman / 163600059
Tujuan : Membuat Nada Bunyi atau Musik 1 Oktaf
Dengan perbandingan frekuensi sebagai berikut :
Maka kita dapat membuat nada dengan Arduino dengan :
Program :
void setup() {
pinMode(8,OUTPUT);// pin 8 sebagai output(speaker)
}
void loop() {
noTone(8);// baris ke 1
delay(1000);
tone(8,528,200);// kirim frekuensi 528 hertz ke pin 8 dengan daya 200watt
delay(300);// banyak ketukan nada
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);
delay(500);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(600);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(600);
noTone(8);
tone(8,528,200);//baris ke 2
delay(300);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);
delay(500);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(600);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(600);
noTone(8);
tone(8,528,200);//baris ke 3
delay(150);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(600);
noTone(8);//akhir3
tone(8,528,200);//baris ke 4
delay(150);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(400);
noTone(8);//ke hongke-hongke
delay(100);
tone(8,396,200);//hongke-hongke
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);//baris ke 5
delay(400);
noTone(8);
delay(100);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(400);
noTone(8);
delay(100);
tone(8,264,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(400);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(400);
noTone(8);//ke hongke-hongke
delay(100);
tone(8,396,200);//hongke-hongke
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);//baris ke 6
delay(400);
noTone(8);
delay(100);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(400);
noTone(8);
delay(100);
tone(8,264,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(400);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(600);
noTone(8);//akhir
}
1. Riski Ariyanto / 163600047
2. Mufti Maulana Rahman / 163600059
Tujuan : Membuat Nada Bunyi atau Musik 1 Oktaf
Dengan perbandingan frekuensi sebagai berikut :
Dibaca
|
Do(1)
|
Re(2)
|
Mi(3)
|
Fa(4)
|
Sol(5)
|
La(6)
|
Si(7)
|
do(i)
|
Perbandingan Frekuensi
|
24
|
27
|
30
|
32
|
36
|
40
|
45
|
48
|
Nada Dasar 1 Oktaf
|
264
|
297
|
330
|
352
|
396
|
440
|
495
|
528
|
Nada Atas 1
|
528
|
594
|
660
|
704
|
792
|
880
|
990
|
1056
|
Dengan lagu dibawa ini :
Maka kita dapat membuat nada dengan Arduino dengan :
Program :
void setup() {
pinMode(8,OUTPUT);// pin 8 sebagai output(speaker)
}
void loop() {
noTone(8);// baris ke 1
delay(1000);
tone(8,528,200);// kirim frekuensi 528 hertz ke pin 8 dengan daya 200watt
delay(300);// banyak ketukan nada
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);
delay(500);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(600);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(600);
noTone(8);
tone(8,528,200);//baris ke 2
delay(300);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);
delay(500);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(600);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(600);
noTone(8);
tone(8,528,200);//baris ke 3
delay(150);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(600);
noTone(8);//akhir3
tone(8,528,200);//baris ke 4
delay(150);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(400);
noTone(8);//ke hongke-hongke
delay(100);
tone(8,396,200);//hongke-hongke
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);//baris ke 5
delay(400);
noTone(8);
delay(100);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(400);
noTone(8);
delay(100);
tone(8,264,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(400);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(400);
noTone(8);//ke hongke-hongke
delay(100);
tone(8,396,200);//hongke-hongke
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,440,200);//baris ke 6
delay(400);
noTone(8);
delay(100);
tone(8,396,200);
delay(200);
noTone(8);
tone(8,396,200);
delay(100);
noTone(8);
tone(8,440,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(400);
noTone(8);
delay(100);
tone(8,264,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,330,200);
delay(400);
delay(100);
noTone(8);
tone(8,297,200);
delay(200);
noTone(8);
tone(8,297,200);
delay(100);
noTone(8);
tone(8,330,200);
delay(200);
noTone(8);
tone(8,264,200);
delay(600);
noTone(8);//akhir
}
Bagus, pengaturan not belum pas. Nilai 85
BalasHapus