//一个巨大的工程,掉进了巨大的坑。
#include<EEPROM.h>
int FMP = 8;
int SJDW = 250;
unsigned int loopcounter = 65535;
unsigned int pc = 0;
//char covermode = 0;
char counterenab = 0;
char stopplay = 0;
char movingkey = 0;
unsigned int skiptime = 10;
unsigned int marknow = 0xff00;
const PROGMEM int FREQ[9][12] = {
{16, 17, 18, 19, 21, 22, 23, 24, 26, 28, 29, 31},
{33, 35, 37, 39, 41, 44, 46, 49, 52, 55, 58, 62},
{65, 69, 73, 78, 82, 87, 92, 98, 104, 110, 117, 123},
{131, 139, 147, 156, 165, 175, 185, 196, 208, 220, 233, 247},
{262, 277, 294, 311, 330, 349, 370, 392, 415, 440, 466, 494},
{523, 554, 587, 622, 659, 698, 740, 784, 831, 880, 932, 988},
{1047, 1109, 1175, 1245, 1319, 1397, 1480, 1568, 1661, 1760, 1864, 1976},
{2093, 2218, 2349, 2489, 2637, 2739, 2960, 3136, 3322, 3520, 3729, 3951},
{4186, 4435, 4699, 4978, 5274, 5588, 5918, 6272, 6645, 7040, 7459, 7902}
};
//12: C0 #C1 D2 #D3 E4 F5 #F6 G7 #G8 A9 #A10 B11
//9: 0 1 2 3 4 5 6 7 8 (钢琴)
//音乐程序
#define MUSICLENGTH 1000
//#define enabser
const PROGMEM unsigned char MUSICPROGRAM[MUSICLENGTH][3] = {
//{18, 0, 2},
/*
//测试片段
{4, 0, 1}, {4, 2, 1}, {4, 4, 1}, {4, 5, 1}, {4, 7, 1},
{4, 9, 1}, {4, 11, 1}, {5, 0, 1},
{13, 0, 5}, {5, 2, 1}, {5, 4, 1}, {5, 5, 1}, {5, 7, 1},
{14, 0, 15}, {10, 0, 9}, {9, 0, 2}, {10, 0, 0}
*/
/*/小行星()
{17, 0, 1}, {17, 65, 65}, {16, 0, 250},
{4, 0, 2}, {4, 0, 2}, {4, 7, 2}, {4, 7, 2}, {4, 9, 2}, {4, 9, 2}, {4, 7, 4},
{4, 5, 2}, {4, 5, 2}, {4, 4, 2}, {4, 4, 2}, {4, 2, 2}, {4, 2, 2}, {4, 0, 4},
{4, 7, 2}, {4, 7, 2}, {4, 5, 2}, {4, 5, 2}, {4, 4, 2}, {4, 4, 2}, {4, 2, 4},
{4, 7, 2}, {4, 7, 2}, {4, 5, 2}, {4, 5, 2}, {4, 4, 2}, {4, 4, 2}, {4, 2, 4},
{4, 0, 2}, {4, 0, 2}, {4, 7, 2}, {4, 7, 2}, {4, 9, 2}, {4, 9, 2}, {4, 7, 4},
{4, 5, 2}, {4, 5, 2}, {4, 4, 2}, {4, 4, 2}, {4, 2, 2}, {4, 2, 2}, {4, 0, 4},
{18, 255, 0},//*/
/*天空之城(118)
{17, 0, 2}, {17, 65, 66},
{19, 1, 0}, {16, 0x01, 0x4d},//3
{4, 9, 1}, {4, 11, 1}, {5, 0, 3}, {4, 11, 1}, {5, 0, 2}, {5, 4, 2}, {4, 11, 6},
{4, 4, 2}, {4, 9, 3}, {4, 7, 1}, {4, 9, 2}, {5, 0, 2}, {4, 7, 7},
{4, 4, 1}, {4, 5, 3}, {4, 4, 1}, {4, 5, 1}, {5, 0, 3}, {4, 4, 6}, //{3, 9, 1}, {3, 11, 1}, {4, 0, 2},
{5, 0, 1}, {5, 0, 1}, {4, 11, 3}, {4, 6, 1}, {4, 6, 2}, {4, 11, 2}, {4, 11, 2}, {4, 9, 2}, {4, 8, 2},//28
{4, 9, 1}, {4, 11, 1}, {5, 0, 3}, {4, 11, 1}, {5, 0, 2}, {5, 4, 2}, {4, 11, 6},
{4, 4, 2}, {4, 9, 3}, {4, 7, 1}, {4, 9, 2}, {5, 0, 2}, {4, 7, 6},
{4, 4, 2}, {4, 5, 3}, {5, 0, 1}, {4, 11, 1}, {5, 0, 3}, {5, 2, 2}, {5, 2, 1}, {5, 4, 1}, {5, 0, 4}, //{9, 0, 2},
{5, 0, 1}, {4, 11, 1}, {4, 9, 1}, {4, 9, 1}, {4, 11, 2}, {4, 8, 2}, {4, 9, 6},//30
{5, 0, 1}, {5, 2, 1}, {5, 4, 3}, {5, 2, 1}, {5, 4, 2}, {5, 7, 2}, {5, 2, 6},
{4, 7, 2}, {5, 0, 3}, {4, 11, 1}, {5, 0, 2}, {5, 4, 2}, {5, 4, 8},
{4, 9, 1}, {4, 11, 1}, {5, 0, 2}, {4, 11, 1}, {5, 0, 1}, {5, 2, 2}, {5, 0, 3}, {4, 7, 1}, {4, 7, 4},
{5, 5, 2}, {5, 4, 2}, {5, 2, 2}, {5, 0, 2}, {5, 4, 6},//27
{5, 4, 2}, {5, 9, 3}, {5, 9, 1}, {5, 7, 3}, {5, 7, 1}, {5, 4, 1}, {5, 2, 1}, {5, 0, 2} , {5, 0, 3},
{5, 0, 1}, {5, 2, 3}, {5, 0, 1}, {5, 2, 2}, {5, 7, 2}, {5, 4, 6},
{5, 4, 2}, {5, 9, 3}, {5, 9, 1}, {5, 7, 3}, {5, 7, 1}, {5, 4, 1}, {5, 2, 1}, {5, 0, 2} , {5, 0, 3},
{5, 0, 1}, {5, 2, 3}, {5, 0, 1}, {5, 2, 2}, {4, 11, 2}, {4, 9, 6},//30
{18, 0, 2},
//*/
/*/世上只有妈妈好(38)
{17, 0, 3}, {17, 65, 67},
{19, 1, 0}, {16, 0, 250},
{4, 9, 3}, {4, 7, 1}, {4, 4, 2}, {4, 7, 2}, {5, 0, 2}, {4, 9, 1}, {4, 7, 1}, {4, 9, 4},
{4, 4, 2}, {4, 7, 1}, {4, 9, 1}, {4, 7, 2}, {4, 4, 1}, {4, 2, 1}, {4, 0, 1}, {3, 9, 1}, {4, 7, 1}, {4, 4, 1}, {4, 2, 4},
{4, 2, 3}, {4, 4, 1}, {4, 7, 2}, {4, 7, 1}, {4, 9, 1}, {4, 4, 2}, {4, 2, 2}, {4, 0, 4},
{4, 7, 3}, {4, 4, 1}, {4, 2, 1}, {4, 0, 1}, {3, 9, 1}, {4, 0, 1}, {3, 7, 8},
//{9, 0, 8},
{18, 255, 0},//*/
/*虫儿飞(94)
{17, 0, 4}, {17, 65, 68}, //1
{19, 1, 5}, {16, 0x01, 0x23}, //2
{4, 4, 2}, {4, 4, 1}, {4, 4, 1}, {4, 5, 2}, {4, 7, 2}, {4, 4, 3}, {4, 2, 1}, {4, 2, 4},
{4, 0, 2}, {4, 0, 1}, {4, 0, 1}, {4, 2, 2}, {4, 4, 2}, {4, 4, 3}, {3, 11, 1}, {3, 11, 4},
{3, 9, 2}, {4, 4, 2}, {4, 2, 4},
{3, 9, 2}, {4, 4, 2}, {4, 2, 4},
{3, 9, 2}, {4, 4, 2}, {4, 2, 3}, {4, 0, 1}, {4, 0, 8}, //27
{4, 4, 2}, {4, 4, 1}, {4, 4, 1}, {4, 5, 2}, {4, 7, 2}, {4, 4, 3}, {4, 2, 1}, {4, 2, 4},
{4, 0, 2}, {4, 0, 1}, {4, 0, 1}, {4, 2, 2}, {4, 4, 2}, {4, 4, 3}, {3, 11, 1}, {3, 11, 4},
{3, 9, 2}, {4, 4, 2}, {4, 2, 4},
{3, 9, 2}, {4, 4, 2}, {4, 2, 4},
{3, 9, 2}, {4, 4, 2}, {4, 2, 3}, {4, 0, 1}, {4, 0, 6}, //27
{4, 4, 1}, {4, 2, 1}, {4, 7, 6},
{4, 5, 1}, {4, 4, 2}, {4, 2, 5},
{4, 7, 1}, {4, 5, 1}, {4, 4, 2}, {4, 5, 1}, {4, 7, 3}, {4, 4, 2}, {4, 2, 6}, //13
{9, 0, 1},
{4, 0, 1}, {3, 9, 2}, {4, 4, 2}, {4, 2, 3}, {4, 0, 1}, {3, 7, 2}, {4, 2, 1}, {4, 0, 1}, {4, 0, 4},
{4, 5, 1}, {4, 4, 1}, {4, 5, 1}, {4, 4, 1}, {4, 0, 4},
{4, 5, 1}, {4, 4, 1}, {4, 5, 1}, {4, 4, 1}, {4, 0, 3}, {4, 2, 1}, {4, 0, 8}, //22
{9, 0, 8},
{18, 255, 0}, //2*/
/*喀秋莎(54)
{17, 0, 5}, {17, 65, 69},
{19, 1, 8}, {16, 0x01, 0x65},//3
{3, 9, 3}, {3, 11, 1}, {4, 0, 3}, {3, 9, 1}, {4, 0, 2}, {3, 11, 1}, {3, 9, 1}, {3, 11, 2}, {3, 4, 1}, {9, 0, 1},
{3, 11, 3}, {4, 0, 1}, {4, 2, 3}, {3, 11, 1}, {4, 2, 1}, {4, 2, 1}, {4, 0, 1}, {3, 11, 1}, {3, 9, 4},
{4, 4, 2}, {4, 9, 2}, {4, 7, 2}, {4, 9, 1}, {4, 7, 1}, {4, 5, 2}, {4, 4, 1}, {4, 2, 1}, {4, 4, 2}, {3, 9, 2},
{9, 0, 1}, {4, 5, 2}, {4, 2, 1}, {4, 4, 3}, {4, 0, 1}, {3, 11, 1}, {3, 4, 1}, {4, 0, 1}, {3, 11, 1}, {3, 9, 4},
{4, 4, 2}, {4, 9, 2}, {4, 7, 2}, {4, 9, 1}, {4, 7, 1}, {4, 5, 1}, {4, 5, 1}, {4, 4, 1}, {4, 2, 1}, {4, 4, 2}, {3, 9, 2},
{9, 0, 1}, {4, 5, 2}, {4, 2, 1}, {4, 4, 3}, {4, 0, 1}, {3, 11, 1}, {3, 4, 1}, {4, 0, 1}, {3, 11, 1}, {3, 9, 4},//50
{18, 255, 0}, //1*/
//*千本樱(954)
{17, 0, 6}, {19, 1, 5},//2
//PART S
{16, 0, 97},
{4, 9, 3}, {4, 9, 3}, {4, 7, 2}, {4, 9, 3}, {4, 9, 3}, {4, 7, 2},
Back to home |
File page
Subscribe |
Register |
Login
| N