unsigned long g_ulFrequency;
unsigned long g_ulDutyCycle;
// ¶¨ÒåµÍÒôÒôÃû£¨ÊýÖµµ¥Î»£ºHz£©
#define L1 262 // c
#define L2 294 // d
#define L3 330 // e
#define L4 349 // f
#define L5 392 // g
#define L6 440 // a1
#define L7 494 // b1
// ¶¨ÒåÖÐÒôÒôÃû
#define M1 523 // c1
#define M2 587 // d1
#define M3 659 // e1
#define M4 698 // f1
#define M5 784 // g1
#define M6 880 // a2
#define M7 988 // b2
// ¶¨Òå¸ßÒôÒôÃû
#define H1 1047 // c2
#define H2 1175 // d2
#define H3 1319 // e2
#define H4 1397 // f2
#define H5 1568 // g2
#define H6 1760 // a3
#define H7 1976 // b3
// ¶¨Òåʱֵµ¥Î»£¬¾ö¶¨ÑÝ×àËٶȣ¨ÊýÖµµ¥Î»£ºms£©
#define T 3600
// ¶¨ÒåÒô·û½á¹¹
typedef struct
{
short mName; // ÒôÃû£ºÈ¡ÖµL1¡«L7¡¢M1¡«M7¡¢H1¡«H7·Ö±ð±íʾµÍÒô¡¢ÖÐÒô¡¢¸ßÒôµÄ
// 1234567£¬È¡Öµ0±íʾÐÝÖ¹·û
short mTime; // ʱֵ£ºÈ¡ÖµT¡¢T/2¡¢T/4¡¢T/8¡¢T/16¡¢T/32·Ö±ð±íʾȫÒô·û¡¢
// ¶þ·ÖÒô·û¡¢ËÄ·ÖÒô·û¡¢°Ë·ÖÒô·û¡£¬È¡Öµ0±íʾÑÝ×à½áÊø
}tNote;
// ¶¨ÒåÀÖÇú£º¡¶»¯µû¡·£¨Áº×££©
const tNote MyScore[] =
{
{L3, T/4},
{L5, T/8+T/16},
{L6, T/16},
{M1, T/8+T/16},
{M2, T/16},
{L6, T/16},
{M1, T/16},
{L5, T/8},
{M5, T/8+T/16},
{H1, T/16},
{M6, T/16},
{M5, T/16},
{M3, T/16},
{M5, T/16},
{M2, T/2},
{M2, T/8},
{M2, T/16},
{M3, T/16},
{L7, T/8},
{L6, T/8},
{L5, T/8+T/16},
{L6, T/16},
{M1, T/8},
{M2, T/8},
{L3, T/8},
{M1, T/8},
{L6, T/16},
{L5, T/16},
{L6, T/16},
{M1, T/16},
{L5, T/2},
{M3, T/8+T/16},
{M5, T/16},
{L7, T/8},
{M2, T/8},
{L6, T/16},
{M1, T/16},
{L5, T/8},
{L5, T/4},
{L3, T/16},
{L5, T/16},
{L3, T/8},
{L5, T/16},
{L6, T/16},
{L7, T/16},
{M2, T/16},
{L6, T/4+T/8},
{L5, T/16},
{L6, T/16},
{M1, T/8+T/16},
{M2, T/16},
{M5, T/8},
{M3, T/8},
{M2, T/8},
{M3, T/16},
{M2, T/16},
{M1, T/8},
{L6, T/16},
{L5, T/16},
{L3, T/4},
{M1, T/4},
{L6, T/16},
{M1, T/16},
{L6, T/16},
{L5, T/16},
{L3, T/16},
{L5, T/16},
{L6, T/16},
{M1, T/16},
{L5, T/2},
{ 0, T/4},
{ 0, T/4},
{ 0, 0} // ½áÊø
};
不过早忘得一干二净了。
不是开源,这段代码也是在论坛上找的。想知道是怎么生成的
一周热门 更多>