home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 3
/
FREEWARE.BIN
/
towns_os
/
taropyon
/
he
/
sample.bas
< prev
next >
Wrap
BASIC Source File
|
1980-01-02
|
6KB
|
181 lines
10000 '
10010 ' High-EUP compiler 用サンプル曲 #1
10020 '
10030 ' Music By TaroPYON
10040 '
10050 ' save "SAMPLE.BAS",A ' filename
10060 '
10070 ' Last Update 1990. 8.21
10080 '
10090 ' Townsシステムソフトウェア か F-BASIC386のCD-ROMからロードする
10100 ' LOAD@"q:\FJ\FM\MT32FM.FMB" : LOAD@"Q:\FJ\PCM\DRUMS.PMB"
10110 '
10120 DEFSTR A-Z : DEBUG%=0 : IF MML_CNV% THEN GOSUB *MML_OPEN
10130 R="r":R1="r1":R2="r2":R4="r4":R8H="r8.":R8="r8":R16="r16":R32="r32"
10140 D1="1" :D2= "2":D4= "4":D8H= "8.":D8= "8":D16= "16":D32= "32"
10150 DIM VEL(127):FOR I%=0 TO 127:VEL(I%)="@v"+MID$(STR$(I%),2):NEXT
10160 DIM PAN(30):FOR I%=0 TO 14:PAN(I%)="%l"+MID$(STR$(15-I%),2):PAN(I%+16)="%r"+MID$(STR$(I%+1),2):NEXT:PAN(15)="%c" 'パンポット
10170 DEF FND(U%)="u"+STR$(U%) 'ディチューン
10180 '
10190 ' TONE TABLE [FM]
10200 '
10210 T_MELA ="@81" :MELA ="o4q8" :V_MELA% =110 :P_MELA% =15 :D_MELA% =50
10220 T_MELB ="@81" :MELB ="o4q8" :V_MELB% =110 :P_MELB% =16 :D_MELB% =-50
10230 T_PIANO="@96" :PIANO="o5q8" :V_PIANO%= 88 :P_PAINO%=15 :D_PIANO%=20
10240 T_BCODE="@44" :BCODE="o4q8" :V_BCODE%=127 :P_BCODE%=15 :D_BCODE%=0
10250 T_BASS ="@70" :BASS ="o2q8" :V_BASS% = 84 :P_BASS% =15 :D_BASS% =0
10260 '
10270 ' DRUMS TABLE [PCM]
10280 '
10290 T_DRUMS="@1q8" '-------------- "DRUMS.PMB"用 ------------------
10300 T_BSD="o1q8@v125" : BSD=PAN(15)+"c-"
10310 T_SNR="o1q8@v127" : SNR=PAN(14)+"f+"
10320 T_TM ="o2q8v13" : TM1=PAN(16)+"b+":TM2=PAN(12)+"a+":TM3=PAN(8)+"g+": TM4=PAN(4)+"f"
10330 T_CRS="o5q8v13" : CRS=PAN(19)+"f"
10340 T_OHH="o4q8v10" : OHH=PAN(17)+"g"
10350 T_CHH="o3q8v10" : CHH=PAN(17)+"g"
10360 T_CLP="o6q8v13" : CLP=PAN(20)+"f"
10370 '
10380 ' Drums Pattern
10390 '
10400 PA_02=T_CHH+"l8"+R4+CHH+CHH+CHH+CHH+CHH+CHH
10410 PB_02=T_SNR+R4+SNR+D4+R4+SNR+D4
10420 PC_02 = "l8"+T_BSD+BSD+D4+R+BSD+R+BSD+BSD+BSD
10430 PD_02=T_CRS+CRS+D4+T_CLP+CLP+D4+R4+CLP+D4
10440 PC_02 = "l8"+T_BSD+BSD+D4+R+BSD+R+BSD+BSD+BSD : PD_02=T_CRS+CRS+D4+T_CLP+CLP+D4+R4+CLP+D4
10450 PA_03=T_CHH+"l8"+CHH+CHH+CHH+CHH+CHH+CHH+CHH+CHH
10460 PD_03=T_CLP+R4+CLP+D4+R4+CLP+D4
10470 PD_05=T_CLP+R4+CLP+D4+R4+T_CRS+CRS+D4
10480 '
10490 ' Bass Pattern
10500 '
10510 BASS_G = "l16>g8<ggg8>g8<g8>g8g8<gg"
10520 BASS_F = "l16>f8<fff8>f8<f8>f8f8<ff"
10530 BASS_E = "l16>e-8<e-e-e-8>e-8<e-8>e-8e-8<e-e-"
10540 BASS_A = "l16>a8<aaa8>a8<a8>a8a8<aa"
10550 '
10560 IF DEBUG% THEN GOSUB *PART_DEF:GOSUB *PLAY_INIT
10570 IF DEBUG% THEN GOSUB *A_PART
10580 IF DEBUG% THEN END
10590 GOTO *MAIN
10600 '
10610 ' PLAY SubRoutine
10620 '
10630 *PLAY_SUB
10640 IF MML_CNV%=0 THEN PLAY P1,P2,P3,P4,P5,P6,PA,PB,PC,PD : RETURN
10650 GOSUB *MML_SEND
10660 PRINT #1, P1 : PRINT #1, P2
10670 PRINT #1, P3 : PRINT #1, P4
10680 PRINT #1, P5 : PRINT #1, P6
10690 PRINT #1, PA : PRINT #1, PB
10700 PRINT #1, PC : PRINT #1, PD
10710 RETURN
10720 '
10730 ' PART DEFINE
10740 '
10750 *PART_DEF : PLAY OFF : IF MML_CNV% THEN GOSUB *MML_PART
10760 FOR I%=0 TO 15 : PART I%,0 : NEXT
10770 PART 0, 0 : PART 1, 1 'Melody (1st A,B)
10780 PART 2, 2 : PART 3, 3 'Backing
10790 PART 4, 4
10800 PART 5, 5
10810 PART 6, 6 'Drums
10820 PART 7, 7
10830 PART 8, 8
10840 PART 9, 9
10850 RETURN
10860 '
10870 ' PLAY INIT
10880 '
10890 *PLAY_INIT : A="t160"
10900 P1=A+T_MELA+PAN(P_MELA%)+FND(D_MELA%): P2=A+T_MELB+PAN(P_MELB%)+FND(D_MELB%)
10910 P3=A+T_PIANO+PAN(P_PIANO%)+FND(D_PIANO%-32): P4=A+T_PIANO+PAN(P_PIANO%)+FND(P_PIANO%+32)
10920 P5=A+T_BCODE+PAN(P_BCODE%)+FND(D_BCODE%)
10930 P6=A+T_BASS+PAN(P_BASS%)+FND(D_BASS%)
10940 PA=A+T_DRUMS
10950 PB=A+T_DRUMS
10960 PC=A+T_DRUMS
10970 PD=A+T_DRUMS
10980 GOSUB *PLAY_SUB
10990 '
11000 P1=R1: P2=R1
11010 P3=R1: P4=R1
11020 P5=R1
11030 P6=R1
11040 PA=T_CHH+"l8"+CHH+D4+R+CHH+R2
11050 PB=T_SNR+"l8r2r"+SNR+R4
11060 PC=T_BSD+"l8"+BSD+D4+R+BSD+R+ BSD+BSD+D4
11070 PD="l8r2r"+T_CLP+CLP+T_CRS+CRS+D4
11080 GOSUB *PLAY_SUB : RETURN '1
11090 '
11100 ' [A] PART
11110 '
11120 *A_PART
11130 GOSUB *A_1 : GOSUB *A_2
11140 GOSUB *A_1 : GOSUB *A_3
11150 RETURN
11160 '
11170 *A_1
11180 A="l8gfgb-4b->c<b- a2f4d8.&":P1=MELA+VEL(V_MELA%)+A+"d16": P2=MELB+VEL(V_MELB%)+R16+A
11190 A="l8b-2g2 >c4.<a&a2":P3=PIANO+VEL(V_PIANO%)+A: P4=PIANO+VEL(V_PIANO%)+A
11200 P5=BCODE+VEL(V_BCODE%)+"g1 f1"
11210 P6=BASS+VEL(V_BASS%)+"l16"+BASS_G + BASS_F
11220 PA=PA_02+PA_03
11230 PB=PB_02+PB_02
11240 PC=PC_02+PC_02
11250 PD=PD_02+PD_03
11260 GOSUB *PLAY_SUB '2,3
11270 '
11280 A="e-de-f4gab- a2f4d8.&":P1=A+"d16": P2="d16"+A
11290 P3="g2e-2 a4.f4.d4": P4=P3
11300 P5="e-1& f1"
11310 P6=BASS_E + BASS_F
11320 PA=PA_02+PA_03
11330 PB=PB_02+PB_02
11340 PC=PC_02+PC_02
11350 PD=PD_02+PD_05
11360 GOSUB *PLAY_SUB '4,5
11370 '
11380 A="gfgb-4b->c<b- a2f4>c16<b-16a16&":P1=A+"a16": P2="d16"+A
11390 P3="b-2g2 >c4.<a4.f4": P4=P3
11400 P5="g1 a1"
11410 P6=BASS_G + BASS_A
11420 PA=PA_02+PA_03
11430 PB=PB_02+PB_02
11440 PC=PC_02+PC_02
11450 PD=PD_02+PD_03
11460 GOSUB *PLAY_SUB : RETURN '6,7
11470 '
11480 *A_2
11490 A="g1 f4.g4.a8.":P1=A+"&a16": P2="d16"+A
11500 P3="g1 f4.g4.a4": P4=P3
11510 P5="g1& g1"
11520 P6=BASS_G + ">g8<ggg8>g<gg8gg>g8<gg"
11530 PA=PA_02+R1
11540 PB=PB_02+R4+T_SNR+SNR+D4+R4+"l8"+SNR+SNR
11550 PC=PC_02+"l8"+BSD+D4+R+BSD+D4+BSD+D4+R
11560 PD=PD_02 + T_CLP+R4+CLP+D4+R4+"l8"+CLP+CLP
11570 GOSUB *PLAY_SUB : RETURN '8.9
11580 '
11590 *A_3
11600 A="g1 f4.g4.&g8.":P1=A+"&g16": P2="d16"+A
11610 P3="g1& g1": P4=P3
11620 P5="g1& g1"
11630 P6=BASS_G + ">g8<ggg8>g<gg8ggg8gg"
11640 PA=PA_02+R1
11650 PB=PB_02 + T_SNR+R4+SNR+D4+R+SNR+SNR+SNR
11660 PC=PC_02+"l8"+BSD+D4+R+BSD+D4+R+R+BSD
11670 PD="l8"+T_CRS+CRS+D4+T_CLP+CLP+"rr4"+CLP+D4 + T_CRS+CRS+D4+T_CLP+CLP+T_CRS+CRS+D4+T_CLP+CLP+CLP+CLP
11680 GOSUB *PLAY_SUB : RETURN '10,11
11690 '
11700 ' MAIN
11710 '
11720 *MAIN
11730 '
11740 GOSUB *PART_DEF
11750 GOSUB *PLAY_INIT
11760 '
11770 GOSUB *A_PART
11780 IF MML_CNV% THEN GOSUB *MML_CLOSE
11790 END