Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program coffin_dance;
- uses crt;
- const z:array[1..12] of integer=(262,277,294,311,330,349,370,392,415,440,466,494);
- var dur:integer;
- bpm:real;
- i,j:byte;
- x:array[1..12] of integer;
- y:array[1..12] of integer;
- procedure beep(fr:integer; dur:integer);
- begin
- sound(fr);
- delay(dur-1);
- nosound;
- delay(1);
- writeln('Playing ', fr, ' Hz');
- end;
- procedure pause(dur:integer);
- begin
- nosound;
- delay(dur);
- end;
- begin
- clrscr;
- for i:=1 to 12 do
- begin
- y[i] := round(z[i]/2);
- end;
- bpm := 126;
- dur := round(60 / bpm * 500);
- for j:=1 to 3 do
- begin
- beep(z[8], dur);
- pause(dur);
- beep(z[8], dur);
- beep(z[3]*2, dur);
- beep(z[1]*2, dur);
- pause(dur);
- beep(z[11], dur);
- pause(dur);
- beep(z[10], dur);
- pause(dur);
- beep(z[10], dur);
- beep(z[10], dur);
- beep(z[1]*2, dur);
- pause(dur);
- beep(z[11], dur);
- beep(z[10], dur);
- for i:=1 to 2 do
- begin
- beep(z[8], dur);
- pause(dur);
- beep(z[8], dur);
- beep(z[11]*2, dur);
- beep(z[10]*2, dur);
- beep(z[11]*2, dur);
- beep(z[10]*2, dur);
- beep(z[11]*2, dur);
- end;
- end;
- for i:=1 to 4 do
- begin
- beep(z[11], round(dur/2));
- pause(round(dur/2));
- end;
- for i:=1 to 4 do
- begin
- beep(z[3]*2, round(dur/2));
- pause(round(dur/2));
- end;
- for i:=1 to 4 do
- begin
- beep(z[1]*2, round(dur/2));
- pause(round(dur/2));
- end;
- for i:=1 to 4 do
- begin
- beep(z[6]*2, round(dur/2));
- pause(round(dur/2));
- end;
- for i:=1 to 12 do
- begin
- beep(z[8]*2, round(dur/2));
- pause(round(dur/2));
- end;
- beep(z[1]*2, dur);
- beep(z[11], dur);
- beep(z[10], dur);
- beep(z[6], dur);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement