home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carousel Volume 2 #1
/
carousel.iso
/
comdore
/
64music
/
musmastr.prg
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1988-12-02
|
6KB
|
166 lines
200 GOTO460
210 :
220 :
230 REM SLIDE SUBROUTINE
240 IFRA<0THENRA=R
250 RB=R:T=S+V*Z7:POKEVN,V*Z7:POKENL,FL(RA):POKENH,FH(RA):SYSS2:POKET+Z4,WV+Z1
260 FORI=RATORBSTEPSGN(RB-RA)/2:POKET,FL(I):POKET+1,FH(I):NEXT
270 IFPEEK(IK)=JANDPEEK(IK)-64THEN270
280 RA=RB:POKET+Z4,WV+P:V=V+MN*(Z1+Z3*(V=Z2)):RETURN
290 :
300 REM CHORD SUBROUTINE
310 POKEBF,Z0:FORI=Z0TOZ2:A=R+C(C1,C2,I):POKEVN,I*Z7:POKENL,FL(A)
320 POKENH,FH(A):SYSS2:NEXT:POKES+Z4,WV+Z1:POKES+11,WV+Z1:POKES+18,WV+Z1
330 IFPEEK(IK)=JANDPEEK(IK)-64THEN330
340 POKES+Z4,WV+P:POKES+11,WV+P:POKES+18,WV+P:RETURN
350 :
360 REM POLYPHONIC SUBROUTINE
370 A=PEEK(IK):SYSS1:J=PEEK(ET):IFJ=Z0ORA=ZSTHENRETURN
380 FORI=Z1TOJ:R=K(PEEK(ET+I))+OC:IFR=OCTHENNEXT:RETURN
390 T(I)=V*Z7:POKEVN,T(I):POKENL,FL(R):POKENH,FH(R):SYSS2
400 IFMNTHENV=V+Z1:IFV=Z3THENV=Z0
410 NEXT:FORI=Z1TOJ:POKES+T(I)+Z4,WV+Z1:NEXT
420 SYSS1:IFJ=PEEK(ET)ANDA=PEEK(IK)THEN420
430 FORI=Z1TOJ:POKES+T(I)+Z4,WV+P:NEXT:GOTO370
440 :
450 :
460 REM INITIALIZE VARIABLES
470 PRINT"[147]"CHR$(142);CHR$(8);:POKE53280,0:POKE53281,0:POKE788,52:REM IGNORE RUN/STOP
480 FORI=1TO39:SP$=SP$+" ":LN$=LN$+"#":NEXT
490 PRINT"OCTAVE=5 VOICE=1 :C:S:M:V[146]:P[146]: VOLUME=10"LN$
500 POKE214,23:PRINT:PRINTTAB(15)"MUSICMASTER
510 A$[178]"PLEASE STAND BY":[151]214,21:[153]:[153][163]13)""A$:S[178]54272:[141]1580
520 [134]FL(134),FH(134),K(255),C(8,2,2):OC[178]48:VL[178]10:MN[178]1:LL[178]1:RA[178][171]1
530 Z1[178]1:Z2[178]2:Z3[178]3:Z4[178]4:Z7[178]7:ZS[178]64:FF[178]255:HB[178]256
540 IK[178]197:BF[178]198:VN[178]251:NL[178]900:NH[178]901:ET[178]829:S1[178]49152:S2[178]49408:[129]I[178]Z1[164]41
550 K([198]([202]("Q2W3ER5T6Y7UI9O0P@-*\^ZSXDCVGBHNJM,L.:/",I)))[178]I:[130]
560 [153][163]13)"OPENON"A$:R[178]5.8:A[178]10787.4138:J[178]Z2[174]([171]Z1[173]12)
570 [129]I[178]94[164]0[169][171]1:FH(I)[178][181](A[172]R[173]HB):FL(I)[178]A[172]R[171]HB[172]FH(I):A[178]A[172]J:[130]
580 [153][163]13)"ON"A$:[141]1310
590 :
600 [143] READ ALL DATA
610 [129]I[178]Z0[164]8:[129]J[178]Z0[164]Z2:[135]C(I,J,0),C(I,J,1),C(I,J,2):[130]:[135]C$(I):[130]
620 [135]NM$(0),NM$(1),NM$(2):[129]I[178]1[164]8:[135]AD(I),SR(I),WV(I),PL(I),PH(I):[130]
630 [129]R[178]1[164]2:[135]I,J:[129]A[178]I[164]J:[135]IN:[151]A,IN:[130]:[130]
640 [153][163]9)"(USE CONTROL-X TO EXIT)":I[178]1:[141]860
650 :
660 :
670 [143] NUCLEUS
680 [146]BF,FF:J[178][194](IK):[161]A$:R[178]K([198](A$))[170]OC:[139]R[178]OC[167][141]800:[137]680
690 [139]SL[167][141]240:[137]680
700 [139]CH[167][141]310:[137]680
710 [139]LL[167][141]370:[137]680
720 T[178]S[170]V[172]Z7:[151]VN,V[172]Z7:[151]NL,FL(R):[151]NH,FH(R):[158]S2:[151]T[170]Z4,WV[170]Z1
730 [139]MN[167]V[178]V[170]Z1:[139]V[178]Z3[167]V[178]Z0
740 [139][194](IK)[178]J[175][194](IK)[171]64[167]740
750 [151]T[170]Z4,WV[170]P:[146]BF,FF:[161]A$:J[178][194](IK):R[178]K([198](A$))[170]OC:[139]R[171]OC[167]720
760 [141]800:[137]680
770 :
780 :
790 [143] PARAMETER FUNCTIONS
800 [139]CH[178]0[167]830
810 [129]I[178]0[164]2:[139]A$[178][202]("SPC((null)STEP",I[170]1,1)[167]C2[178]I:[153]""[163]23)NM$(I):[142]
820 [130]:A[178][198](A$):[139]A[177]32[175]A[179]42[167]C1[178]A[171]33:[153]""[163]11)C$(C1):[142]
830 [129]I[178]1[164]8:[139]A$[179][177][202]("STOPOPENCLRSYS",I,1)[167][130]:[137]850
840 OC[178]12[172](I[171]Z1):[153]""[163]7)[202]([196](I),2):[142]
850 [129]I[178]1[164]8:[139]A$[179][177][202]("FORVERIFYDEFPOKEPRINT#PRINTCONTLIST",I,1)[167][130]:[137]880
860 [151]902,PL(I):[151]903,PH(I):WV[178]WV(I):[151]904,WV:[151]905,AD(I):[151]906,SR(I)
870 [153]""[163]16)[202]([196](I),2):[142]
880 [139]A$[179][177]"INPUT"[175]A$[179][177]"DIM"[167]930
890 VL[178]VL[171](VL[179]15[175]A$[178]"INPUT")[170](VL[177]0[175]A$[178]"DIM"):[151]S[170]24,VL
900 [153]""[163]37)[201]("0"[170][202]([196](VL),2),2):[142]
910 :
920 [143]STYLE FUNCTIONS
930 [139]A$[178]"RUN"[167]P[178]1[171]P:[151]1047,13[170]128[172]P:[137]1580
940 [139]A$[178]"IF"[167] MN[178]1[171]MN:[151]1049,22[170]128[172]MN:[137]1580
950 [139]A$[178]"RESTORE"[167]LL[178]1[171]LL:[151]1051,16[170]128[172]LL:[142]
960 [139]A$[178]"LET"[167]SL[178]1[171]SL:RA[178][171]1:[151]1045,19[170]128[172]SL:CH[178]1:[137]990
970 [139]A$[179][177]"READ"[167]1010
980 [151]1045,19:SL[178]0
990 CH[178]1[171]CH:[151]1043,3[170]128[172]CH:[139]CH[178]0[167][153]""LN$:[153]SP$:[142]
1000 [153]""SP$"ONCHORD TYPE:"C$(C1)[163]23)NM$(C2)" INVERSION"LN$:[142]
1010 [139]A$[178]" "[167][141]1580:RA[178][171]1:[151]BF,Z0:[142]
1020 [139]A$[178]""[167][141]1580:[153]"LOAD";:[151]788,49:[128]
1030 [139]A$[179][177]"GOTO"[167][142]
1040 :
1050 :
1060 [143] DISPLAY WAVEFORM PARAMETERS
1070 [141]1470:[151]214,13:[153]
1080 [153]"VOICE TO BE DEFINED (1-8)";:J[178]1:[141]1500
1090 [139]IN[179]1[176]IN[177]8[167][141]1470:[137]1400
1100 I[178]IN:[153][163]31)"ATT:"[202]([196]([181](AD(I)[173]16)),2)
1110 [153][163]31)"DEC:"[202]([196](AD(I)[175]15),2)
1120 [153][163]31)"SUS:"[202]([196]([181](SR(I)[173]16)),2)
1130 [153][163]31)"REL:"[202]([196](SR(I)[175]15),2)
1140 [153][163]31)"WVF:OPEN"[202]("SAWTRIPULNSE",3[172][188](WV(I))[173][188](2)[171]11,3)"
1150 IFWV(I)=64THENPRINTTAB(31)"PLS:"MID$(STR$(PH(I)*HB+PL(I)),2)
1160 :
1170 REM DEFINE A NEW WAVEFORM
1180 POKE214,14:PRINT:PRINT"ATTACK RATE (0-15)";:J=2:GOSUB1500:IFERTHEN1070
1190 AD=IN:PRINT"DECAY RATE (0-15)";:GOSUB1500:IFERTHEN1070
1200 AD=AD*16ORIN:PRINT"SUSTAIN LEVEL (0-15)";:GOSUB1500:IFERTHEN1070
1210 SR=IN:PRINT"RELEASE RATE (0-15)";:GOSUB1500:IFERTHEN1070
1220 SR=SR*16ORIN:PRINT"[159]SAW [159]TRIANGLE [159]PULSE [159]NOISE";:J=1:GOSUB1500
1230 FORJ=1TO4:IFIN$<>MID$("STPN",J,1)THENNEXT:GOTO1070
1240 WF=2^(J+3):IFWF<>64THEN1260
1250 PRINT"PULSE RATE (0-4095)";:J=4:GOSUB1500:PU=IN:IFIN<0ORIN>4095THEN1070
1260 WV(I)=WF:PL(I)=PU-HB*INT(PU/HB):PH(I)=INT(PU/HB):AD(I)=AD:SR(I)=SR
1270 GOSUB1470:GOSUB1410:GOTO860
1280 :
1290 :
1300 REM DISPLAY KEYBOARDS
1310 POKES+24,VL:PRINT""TAB (9)"[167] [221] [221][221] "
1320 PRINT" LOW [167] [146]2 [146]3[221][146]5 [146]6 [146]7[221][146]9 [146]0[221][146]- [146]\S"
1330 PRINT"KEYBOARD[167][221][221][221][221][221][221][221][221][221][221][221][221][221][221]"
1340 PRINTTAB (9)"[167][157][157][157][157][157][157] [157][157][157][157]*[157][157] "
1350 PRINTTAB(13)"DOWN[192] [221] [221] [146][151]"
1360 PRINT" HIGH [170] [146]S [146]D[221][146]G [146]H [146]J[221][146]L [146]: [146][180]"
1370 PRINTKEYBOARD "
1380 [153][163]13)"TANZ(null)X(null)C(null)V(null)B(null)N(null)M(null),(null).(null)/(null)WAITSGN"
1390 ::
1400 [143] DISPLAY FUNCTION MENU
1410 [151]214,13:[153]:[153]"F1 -- LOUDER F2 -- DEFINE WAVEFORM"
1420 [153]"F3 -- SOFTER F4 -- OPENMAINTAIN"
1430 [153]"F5 -- OPENCHORDS F6 -- OPENMULTIVOICE"
1440 [153]"F7 -- OPENSLIDES F8 -- OPENPOLYPHONIC ":[142]
1450 :
1460 [143] CLEAR DISPLAY AREA
1470 [151]214,12:[153]:[129]J[178]1[164]11:[153]SP$:[130]:[142]
1480 :
1490 [143] INPUT SUBROUTINE
1500 IN$[178]"":[153]"? ";
1510 [153]" WAITCMD";:[146]BF,FF:[161]A$:[139]A$[178]""[167]1020
1520 A[178][198](A$):[139]A[178]13[167][153]" ":IN[178][197](IN$):ER[178](IN[179]0[176]IN[177]15)[176]IN$[178]"":[142]
1530 [139]A[178]20[175][195](IN$)[167][153]" ";:IN$[178][200](IN$,[195](IN$)[171]1)
1540 [139](A[175]127)[179]35[176][195](IN$)[178]J[167]1510
1550 [153]A$;:IN$[178]IN$[170]A$:[137]1510
1560 :
1570 [143] CLEAR MUSIC CHIP
1580 [129]I[178]4[164]18[169]7:[151]S[170]I,0:[130]:[129]I[178]0[164]23:[151]S[170]I,0:[130]:[142]
1590 :
1600 :
1610 [143] CHORD DATA
1620 [131],4,7,,3,8,,5,9,"MAJOR ",,3,7,,4,9,,5,8,"MINOR "
1630 [131],3,6,,3,9,,6,9,"DIMINISHED",,4,8,,4,8,,4,8,"AUGMENTED "
1640 [131],4,11,,4,11,,4,11,"MAJOR 7TH ",,3,10,,3,10,,3,10,"MINOR 7TH "
1650 [131],4,10,,4,10,,4,10,"DOMIN 7TH",4,7,9,4,7,9,4,7,9,"MAJOR 6TH "
1660 [131]3,7,9,3,7,9,3,7,9,"MINOR 6TH"," ROOT"," FIRST",SECOND
1670 :
1680 [143] WAVEFORM PARAMETER DATA
1690 [131],249,16,,,,249,32,,,,249,64,160,15,,249,128,,,,240,16,,,204,204,16,,
1700 [131],252,64,200,,192,240,32,,
1710 :
1720 [143] MULTI-INPUT ASSEMBLY CODE
1730 [131]49152,49294,120,169,,141,61,3,170,169,254,133,252,165,252,141,,220,173
1740 [131]1,220,157,143,192,232,56,38,252,176,239,162,,160,,189,143,192,42,176
1750 [131]29,72,132,253,138,10,10,10,5,253,168,185,79,192,238,61,3,172,61,3,153
1760 [131]61,3,104,192,3,240,12,164,253,200,192,8,208,219,232,224,8,208,209,88
1770 [131]96,17,135,134,133,136,29,13,20,0,69,83,90,52,65,87,51,88,84,70,67,54
1780 [131]68,82,53,86,85,72,66,56,71,89,55,78,79,75,77,48,74,73,57,44,64,58,46
1790 [131]45,76,80,43,47,94,61,1,19,59,42,92,3,81,2,32,50,4,95,49
1800 :
1810 [143] MUSICLOADER ASSEMBLY CODE
1820 [131]49408,49454,169,212,133,252,169,,160,6,145,251,136,145,251,170,169,8
1830 [131]136,145,251,138,145,251,136,192,1,208,249,188,41,193,185,132,3,145,251
1840 [131]232,224,6,208,243,96,2,3,,1,6,5