Enjoy programming more!
Kidspod is a post site which supports young programmers.
First step to join us.
Register as a member
For members

2019/04/06 19:29:47

MixJuice GET URL : kidspod.club/mj/783

IchigoJam音ゲー 「令和」 ANAkeyで演奏

ゴールデンボンバーの「令和」サビのドレミが振ってきます。
鍵盤キーをタイミングよく叩いて

「レ イ ワ あたらしいじ~だい」

OUT2に圧電サウンダを接続してPWMで音を出します。
IN2 に ANAkeyを接続して、入力。

  • 1
  • 2
  • 1
  • 2

SOURCE CODE

NEW

10 'OtoSet
20 POKE#800,20,215,0
30 POKE#808,24,188,0
40 POKE#810,2,196,222,0
50 POKE#818,6,218,0
60 POKE#820,10,208,0
70 POKE#828,12,204,167,0
80 POKE#830,16,191,0
90 POKE#838,26,196,222,0
100 POKE#840,22,188,98,0
110 POKE#850,4,196,222,35,0
120 POKE#858,8,208,98,0
130 POKE#868,14,204,167,35,0
140 POKE#870,18,215,98,0
150 LET[60],3822,3608,3405,3214,3034,2863,2703,2551,2408,2273,2145,2025,1911
160 LET[80],50,100,200,300,350,400,500,600,650,750,850,900,1000
170 LRUNFILE()+1
SAVE 0

NEW
10 'IchigoOtoGe- REIWA_1
20 CLS:H=50:P=2:V=0:L=30
30 M="A-A-A-AAGE-G-AA-":GSB@PL
40 M="A-A-A-BHBA-G-A-E":GSB@PL
50 M="A-A-A-AAGE-G-AA-":GSB@PL
60 M="_DDDFFAABBHB----":GSB@PL
70 LRUNFILE()+1
80 @PL:O=20:I=0:U=0
90 @RD:C=PEEK(M+I):I=I+1
100 IFC=34RTN
110 IFC=60U=60:GOTO@RD
120 IFC=61U=61:GOTO@RD
130 IFC=62U=62:GOTO@RD
140 SCROLL2
150 LC0,24:?" ~9A ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~9B";
160 LC0,6:?CHR$(U):U=0
170 IFC=45:LCZ,6:?"|":GOTO@T
180 X=-1
190 IF(C>=65)*(C<=72)X=C-65
200 IF(C>=97)*(C<=103)X=C-89
210 IFX>=0:Z=PEEK(#800+#8*X):LCZ,6:?STR$(#801+#8*X)
220 @T:CLT
230 D=SCR(0,22)
240 IFD=60O=O/2
250 IFD=61O=20
260 IFD=62O=O*2
270 J=0
280 @S:J=J+1:IFSCR(J*2,22)>124GOTO@LP
290 IFJ=13J=0:GOTO@LP:ELSEGOTO@S
300 @LP:K=ANA(2)
310 IF(K>1000)*(F>=0)OUTP,0:F=-1
320 IF(F>=0)+(K>1000)GOTO@K:ELSEF=0
330 @L:IFK>[80+F]F=F+1:GOTO@L
340 IFF<>J-1GOTO@K
350 IFF>=0G=[60+F]/O:PWMP,G*H/100,G
360 W=L-TICK():LCJ*2-1,22:?"+";W:V=V+W
370 @K:IFTICK()<LGOTO@LP:ELSEGOTO@RD
SAVE 1

NEW
10 'IchigoOtoGe- REIWA_2
20 M="A-A-A-AAGE-G-AA-":GSB@PL
30 M="A-A-A-BHBA-G-A-E":GSB@PL
40 M="A-A-A-AAGE-G-AA-":GSB@PL
50 M="_DDDFFAAB->CD-C<B>C":GSB@PL
60 M="<A-------":GSB@PL
70 M="____________________":GSB@PL
80 LC0,0:?"SCORE:";V*10/L:END
90 @PL:O=20:I=0:U=0
100 @RD:C=PEEK(M+I):I=I+1
110 IFC=34RTN
120 IFC=60U=60:GOTO@RD
130 IFC=61U=61:GOTO@RD
140 IFC=62U=62:GOTO@RD
150 SCROLL2
160 LC0,24:?" ~9A ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~96 ~9B";
170 LC0,6:?CHR$(U):U=0
180 IFC=45:LCZ,6:?"|":GOTO@T
190 X=-1
200 IF(C>=65)*(C<=72)X=C-65
210 IF(C>=97)*(C<=103)X=C-89
220 IFX>=0:Z=PEEK(#800+#8*X):LCZ,6:?STR$(#801+#8*X)
230 @T:CLT
240 D=SCR(0,22)
250 IFD=60O=O/2
260 IFD=61O=20
270 IFD=62O=O*2
280 J=0
290 @S:J=J+1:IFSCR(J*2,22)>124GOTO@LP
300 IFJ=13J=0:GOTO@LP:ELSEGOTO@S
310 @LP:K=ANA(2)
320 IF(K>1000)*(F>=0)OUTP,0:F=-1
330 IF(F>=0)+(K>1000)GOTO@K:ELSEF=0
340 @L:IFK>[80+F]F=F+1:GOTO@L
350 IFF<>J-1GOTO@K
360 IFF>=0G=[60+F]/O:PWMP,G*H/100,G
370 W=L-TICK():LCJ*2-1,22:?"+";W:V=V+W
380 @K:IFTICK()<LGOTO@LP:ELSEGOTO@RD
SAVE2

LRUN0

COMMENT