能力值:
( LV3,RANK:30 )
|
-
-
3 楼
听了一遍,有些谱不对。我对照简谱改了一下。
// BeepMusic.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "windows.h"
#define ONE_BEEP 600
#define HALF_BEEP 300
#define NOTE_1 440
#define NOTE_2 495
#define NOTE_3 550
#define NOTE_4 587
#define NOTE_5 660
#define NOTE_6 733
#define NOTE_7 825
#define NOTE_NONE Sleep(ONE_BEEP);
int main(int argc, char* argv[])
{
Beep(NOTE_5, ONE_BEEP);
Beep(NOTE_3, HALF_BEEP);
Beep(NOTE_5, HALF_BEEP);
Beep(NOTE_1*2, ONE_BEEP*2);
Beep(NOTE_6, ONE_BEEP);
Beep(NOTE_1*2, ONE_BEEP);
Beep(NOTE_5, ONE_BEEP*2);
Beep(NOTE_5, ONE_BEEP);
Beep(NOTE_1, HALF_BEEP);
Beep(NOTE_2, HALF_BEEP);
Beep(NOTE_3, ONE_BEEP);
Beep(NOTE_2, HALF_BEEP);
Beep(NOTE_1, HALF_BEEP);
Beep(NOTE_2, ONE_BEEP*4);
Beep(NOTE_5, ONE_BEEP);
Beep(NOTE_3, HALF_BEEP);
Beep(NOTE_5, HALF_BEEP);
Beep(NOTE_1*2, HALF_BEEP*3);
Beep(NOTE_7, HALF_BEEP);
Beep(NOTE_6, ONE_BEEP);
Beep(NOTE_1*2, ONE_BEEP);
Beep(NOTE_5, ONE_BEEP*2);
Beep(NOTE_5, ONE_BEEP);
Beep(NOTE_2, HALF_BEEP);
Beep(NOTE_3, HALF_BEEP);
Beep(NOTE_4, HALF_BEEP*3);
Beep(NOTE_7/2, HALF_BEEP);
Beep(NOTE_1, ONE_BEEP*4);
Beep(NOTE_6, ONE_BEEP);
Beep(NOTE_1*2, ONE_BEEP);
Beep(NOTE_1*2, ONE_BEEP*2);
Beep(NOTE_7, ONE_BEEP);
Beep(NOTE_6, HALF_BEEP);
Beep(NOTE_7, HALF_BEEP);
Beep(NOTE_1*2, ONE_BEEP*2);
Beep(NOTE_6, HALF_BEEP);
Beep(NOTE_7, HALF_BEEP);
Beep(NOTE_1*2, HALF_BEEP);
Beep(NOTE_6, HALF_BEEP);
Beep(NOTE_6, HALF_BEEP);
Beep(NOTE_5, HALF_BEEP);
Beep(NOTE_3, HALF_BEEP);
Beep(NOTE_1, HALF_BEEP);
Beep(NOTE_2, ONE_BEEP*4);
Beep(NOTE_5, ONE_BEEP);
Beep(NOTE_3, HALF_BEEP);
Beep(NOTE_5, HALF_BEEP);
Beep(NOTE_1*2, HALF_BEEP*3);
Beep(NOTE_7, HALF_BEEP);
Beep(NOTE_6, ONE_BEEP);
Beep(NOTE_1*2, ONE_BEEP);
Beep(NOTE_5, ONE_BEEP*2);
Beep(NOTE_5, ONE_BEEP);
Beep(NOTE_2, HALF_BEEP);
Beep(NOTE_3, HALF_BEEP);
Beep(NOTE_4, HALF_BEEP*3);
Beep(NOTE_7/2, HALF_BEEP);
Beep(NOTE_1, ONE_BEEP*3);
return 0;
}
|
能力值:
( LV2,RANK:10 )
|
-
-
22 楼
太响了,声音好大啊,吓死了!!!!挺好玩的!!!!
|
能力值:
( LV2,RANK:10 )
|
-
-
23 楼
我将它翻译成PASCAL,在DELPHI 7中成功编译。
var ONE_BEEP, HALF_BEEP, NOTE_1, NOTE_2 , NOTE_3, NOTE_4, NOTE_5, NOTE_6, NOTE_7 ,Note_7_half:Cardinal;
begin
ONE_BEEP:=600;
HALF_BEEP:=300;
NOTE_1:=440;
NOTE_2:=495;
NOTE_3:=550;
NOTE_4:=587;
NOTE_5:=660;
NOTE_6:=733;
NOTE_7:=825;
Note_7_half:=412;
Windows.Beep(NOTE_5, ONE_BEEP);
Windows.Beep(NOTE_3, HALF_BEEP);
Windows.Beep(NOTE_5, HALF_BEEP);
Windows.Beep(NOTE_1*2, ONE_BEEP*2);
Windows.Beep(NOTE_6, ONE_BEEP);
Windows.Beep(NOTE_1*2, ONE_BEEP);
Windows.Beep(NOTE_5, ONE_BEEP*2);
Windows.Beep(NOTE_5, ONE_BEEP);
Windows.Beep(NOTE_1, HALF_BEEP);
Windows.Beep(NOTE_2, HALF_BEEP);
Windows.Beep(NOTE_3, ONE_BEEP);
Windows.Beep(NOTE_2, HALF_BEEP);
Windows.Beep(NOTE_1, HALF_BEEP);
Windows.Beep(NOTE_2, ONE_BEEP*4);
Windows.Beep(NOTE_5, ONE_BEEP);
Windows.Beep(NOTE_3, HALF_BEEP);
Windows.Beep(NOTE_5, HALF_BEEP);
Windows.Beep(NOTE_1*2, HALF_BEEP*3);
Windows.Beep(NOTE_7, HALF_BEEP);
Windows.Beep(NOTE_6, ONE_BEEP);
Windows.Beep(NOTE_1*2, ONE_BEEP);
Windows.Beep(NOTE_5, ONE_BEEP*2);
Windows.Beep(NOTE_5, ONE_BEEP);
Windows.Beep(NOTE_2, HALF_BEEP);
Windows.Beep(NOTE_3, HALF_BEEP);
Windows.Beep(NOTE_4, HALF_BEEP*3);
// Windows.Beep(NOTE_7/2, HALF_BEEP);
Windows.Beep(Note_7_half, HALF_BEEP);
Windows.Beep(NOTE_1, ONE_BEEP*4);
Windows.Beep(NOTE_6, ONE_BEEP);
Windows.Beep(NOTE_1*2, ONE_BEEP);
Windows.Beep(NOTE_1*2, ONE_BEEP*2);
Windows.Beep(NOTE_7, ONE_BEEP);
Windows.Beep(NOTE_6, HALF_BEEP);
Windows.Beep(NOTE_7, HALF_BEEP);
Windows.Beep(NOTE_1*2, ONE_BEEP*2);
Windows.Beep(NOTE_6, HALF_BEEP);
Windows.Beep(NOTE_7, HALF_BEEP);
Windows.Beep(NOTE_1*2, HALF_BEEP);
Windows.Beep(NOTE_6, HALF_BEEP);
Windows.Beep(NOTE_6, HALF_BEEP);
Windows.Beep(NOTE_5, HALF_BEEP);
Windows.Beep(NOTE_3, HALF_BEEP);
Windows.Beep(NOTE_1, HALF_BEEP);
Windows.Beep(NOTE_2, ONE_BEEP*4);
Windows.Beep(NOTE_5, ONE_BEEP);
Windows.Beep(NOTE_3, HALF_BEEP);
Windows.Beep(NOTE_5, HALF_BEEP);
Windows.Beep(NOTE_1*2, HALF_BEEP*3);
Windows.Beep(NOTE_7, HALF_BEEP);
Windows.Beep(NOTE_6, ONE_BEEP);
Windows.Beep(NOTE_1*2, ONE_BEEP);
Windows.Beep(NOTE_5, ONE_BEEP*2);
Windows.Beep(NOTE_5, ONE_BEEP);
Windows.Beep(NOTE_2, HALF_BEEP);
Windows.Beep(NOTE_3, HALF_BEEP);
Windows.Beep(NOTE_4, HALF_BEEP*3);
Windows.Beep(Note_7_half, HALF_BEEP); // Windows.Beep(Cardinal(NOTE_7/2), HALF_BEEP);
Windows.Beep(NOTE_1, ONE_BEEP*3);
end.
|