求一个音乐程序

来源:百度知道 编辑:UC知道 时间:2024/05/22 07:00:51
c语言编写

#include<stdio.h>
#include<dos.h>
#include<bios.h>
#include<time.h>
#define N1 64 /*一拍*/
#define N2 32
#define N4 16
#define N8 8
#define N16 4
#define END 0

enum NOTES
{
C10=131,D10=147,E10=165,F10=175,G10=196,A10=220,B10=247,

C0=262, D0=286, E0=330, F0=349, G0=440, A0=440, B0=494,

C1=523, D1=158, E1=659, F1=698, G1=784, A1=880, B1=998,

C2=1047,D2=1175,E2=1319,F2=1397,G2=1568,A2=1760,B2=1976

}
song1[]={
D0,N4,E0,N8,D0,N8,C0,N4,A10,N4,G10,N8,E10,N8,
G10,N8,A10,N8,C0,N2,A10,N4,A10,N8,C0,N8,G10,N8,A0,N8,
E0,N8,G0,N8,D0,N2,E0,N4,D0,N8,E0,N8,G0,N4,E0,N4,G0,N8,
E10,N8,G10,N8,A10,N8,C0,N2,A10,N4,A10,N8,C0,N8,A10,N8,
A10,N8,D10,N8,E10,N8,G10,N2,D0,N4,D0,N4,G0,N4,A0,N8,
G0,N8,F0,N2,G0,N2,A0,N4,G0,N8,E0,N8,D0,N8,E0,N8,C0,N8,