VRC7ベーシック専用 FM音源 音色パラメータチェックユーティリティ

 (V2.01A用)

 

ユーザー定義音色のパラメータを設定し各レジスタへの代入値を算出するツール。

実機上で再生しながらパラメータを設定できるので、FM音源の仕組みを理解するのに最適です。

十字キーで移動、A/Bボタンで値の増減、セレクトで設定値の切り替え(4種)、

スタートでサンプルの再生、サンプル再生中にA/Bボタンでオクターブの変更ができます。

 

 

10 '17=CH17=CH17<17C17=C17=C3333344444777888;;;;<<<<1111?1111?31タ317????????
20 CLS:CGEN 2:CGSET 1,2:PALETB 0,1,48,56,48:PALETS 2,0,48,22,22:CLEAR &H7FCF:ST=0:MO=1:X=3:Y=6:X0=16:Y0=199:OC=3:C1$=CHR$(216):C2$=CHR$(239):DIM MP(24)
30 READ R0,R1,R2,R3,R4,R5,R6,R7:FOR I=&H7FD8 TO &H7FEF:READ DD:POKE I,DD:NEXT
40 DATA 49,97,24,7,120,100,48,39,34,33,30,6,240,118,8,40,133,1,18,15,153,162,64,2,7,193,105,7,243,245,167,18
50 DEF SPRITE 0,(2,1,1,0,0)=C1$+C1$+C2$+C2$:DEF SPRITE 1,(2,1,1,0,0)=C1$+C1$+C2$+C2$:DEF SPRITE 2,(2,1,1,0,0)=C1$+C2$+C2$+C2$:DEF SPRITE 3,(2,1,0,0,0)=CHR$(223)+C2$+C2$+C2$:SPRITE 0,0,240:SPRITE 1,0,240:SPRITE 2,0,240:SPRITE 3,0,240
60 GOSUB 270:GOSUB 1490
70 SPRITE ON:PLAY "T1Y2M1"
80 DEF MOVE(4)=SPRITE(11,0,4,1,0,0):POSITION 4,196,149:MOVE 4
90 SPRITE 3,X0,Y0
100 GOSUB 430:GOSUB 460:GOSUB 490:GOSUB 520:GOSUB 550:GOSUB 580:GOSUB 610:GOSUB 640
110 GOSUB 670:GOSUB 710:GOSUB 750:GOSUB 790:GOSUB 830:GOSUB 870:GOSUB 910:GOSUB 950
120 SPRITE 0,8*X,(8*Y)-1:SPRITE 1,(8*X)+16,(8*Y)-1:CUT 4:IF MO=13 GOTO 140
130 SPRITE 2,0,240:GOTO 150
140 SPRITE 2,(8*X)+32,(8*Y)-1
150 S=STICK(0)
160 IF S=1 GOTO 1100
170 IF S=2 GOTO 1150
180 IF S=4 GOTO 1200
190 IF S=8 GOTO 1260
200 IF STRIG(0)=2 GOTO 990
210 IF STRIG(0)=8 GOTO 1040
220 IF STRIG(0)=4 GOTO 1070
230 IF STRIG(0)=1 GOTO 1330
240 GOTO 150
250 SPRITE OFF:END
260 'ショキガメン
270 A$=CHR$(237)+CHR$(237)+CHR$(237):B$=A$+A$+CHR$(237):C$=CHR$(238)+"                 "+CHR$(238):D$=CHR$(238)+"       "+CHR$(238)
280 LOCATE 1,0:PRINT "VRC7 FMパラメ-タ  チェック  ユ-ティリティ"
290 LOCATE 1,2:PRINT "トレモロ  ビブラ-ト  サスティン  スケ-ル   バイリツ"
300 LOCATE 0,3:PRINT "M":LOCATE 0,4:PRINT "C"
310 LOCATE 1,6:PRINT "ゲンスイ  DIST. ト-タルL フィ-ドバック"
320 LOCATE 0,7:PRINT "M":LOCATE 0,8:PRINT "C"
330 LOCATE 1,10:PRINT "アタック  ディケイ   サスティン  リリ-ス"
340 LOCATE 0,11:PRINT "M":LOCATE 0,12:PRINT "C"
350 LOCATE 0,14:PRINT CHR$(239);" レジスタ  ";A$;CHR$(237);B$;CHR$(240);CHR$(239);B$;CHR$(240)
360 LOCATE 0,15:PRINT CHR$(238);" $00 $01 $02 $03 ";CHR$(238);D$
370 LOCATE 0,16:PRINT C$;D$:LOCATE 0,17:PRINT C$;D$
380 LOCATE 0,18:PRINT CHR$(238);" $04 $05 $06 $07 ";CHR$(238);D$:LOCATE 0,19:PRINT C$;D$
390 LOCATE 0,20:PRINT CHR$(241);A$;B$;B$;CHR$(242);CHR$(241);B$;CHR$(242)
400 LOCATE 1,22:PRINT "セッテイ1  セッテイ2  セッテイ3  セッテイ4"
410 RETURN
420 'FROM $00
430 MP(1)=SGN(R0 AND &H80):MP(2)=SGN(R0 AND &H40):MP(3)=SGN(R0 AND &H20):MP(4)=SGN(R0 AND &H10):MP(5)=R0 AND &HF
440 FOR I=1 TO 4:GOSUB 2190:GOSUB 1560:NEXT:I=5:GOSUB 2190:GOSUB 1580:RETURN
450 'FROM $01
460 MP(6)=SGN(R1 AND &H80):MP(7)=SGN(R1 AND &H40):MP(8)=SGN(R1 AND &H20):MP(9)=SGN(R1 AND &H10):MP(10)=R1 AND &HF
470 FOR I=6 TO 9:GOSUB 2190:GOSUB 1560:NEXT:I=10:GOSUB 2190:GOSUB 1580:RETURN
480 'FROM $02
490 MP(11)=(R2 AND &HC0)/64:MP(13)=R2 AND &H3F
500 I=11:GOSUB 2190:GOSUB 1660:I=13:GOSUB 1720:RETURN
510 'FROM $03
520 MP(14)=(R3 AND &HC0)/64:MP(15)=SGN(R3 AND &H10):MP(12)=SGN(R3 AND &H8):MP(16)=R3 AND &H7
530 I=14:GOSUB 2190:GOSUB 1660:I=15:GOSUB 2190:GOSUB 1780:I=12:GOSUB 2190:GOSUB 1780:I=16:GOSUB 1810:RETURN
540 'FROM $04
550 MP(17)=(R4 AND &HF0)/16:MP(18)=R4 AND &HF
560 FOR I=17 TO 18:GOSUB 2190:GOSUB 1910:NEXT:RETURN
570 'FROM $05
580 MP(21)=(R5 AND &HF0)/16:MP(22)=R5 AND &HF
590 FOR I=21 TO 22:GOSUB 2190:GOSUB 1910:NEXT:RETURN
600 'FROM $06
610 MP(19)=(R6 AND &HF0)/16:MP(20)=R6 AND &HF
620 FOR I=19 TO 20:GOSUB 2190:GOSUB 1910:NEXT:RETURN
630 'FROM $07
640 MP(23)=(R7 AND &HF0)/16:MP(24)=R7 AND &HF
650 FOR I=23 TO 24:GOSUB 2190:GOSUB 1910:NEXT:RETURN
660 'TO $00
670 R0=(MP(1)*128)+(MP(2)*64)+(MP(3)*32)+(MP(4)*16)+MP(5)
680 LOCATE 3,16:IF LEN(HEX$(R0))=1 PRINT "0";
690 PRINT HEX$(R0):RETURN
700 'TO $01
710 R1=(MP(6)*128)+(MP(7)*64)+(MP(8)*32)+(MP(9)*16)+MP(10)
720 LOCATE 7,16:IF LEN(HEX$(R1))=1 PRINT "0";
730 PRINT HEX$(R1):RETURN
740 'TO $02
750 R2=(MP(11)*64)+MP(13)
760 LOCATE 11,16:IF LEN(HEX$(R2))=1 PRINT "0";
770 PRINT HEX$(R2):RETURN
780 'TO $03
790 R3=(MP(14)*64)+(MP(15)*16)+(MP(12)*8)+MP(16)
800 LOCATE 15,16:IF LEN(HEX$(R3))=1 PRINT "0";
810 PRINT HEX$(R3):RETURN
820 'TO $04
830 R4=(MP(17)*16)+MP(18)
840 LOCATE 3,19:IF LEN(HEX$(R4))=1 PRINT "0";
850 PRINT HEX$(R4):RETURN
860 'TO $05
870 R5=(MP(21)*16)+MP(22)
880 LOCATE 7,19:IF LEN(HEX$(R5))=1 PRINT "0";
890 PRINT HEX$(R5):RETURN
900 'TO $06
910 R6=(MP(19)*16)+MP(20):LOCATE 11,19
920 IF LEN(HEX$(R6))=1 PRINT "0";
930 PRINT HEX$(R6):RETURN
940 'TO $07
950 R7=(MP(23)*16)+MP(24)
960 LOCATE 15,19:IF LEN(HEX$(R7))=1 PRINT "0";
970 PRINT HEX$(R7):RETURN
980 'セレクト
990 POKE(&H7FD0+(ST*8)),R0:POKE(&H7FD1+(ST*8)),R1:POKE(&H7FD2+(ST*8)),R2:POKE(&H7FD3+(ST*8)),R3:POKE(&H7FD4+(ST*8)),R4:POKE(&H7FD5+(ST*8)),R5:POKE(&H7FD6+(ST*8)),R6:POKE(&H7FD7+(ST*8)),R7
1000 ST=ST+1:IF ST=4 ST=0
1010 R0=PEEK(&H7FD0+(ST*8)):R1=PEEK(&H7FD1+(ST*8)):R2=PEEK(&H7FD2+(ST*8)):R3=PEEK(&H7FD3+(ST*8)):R4=PEEK(&H7FD4+(ST*8)):R5=PEEK(&H7FD5+(ST*8)):R6=PEEK(&H7FD6+(ST*8)):R7=PEEK(&H7FD7+(ST*8))
1020 X0=(ST*56)+16:PLAY "O2C0":GOTO 90
1030 'Aボタン
1040 LI=(PEEK(&H6071+MO))-48:PLAY "O4C0":MP(MO)=MP(MO)+1:IF MP(MO)>LI MP(MO)=0
1050 GOTO 1940
1060 'Bボタン
1070 LI=(PEEK(&H6071+MO))-48:PLAY "O4C0":MP(MO)=MP(MO)-1:IF MP(MO)<0 MP(MO)=LI
1080 GOTO 1940
1090 'ミギ
1100 IF MO=5 OR MO=10 MO=MO-4:GOTO 1310
1110 IF MO=13 OR MO=16 MO=MO-2:GOTO 1310
1120 IF MO=20 OR MO=24 MO=MO-3 :GOTO 1310
1130 MO=MO+1:GOTO 1310
1140 'ヒダリ
1150 IF MO=1 OR MO=6 MO=MO+4:GOTO 1310
1160 IF MO=11 OR MO=14 MO=MO+2:GOTO 1310
1170 IF MO=17 OR MO=21 MO=MO+3:GOTO 1310
1180 MO=MO-1:GOTO 1310
1190 'シタ
1200 IF MO<9 MO=MO+5:GOTO 1310
1210 IF MO<11 MO=13:GOTO 1310
1220 IF MO=13 OR MO<16 MO=MO+3:GOTO 1310
1230 IF MO<21 MO=MO+4:GOTO 1310
1240 MO=MO-20:GOTO 1310
1250 'ウエ
1260 IF MO<5 MO=MO+20:GOTO 1310
1270 IF MO=5 MO=24:GOTO 1310
1280 IF MO<14 MO=MO-5:GOTO 1310
1290 IF MO<20 MO=MO-3:GOTO 1310
1300 MO=MO-4:GOTO 1310
1310 X=(PEEK(&H6041+MO))-46:Y=(PEEK(&H6059+MO))-45:PLAY "O3C0R5":GOTO 120
1320 'スタ-ト
1330 POKE &H9010,&H30:POKE &H9030,0:POKE &H9010,0:POKE &H9030,R0:POKE &H9010,1:POKE &H9030,R1:POKE &H9010,2:POKE &H9030,R2:POKE &H9010,3:POKE &H9030,R3:POKE &H9010,4:POKE &H9030,R4:POKE &H9010,5:POKE &H9030,R5:POKE &H9010,6:POKE &H9030,R6:POKE &H9010,7
1340 DEF MOVE(4)=SPRITE(11,0,4,70,0,0):POSITION 4,196,149:MOVE 4:RESTORE 1440
1350 READ P1
1360 IF P1=255 GOTO 1430
1370 IF P1=0 GOTO 1390
1380 POKE &H9010,&H20:POKE &H9030,0:READ P2:P2=P2 OR (OC*2):POKE &H9010,&H10:POKE &H9030,P1:POKE &H9010,&H20:POKE &H9030,P2
1390 S=STRIG(0):OC=OC-(S=8)+(S=4)
1400 IF OC=8 OC=0
1410 IF OC<0 OC=7
1420 GOSUB 1490:GOTO 1350
1430 POKE &H9010,&H20:POKE &H9030,0:PAUSE 50:GOTO 150
1440 DATA 172,48,0,0,129,48,172,48,0,0,129,48
1450 DATA 172,48,129,48,172,48,217,48,02,49,0,0,0
1460 DATA 230,48,0,0,193,48,230,48,0,0,193,48
1470 DATA 230,48,193,48,162,48,193,48,129,48,0,0,0,255
1480 'オクタ-ブ
1490 LOCATE 20,19
1500 IF OC=0 GOTO 1520
1510 FOR J=1 TO OC:PRINT CHR$(186);:NEXT
1520 IF OC=7 GOTO 1540
1530 FOR J=1 TO 7-OC:PRINT CHR$(226);:NEXT
1540 RETURN
1550 'ハンヨウON/OFF
1560 LOCATE SX,SY:IF SU=0 PRINT" OFF":RETURN
1570 PRINT"  ON":RETURN
1580 'バイリツ
1590 LOCATE SX,SY:IF SU=0 PRINT" 1/2":RETURN
1600 IF SU<10 PRINT"  "+STR$(SU):RETURN
1610 IF SU=11 PRINT"  10":RETURN
1620 IF SU=13 PRINT"  12":RETURN
1630 IF SU=14 PRINT"  15":RETURN
1640 PRINT" "+STR$(SU):RETURN
1650 'ゲンスイ
1660 LOCATE SX,SY:IF SU=0 PRINT"   0":RETURN
1670 ON SU GOTO 1680,1690,1700
1680 PRINT" 1.5":RETURN
1690 PRINT"   3":RETURN
1700 PRINT"   6":RETURN
1710 'ト-タルレベル
1720 LOCATE 12,7:IF MP(13)=0 PRINT " 0.00":RETURN
1730 IF MP(13)=1 PRINT " 0.75":RETURN
1740 TL$=STR$(MP(13)*75)
1750 IF LEN(TL$)<5 TL$=CHR$(32)+TL$:GOTO 1750
1760 PRINT MID$(TL$,2,2)+"."+RIGHT$(TL$,2):RETURN
1770 'ディスト-ション
1780 LOCATE SX,SY:IF SU=0 PRINT"SIGN":RETURN
1790 PRINT"HALF":RETURN
1800 'フィ-ドバック
1810 LOCATE 19,8:IF MP(16)=0 PRINT"   0":RETURN
1820 ON MP(16) GOTO 1830,1840,1850,1860,1870,1880,1890
1830 PRINT"N/16":RETURN
1840 PRINT" N/8":RETURN
1850 PRINT" N/4":RETURN
1860 PRINT" N/2":RETURN
1870 PRINT"   N":RETURN
1880 PRINT"  2N":RETURN
1890 PRINT"  4N":RETURN
1900 'ADSR ハンヨウ
1910 LOCATE SX,SY:IF SU<10 PRINT " ";
1920 PRINT " "+STR$(SU):RETURN
1930 'パラメ-タ-ベツ
1940 I=MO:GOSUB 2190:ON I GOTO 1950,1960,1970,1980,1990,2000,2010,2020,2030,2040,2050,2060,2070,2080,2090,2100,2110,2120,2130,2140,2150,2160,2170,2180
1950 GOSUB 1560:GOSUB 670:GOTO 150
1960 GOSUB 1560:GOSUB 670:GOTO 150
1970 GOSUB 1560:GOSUB 670:GOTO 150
1980 GOSUB 1560:GOSUB 670:GOTO 150
1990 GOSUB 1580:GOSUB 670:GOTO 150
2000 GOSUB 1560:GOSUB 710:GOTO 150
2010 GOSUB 1560:GOSUB 710:GOTO 150
2020 GOSUB 1560:GOSUB 710:GOTO 150
2030 GOSUB 1560:GOSUB 710:GOTO 150
2040 GOSUB 1580:GOSUB 710:GOTO 150
2050 GOSUB 1660:GOSUB 750:GOTO 150
2060 GOSUB 1780:GOSUB 790:GOTO 150
2070 GOSUB 1720:GOSUB 750:GOTO 150
2080 GOSUB 1660:GOSUB 790:GOTO 150
2090 GOSUB 1780:GOSUB 790:GOTO 150
2100 GOSUB 1810:GOSUB 790:GOTO 150
2110 GOSUB 1910:GOSUB 830:GOTO 150
2120 GOSUB 1910:GOSUB 830:GOTO 150
2130 GOSUB 1910:GOSUB 910:GOTO 150
2140 GOSUB 1910:GOSUB 910:GOTO 150
2150 GOSUB 1910:GOSUB 870:GOTO 150
2160 GOSUB 1910:GOSUB 870:GOTO 150
2170 GOSUB 1910:GOSUB 950:GOTO 150
2180 GOSUB 1910:GOSUB 950:GOTO 150
2190 SU=MP(I):SX=(PEEK(&H6041+I))-48:SY=(PEEK(&H6059+I))-48:RETURN

 

Joomla templates by a4joomla