test code to let sing eVocaloid eVY1 shield
Fork of eVY1_shield_test by
Revision 2:a629af871f93, committed 2013-11-26
- Comitter:
- naohiro2g
- Date:
- Tue Nov 26 13:22:13 2013 +0000
- Parent:
- 1:ffd1fb78a02f
- Commit message:
- test
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r ffd1fb78a02f -r a629af871f93 main.cpp --- a/main.cpp Wed Oct 30 11:18:08 2013 +0000 +++ b/main.cpp Tue Nov 26 13:22:13 2013 +0000 @@ -19,13 +19,13 @@ "dz a", "dZ i", "dz M", "dz e", "dz o",//ざじずぜぞ55-59 "d a", "dZ i", "dz M", "d e", "d o",//だじづでど60-64 "b a", "b' i", "b M", "b e", "b o",//ばびぶべぼ 65-69 - "p a", "p' i", "p M", "p e", "p o"//ぱぴぷぺぽ70-74 + "p a", "p' i", "p M", "p e", "p o"//ぱぴぷぺぽ70-74 }; //lylics //かえるのうたがきこえてくるよ -int lylics[]={5,3,42,24,2,15,50,6,9,3,18,7,42,39}; -char mml[] ="CDEFEDC EFGAGFE"; +int lylics[]={5,3,42,24,2,15,50,0,6,9,3,18,7,42,39}; +char mml[] ="CDEFEDCCEFGAGFE"; void Short_Message(int cmd, int d1, int d2) { evy1.putc(cmd); @@ -65,14 +65,16 @@ lylic_send(lylic_len); // sending lylics first int mml_len = sizeof(mml) / sizeof(mml[0]); - + + + while (1) { for(int i = 0;i< mml_len ;i++){ char c = mml[i]; if(c >= 'a' && c <='z') c-= 0x20; if((c>='A' && c<='Z')||c=='<'||c=='>'){ //key send if(i!=0){ - Short_Message(0x90,key,0x7f); + Short_Message(0x90,key,0x7f); wait(0.5); } key= 0x3c; @@ -90,5 +92,7 @@ } } Short_Message(0x90,key,0x7f); // note on message. 0x90=1ch, 0x7f=Velocity - wait(0.5); + wait(1); + } + }