Classic Computer Magazine Archive PROGRAM LISTING: 82-10/PLTCOMP.PLT


50 R:PILOT COMPOSER
60 R:ANTIC, VOL 1 #4
70 R:
100 R: INIT
110 *INIT
120 R:
130 C:$NOTEVALUES=
140 C:$PLAYVALUES=
150 C:$END=!
160 C:$GOODNOTES=C D E F G A B 0
170 C:$GOODDURATION=1 2 4 8 S 0
180 C:$NOTETABLE=C. 1/ D. 3/ E. 5/ F. 6/ G. 8/ A. 10/ B. 12/ 0. 0/ 1. 1/ 2. 2/ 4. 4/ 8. 8/ S. 16/
300 R: FILE
310 *FILE
320 R:
330 T:ENTER DEVICE TO SAVE MUSIC ON
340 T:D=DISK, C=CASSETTE
350 A:$D
360 R:NEXT, CHECK TO SEE IF CASSETTE
370 M: C
380 CY:$FILESPEC=C:
390 JY:*FILEDONE
400 M: D
410 TY:ENTER FILE NAME (IF D, USE DX:)
420 AY:$FILE
429 R: $FILESPEC=$D:$FILE
430 CY:$FILESPEC=$FILE
440 TN:I DON'T KNOW THAT DEVICE
450 JN:*FILE
460 *FILEDONE
470 T:�
500 R: INSTRUCTIONS
510 *INSTRUCTIONS
520 R:
530 T:
540 T:NOTES ARE: C D E F G A B
550 T:      AND 0 FOR OFF
560 T:
570 T:DURATIONS ARE:
580 T:      1=WHOLE      2=HALF
590 T:      4=QUARTER    8=EIGHTH
600 T:      S=SIXTEENTH  0=NONE
610 T:
615 T:
620 T:ENTER & TO QUIT
630 T:
700 R: ENTER
710 *ENTER
720 R:
730 C:#A=#A+1
740 POS:1,15
750 T:ENTER 4 NOTES + DURATION FOR CHORD #A
760 POS:18,16
770 A:$NOTES
780 M: &
790 JY:*ENDER
800 EY:
810 U:*CHECKNOTES
820 SO:20
830 PA:7
840 SO:0
850 WRITE(#A=10):$FILESPEC,$PLAYVALUES
860 C(#A=10):#A=0
870 J:*ENTER
900 R: ENDER
910 *ENDER
920 R:
930 C:$PLAYVALUES=$PLAYVALUES!
940 WRITE:$FILESPEC,$PLAYVALUES
950 CLOSE:$FILESPEC
960 T:
970 T:      SAVED IN FILE $FILESPEC
980 T:
990 T:         SESSION ENDED
1000 E:
1100 R: CHECKNOTES
1110 *CHECKNOTES
1120 MS:,  
1130 A:=$NOTES
1140 MS:,
1150 A:=$RIGHT!/
1160 C:#C=0
1170 C:$NOTEVALUES=
1180 C:#G=0
1190 *LOOP
1200 MS:,
1210 CN(#G=0):$PLAYVALUES=$PLAYVALUES$NOTEVALUES
1220 POSN(#G=0):2,22
1225 R:
1230 TN(#G=0):            
1240 EN:
1250 MS:$RIGHT
1260 C:$SAVE=$MATCH
1270 A:=$LEFT
1280 MS:_
1290 R:$LEFT HAS LETTER WE NEED
1300 C:$NOTE=$LEFT
1310 U:*TRANSLATE
1320 A:=$SAVE
1330 J:*LOOP
1400 R: TRANSLATE
1410 *TRANSLATE
1420 R:
1430 C:#C=#C+1
1440 E(#C=7):
1450 A(#C<5):=$GOODNOTES
1460 A(#C=5):=$GOODDURATION
1470 M:$NOTE
1480 POSN:2,22
1490 TN:ERROR IN THIS VALUE: $NOTE
1500 R:
1510 CN:#G=1
1520 EN:
1530 A(#C=6):=$NOTE
1540 M(#C=6):!
1550 EY(#C=6):
1560 POSN(#C=6):2,22
1570 TN(#C=6):TOO MANY VALUES:$NOTE
1580 CN(#C=6):#G=1
1590 EN(#C=6):
1600 POSN(#C>6):2,22
1610 T(#C>6):TOO MANY VALUES: $NOTE
1620 C(#C>6):#G=1
1630 E(#C>6):
1640 A:=$NOTETABLE
1650 MS:$NOTE.
1660 A:=$RIGHT
1670 MS:/
1680 C:$NOTEVALUES=$NOTEVALUES$LEFT
1690 E:

Back to previous page