void SelfmadeSongItem()
{
uint songlistkeyvalue=0;
if(!selfmadesongflag)optionmenu=1;
else
{
while(selfmadesongflag)
{
if(EXIT==0)
{
Delay();
if(EXIT==0)
{
IE=0x0A;
selfmadesongflag=0;
optionmenu=1;
shoulddetec=1;
DisplayMenu(1);
}
}
if(shoulddetecsong)
songlistkeyvalue=detectself();
switch(songlistkeyvalue)
{
case 1:
if(OK==0)
{
Delay();
if(OK==0)
{
shoulddetecsong=0;
madesong=1;
MadeSongItem();
}
}
break;
case 2:
if(OK==0)
{
Delay();
if(OK==0)
{
shoulddetecsong=0;
listensong=1;
ListenSongItem();
}
}
break;
}
}
}
}
void MadeSongItem()
{
uchar temp;
uchar k;
uint i=0,j;
uchar selfmadesong[10];
while(madesong)
{
if(EXIT==0)
{
Delay();
if(EXIT==0)
{
shoulddetecsong=1;
madesong=0;
DisplaySongBySelf(songkey);
}
}
P0=0xf0;
temp=P0;
if((temp&0xf0)!=0xf0)
{
Delay();
if((temp&0xf0)!=0xf0)
{
if(EXIT==0)
{
Delay();
if(EXIT==0) //存储数据
{
init_2402();
mydelay(3);
for(i=0;i<10;)
{
write2402_data(i,selfmadesong);
mydelay(3);
i++;
}
selfmadesongflag=0;
DisplaySongBySelf(songkey);
}
}
if(i>=10)
{
for(j=0;j<8;j++)
{
WriteData(over[j]);
mydelay(50);
}
}
else
{
key=getkey();
switch(key) //从低音咪到高音到
{
case 0x11: k=0;Delay();selfmadesong=0x00;i++;;break;
case 0x21: k=1;Delay();selfmadesong=0x0E;i++;playKey(k);LED=0;break;
case 0x41: k=2;Delay();selfmadesong=0x0F;i++; playKey(k);break;
case 0x81: k=3;Delay();selfmadesong=0x10;i++;playKey(k); break;
case 0x12: k=4;Delay();selfmadesong=0x11;i++; playKey(k);break;
case 0x22: k=5;Delay();selfmadesong=0x15;i++;playKey(k);break;
case 0x42: k=6;Delay();selfmadesong=0x16;i++;playKey(k);break;
case 0x82: k=7;Delay();selfmadesong=0x17;i++;playKey(k);break;
case 0x14: k=8;Delay();selfmadesong=0x18;i++;playKey(k);break;
case 0x24: k=9;Delay();selfmadesong=0x19;i++;playKey(k);break;
case 0x44: k=10;Delay();selfmadesong=0x1A;i++; playKey(k);break;
case 0x84: k=11;Delay();selfmadesong=0x1B;i++;playKey(k);break;
case 0x18: k=12;Delay();selfmadesong=0x01;i++; break;//后四个按键控制节拍
case 0x28: k=13;Delay();selfmadesong=0x02;i++;break;
case 0x48: k=14;Delay();selfmadesong=0x03;i++;break;
case 0x88: k=15;Delay();selfmadesong=0x04;i++;break;
default: break;
}
}
}
}
}
}
void ListenSongItem()
{
uchar idata selfmadesong[10];
uchar nofile[]={"No File,Press OK"};
uint i;
init_2402();
mydelay(3);
if(/*read_data(0)==*/0)
{
for(i=0;i<16;i++)
{
WriteData(nofile);
mydelay(50);
}
return;
}
else
{
for(i=0;i<10;i++)
{
selfmadesong=read_data(i);
mydelay(2);
}
playSongFlag=1;
Play(selfmadesong,5,2,10);
}
}
-
-
录取音调程序.docx
下载积分: 积分 -1 分
15.43 KB, 下载次数: 4, 下载积分: 积分 -1 分
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
电子琴自好像录不进去,
电子琴自弹的音调录不进去
就是所有都是一个音调吗,我把我的程序发你吧,你可以参考一下,我做的没问题
谢谢,能发我邮箱吗?695412832@qq.com
一周热门 更多>