8-Bit Software Online Conversion
20 Carols - Listing
20DIMchord%(2,2),env%(3,2),pit%(2),ti
tle$(19)
50RESTORE
60PROCread
70REPEAT
80MODE7
90PROCinput
100MODE4
110PROCvdu
120FORnumber=0 TO repeat
130PROCfirst
140PROCscore
150FORchar=1TOLEN(pit$)
160PROCdata
170PROCtoscore
180PROCchoosechord
190PROCplay
200NEXT
210pause=GET
220NEXT
230UNTILFALSE
240END
260:
270DEFPROCread
280FORC=0TO19
290READtitle$(C)
300NEXT
310FORC=0TO2
320FORK=0TO2
330READchord%(C,K)
340NEXT,
360FORC=0TO3
370FORK=0TO2
380READenv%(C,K)
390NEXT,
410ENDPROC
420:
430DEFPROCinput
440totrep=0
450PRINTTAB(4,2)"CHOICE (1 to 20)? :"
460FORC=0TO19
470PRINTTAB(2,4+C);CHR$(129+(C MOD 7))
;title$(C);
480NEXT
490REPEAT:PRINTTAB(25,2)SPC(15);:INPUT
TAB(25,2)choice:UNTILchoice>0 ANDchoice<
=20 ANDchoice=INT(choice)
500IFchoice=20 totrep=-1:choice=0:repe
at=18:ENDPROC
510CLS
520PRINTTAB(2,3)"WHAT IS THE SPEED (1
- 10)?"
530PRINTTAB(2,8)"No. OF REPEATS?"
540PRINTTAB(2,13)"PITCH (0 - 12)?"
550PRINTTAB(2,18)"ENVELOPE (0 TO 3)?"
560REPEAT:PRINTTAB(4,4)SPC(15);:INPUTT
AB(4,4) speed:UNTILspeed>0ANDspeed<11AND
speed=INT(speed)
570REPEAT:PRINTTAB(4,9)SPC(15);:INPUTT
AB(4,9)repeat:UNTILrepeat>=0ANDrepeat=IN
T(repeat)
580REPEAT:PRINTTAB(4,14)SPC(15);:INPUT
TAB(4,14) pitch:UNTILpitch>=0ANDpitch<=1
2ANDpitch=INT(pitch)
590REPEAT:PRINTTAB(4,19)SPC(15);:INPUT
TAB(4,19) envel:UNTILenvel>=0ANDenvel<=3
ANDenvel=INT(envel)
600pitch=pitch*4:speed=(speed+4)/10
610ENDPROC
620:
630DEFPROCdata
640char$=MID$(pit$,char,1)
650posit=INSTR("drmfsltDRMFSLTa",char$
)
660pit%(0)=VAL(MID$("03304104905306106
9077081089097101109117125129",(posit-1)*
3+1,3))
670pitpos=160-posit*8
680char$=MID$(dur$,char,1)
690posit=INSTR(" qQcCmMs",char$)
700dur=VAL(MID$("0004060812162432",(po
sit-1)*2+1,2))
710notdur=(posit-1)*2-1
720ENDPROC
730:
740DEFPROCfirst
750IFtotrep PROCtotrep:choice=choice+1
760RESTORE(2380+30*(choice-1))
770across=1:down=4:sub=0:PROCenv
780transA0=0:transA1=0:transA2=0:trans
A3=0
790transB0=0:transB1=0:transB2=0:trans
B3=0
800READbar,count,top,bottom,scansion,p
it$,dur$
810pit$=pit$+" "
820dur$=dur$+" "
830ENDPROC
840:
850DEFPROCplay
860IFcount=0 sub=-1:PROCenv
870FORC=0TO2
880SOUND(&201+C),env%(envel,C),pit%(C)
+pitch,dur/speed:PROCLIGHTS
890NEXT
900SOUND1,0,0,0
910IFcount=0 sub=0:PROCenv
920ENDPROC
921 DEFPROCLIGHTS
923 X=INT(RND(256)):?&FD00=X
925 ENDPROC
930DEFPROCchoosechord
940FORC=0TO2
950FORK=0TO2
960IFpit%(0)=chord%(C,K) OR pit%(0)=ch
ord%(C,K)+48 OR pit%(0)=chord%(C,K)+96 p
it%(1)=chord%(C,(K+1)MOD3):pit%(2)=chord
%(C,(K+2)MOD3):C=2:K=2
970NEXT,
990ENDPROC
1010:
1020DEFPROCenv
1030ENVELOPE1,1,0,0,0,0,0,0,126,-4,-1,-
1,110-sub*16,90-sub*10
1040ENVELOPE2,1,0,0,0,0,0,0,126,-4,-1,-
1,90-sub*10,50-sub*10
1050ENVELOPE3,1,0,0,0,0,0,0,60,10,0,-10
0,50-sub*10,110-sub*10
1060ENVELOPE4,1,0,0,0,0,0,0,60,10,0,-10
0,24-sub*8,50-sub*10
1070ENDPROC
1080:
1090DEFPROCtoscore
1100transA0=transA1:transA1=transA2:tra
nsA2=transA3:transA3=pitpos
1110transB0=transB1:transB1=transB2:tra
nsB2=transB3:transB3=notdur
1120addur=VAL(MID$("0004060812162432",t
ransB0+2,2))
1130IFaddur=0 ENDPROC
1140count=(count+addur) MOD bar
1150pipos=transA0
1160pipos=pipos-VAL(MID$("0008081616243
2324040484856",pitch/2+1,2))
1170nodur=transB0
1180whether=(pipos>72 AND pipos<118)OR
pipos<24
1190IFpipos=72 MOVE156+scansion*across,
224*down-72:PRINTCHR$(240)
1200pipos=pipos-16*whether
1210MOVE164+scansion*across,224*down-pi
pos
1220PRINTCHR$(223+nodur-whether)
1230across=across+1
1240IFcount=0 PROCbar
1250IFacross>1050/scansion down=down-1:
across=0
1260ENDPROC
1270:
1280DEFPROCvdu
1290VDU23;8202;0;0;0;
1300VDU19,0,4;0;
1320VDU23,224,12,10,10,8,104,248,240,96
1330VDU23,225,48,120,248,176,128,160,16
0,192
1340VDU23,226,12,10,10,8,104,251,243,96
1350VDU23,227,48,123,251,176,128,160,16
0,192
1360VDU23,228,8,8,8,8,104,248,240,96
1370VDU23,229,48,120,248,176,128,128,12
8,128
1380VDU23,230,8,8,8,8,104,251,243,96
1390VDU23,231,48,123,251,176,128,128,12
8,128
1400VDU23,232,8,8,8,8,104,152,144,96
1410VDU23,233,48,72,200,176,128,128,128
,128
1420VDU23,234,8,8,8,8,104,155,147,96
1430VDU23,235,48,75,203,176,128,128,128
,128
1440VDU23,236,0,0,0,0,112,136,136,112
1450VDU23,237,112,136,136,112,0,0,0,0
1460VDU23,238,10,31,10,10,10,10,31,10
1470VDU23,239,16,16,16,22,25,17,18,12
1480VDU23,240,0,0,0,0,0,0,255,0
1490VDU23,241,4,10,10,10,12,12,8,24
1500VDU23,242,24,40,40,40,72,72,72,72
1510VDU23,243,136,142,153,153,153,137,1
37,74
1520VDU23,244,60,8,8,8,8,8,8,8
1530VDU23,245,252,130,130,1,1,1,1,1
1540VDU23,246,1,2,2,4,4,8,48,192
1550ENDPROC
1560:
1570DEFPROCscore
1580CLG
1590VDU4
1600PRINTTAB(5,1);title$(choice-1);
1610VDU5
1620FORscore=896 TO 224 STEP-224
1630FORline=16TO176 STEP16
1640IFline=96 NEXT
1650MOVE0,score-line
1660DRAW1279,score-line
1670NEXT
1680PROCclef
1690PROCsig
1700NEXT
1710FORscore=880TO-16STEP-224
1720MOVE4,score:DRAW4,score-160
1730NEXT
1740FORscore=0TO96STEP96
1750MOVE164,880-score:PRINTSTR$(top)
1760MOVE164,848-score:PRINTSTR$(bottom)
1770NEXT
1780ENDPROC
1790:
1800DEFPROCclef
1810MOVE12,score+16:VDU241,8,10,242,8,1
0,243,8,10,244
1820MOVE12,score-116:VDU245,8,10,246
1830PLOT69,48,score-118
1840PLOT69,48,score-134
1850ENDPROC
1860:
1870DEFPROCbar
1880IFacross=0 ENDPROC
1890MOVE176+scansion*across,224*down-16
1900DRAW176+scansion*across,224*down-17
6
1910across=across+1
1920ENDPROC
1930DEFPROCsig
1940key=VAL(MID$("1432505234161",pitch/
4+1,1))
1950flat=VAL(MID$("00-100-100-1-100-100
-10000",pitch/2+1,2))
1960IFkey=0 ENDPROC
1970FORkeys=1TOkey
1980po=VAL(MID$("00282404-8361612404408
2016",4*(keys-1)-2*flat+1,2))
2000MOVE48+16*(keys-1),score-po
2010PRINTCHR$(238-flat)
2020MOVE48+16*(keys-1),score-po-112
2030PRINTCHR$(238-flat)
2040NEXT
2050ENDPROC
2060:
2070DEFPROCtotrep
2080pitch=(RND(13)-1)*4
2090envel=RND(4)-1
2100speed=(RND(4)-1)/10+0.8
2110ENDPROC
2120:
2130DATA"1. Good King Wenceslas"
2140DATA"2. As with gladness men of old
"
2150DATA"3. Hark the Herald Angels"
2160DATA"4. O little town of Bethlehem"
2170DATA"5. In the bleak Mid-winter"
2180DATA"6. O come all ye faithful"
2190DATA"7. It came upon a mid-night cl
ear"
2200DATA"8. While shepherds watch"
2210DATA"9. Silent Night"
2220DATA"10.Away in a manger"
2230DATA"11.We wish you a Merry Christm
as"
2240DATA"12.I saw three ships"
2250DATA"13.The First Noel"
2260DATA"14.We Three Kings"
2270DATA"15.God Rest Ye Merry, Gentleme
n"
2280DATA"16.Angels from the Realms of G
lory"
2290DATA"17.Once in Royal Davids City"
2300DATA"18.See, Amid the Winter's Snow
"
2310DATA"19.The Holly and the Ivy"
2320DATA"20.Run through total repertoir
e"
2330:
2340DATA33,49,61,53,69,81,61,77,89
2350:
2360DATA1,4,4,3,1,1,1,2,2,3,4,4
2370:
2380DATA32,0,4,4,60
2390DATA"DDDRDDslsltDDDDDRDDslsltDDSFMR
MRDlsltDDssltDDRSFMRDFD"
2400DATA"ccccccmccccmmccccccmccccmmcccc
ccmccccmmccccccmccccmms"
2410DATA32,0,4,4,76
2420DATA"DtDRDFFMltDlsssDtDRDFFMltDlsss
MRDMSFMltDFMRD"
2430DATA"cqqccccmccccccmcqqccccmccccccm
ccccCqmccccccm"
2440DATA32,0,4,4,44
2450DATA"sDDtDMMRSSSFMRMsDDtDMMRSRRttls
SSSDFMMRSSSDFMMRLLLSFMFRMFSDDRMLLLSFMFRM
FSDDRD"
2460DATA"ccCqccccccCqccmccCqccccccCqccm
ccccccccccccccccccccccmcqqCqccmCqccccmcq
qCqccm"
2470DATA32,24,4,4,48
2480DATA"sDDDRMRMFSMFMDRRDsDDDRMRMFSMFM
DRRDDMSLSFMRDRMFSsDMRDssDDDRMRMFSMFMDRRD
"
2490DATA"cccccqqqqcccqqccMcccccqqqqcccq
qccMqqCqqqqqqqqqccccccmmccccqqqqcccqqCCM
"
2500DATA32,0,4,4,72
2510DATA"MFSMRDRMRlRMFSMRDRMRDDFMFSLLMS
MRDtMFSMRDRMRDD"
2520DATA"CqccmmCqccsCqccmmccCqsCqccccmc
cccsCqccmmccCqs"
2530DATA32,24,4,4,52
2540DATA"DDsDRsMRMFMRDDtltDRMtlssSFMFMR
MDRtsDDtDRDsMMRMFMRMFMRDtDFMRDD"
2550DATA"cmccmmccccmccmccccccmCqsmccmmc
cccmccccccmccccccmccccccmccmCqs"
2560DATA32,24,4,4,52
2570DATA"DRMRDRMFMRSSMFSLSMFSSMDFMRDRMF
SMRDDtltRDtlMRDtlssSFMRMFMRDRMFSMRD"
2580DATA"qqcccqqccccccqqcMqqcccccccqqqq
cccMcccccCqccccccMccccqqcccqqqqcccM"
2590DATA32,24,4,4,58
2600DATA"DMMRDFFMRMSSMSMLSFMRDtMRDDtDDM
MRDFFMRMSSMSMLSFMRDtMRDDtD"
2610DATA"cCqccccccccccMcCqccccccccccMcC
qccccccccccMcCqccccccccccM"
2620DATA24,0,6,8,60
2630DATA"slsmslsmRRtDDsllDtlslsmllDtlsl
smRRFRtDMDsmsfrd"
2640DATA"CqcMCqcMmcMmcMmcCqcCqcMmcCqcCq
cMmccccMMcccCqcM"
2650DATA24,16,3,4,61
2660DATA"sDDRMDDMFSSLFRMFFSMMDMRlDtsDDR
MDDMFSSLFRMFFSMMDMRltD"
2670DATA"cccqqccqqcccmqqcccccqqcccmcccq
qccqqcccmqqcccccqqcccm"
2680DATA24,16,6,8,60
2690DATA"sDDRDtlllRRMRDtsssMMFMRDlsslRt
DsDDDttDtlsRMRRDDSssslRtD"
2700DATA"ccqqqqccccqqqqccqqcqqqqccqqccc
mccccmccccmccqqqqccqqcccm"
2710DATA24,20,6,8,104
2720DATA"sDDRMSMRFMDDMRtssDDRMSMRFMDDRM
RD"
2730DATA"qcqcqcqcqcqcqcqcqcqcqcqcqcqqqq
CC"
2740DATA24,16,3,4,44
2750DATA"MRDRMFSLTaTLSLTaTLSLTaSFMMRDRM
FSLTaTLSLTaTLSLTaSFMMRDRMFSaTLLSaTLSLTaS
FM"
2760DATA"qqCqqqmqqcccmqqcccccccccmqqCqq
qmqqcccmqqcccccccccmqqCqqqmqqmcMcccccccc
cM"
2770DATA24,0,3,4,54
2780DATA"MRDltDtlMRDltDtlDDRRMMSFMRMRDt
ltRDDDsDlDDDDsDlDDDRMFMRMDDDsDlD"
2790DATA"cqcqqqqCcqcqqqqCcqcqcqqqqqqqcq
CcqcqcqcqCcqcqcqCcqcqcqcqcqcqcqC"
2800DATA32,24,4,4,48
2810DATA"llMMRDtlsltDRMllMMRDtlsltDRMMF
RMFSLMRDltDRDRMFMMRDtlDtlRDRMFSLMRDtl"
2820DATA"cccccccccccccMcccccccccccccMcc
cccccccccccmccmccccccmqqcmccccccccccM"
2830DATA32,0,4,4,40
2840DATA"MMMMSSFMDMMRMMSSFMMMMMSSFMDMMR
MMSSFMSLSFMFSFMRMFMRDRsDRMFMRSLSFMFSFMRM
FMRDRsDRMFMRD"
2850DATA"cccqqCqcccqqcqqCqmcccqqCqcccqq
cqqCqmmqqqqmqqqqmqqqqmmqqqqmmmqqqqmqqqqm
qqqqmmccccmms"
2860DATA32,0,4,4,64
2870DATA"stDDDtDRRDDMSMMRDtDstDDDtDRRDD
MSMMRDtDLLSDFFMLLSMMRDtD"
2880DATA"ccCqqqqqccccCqqqqqmccCqqqqqccc
cCqqqqqmccCqccmccCqqqqqm"
2890DATA32,0,4,4,56
2900DATA"DRDtlssDRFMMRRDRDtlssDRMFRDDSS
FMRDtSSFMRDtDRDtlssSMDFMRD"
2910DATA"CqccCqmccccCqmCqccCqmccccCqmCq
ccccmCqccccmCqccCqmCqccccm"
2920DATA32,0,4,4,56
2930DATA"DDDDLSMDDDDLSSFMRDMMllsDRMFMRD
DDDDLSMDDDDLSSFMRDMMllsDRMFMRD"
2940DATA"cqqcccCqqqccmqqqqcqqqqcqqqqccm
cqqcccCqqqccmqqqqcqqqqcqqqqccm"