-
Notifications
You must be signed in to change notification settings - Fork 11
/
A10_Mozart.bc3
214 lines (213 loc) · 6.69 KB
/
A10_Mozart.bc3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
1000 A=1000:GOTO20:REM **MOZART**
1010 REM ** Eroeffnung und Menue **
1020 DIMT$(119),WA(12,7),WB(12,7),SV(160),SP(160),SD(160)
1030 DIMW$(13)
1040 T=1:D=30:TZ=0:W=0:VO=0:SO=2:VT=VE:HT=HO
1050 NC=(ASC("A")=65):REM Not Commodore-64
1060 RESTORE
1070 FORVE=1 TO5:GOSUB2930:GOSUB150:NEXTVE
1080 W=0
1090 FORVE=9 TO19 STEP2:GOSUB2930:PRINTSR$;:NEXTVE
1100 GOSUB120:HE=HO:VE=9:GOSUB110:PRINTD;
1110 VE=11:GOSUB110:PRINTSO;
1120 VE=22:GOSUB2930:GOSUB150
1130 FORW=7 TO13:READW$(W):NEXTW
1140 REM
1150 REM ** Noten und Takte lesen **
1160 REM
1170 FORT=1 TO119:READT$(T):NEXTT
1180 FORZ=2 TO12:FORWT=1 TO7
1190 READWA(Z,WT):READWB(Z,WT)
1200 NEXTWT:NEXTZ
1500 REM
1510 REM ** Funktionsauswahl **
1520 REM
1530 X=7:GOSUB3130:IF(IN$<"1")OR(IN$>"6")THEN1530
1540 X=IN-48:ONX GOTO3530,3630,3730,3830,2030,950
2000 REM
2010 REM ** 24 Takte Mozart-Walzer **
2020 REM
2030 GOSUB3030:X=8:GOSUB3230
2040 FORI=1 TO2
2050 FORWA=1 TO7
2060 GOSUB2530:T=WA(Z,WA):GOSUB2710
2070 NEXTWA
2080 SD=D*3/8:SP=67:SV=12:GOSUB2630
2090 NEXTI
2100 FORWB=1 TO7
2110 GOSUB2530:T=WB(Z,WB):GOSUB2710
2120 NEXTWB
2130 T$(0)="MA5":T=0:GOSUB2710
2140 SV(TZ+1)=-1:TZ=0
2150 REM
2160 REM ** Notenfeld vorspielen **
2170 REM
2180 X=9:GOSUB3230:SR$=W$(13):GOSUB3330
2190 FORTZ=1 TO160
2200 SV=SV(TZ):SP=SP(TZ):SD=SD(TZ)
2210 IFSV=12 THEN GOSUB400:GOTO2250
2220 GOSUB200
2230 IF(IN>0)OR(SV<0)THENTZ=160:GOTO2250
2240 GOSUB400
2250 NEXTTZ
2260 TZ=0:IFSV=-1 THEN2030
2270 GOTO1530
2500 REM
2510 REM ** Zufallszahl 2-12 **
2520 REM
2530 GOSUB260:Z=INT(RV*11)+2
2540 RETURN
2600 REM
2610 REM ** Notenfeld aufbauen **
2620 REM
2630 TZ=TZ+1:SD(TZ)=SD:SV(TZ)=SV:SP(TZ)=SP+12-SO*12
2640 RETURN
2700 REM
2710 FORL=1 TOLEN(T$(T))
2720 HA=ASC(MID$(T$(T),L,1)):IFNC THEN2740
2730 HA=HA+32:IFHA>128 THENHA=HA-160
2740 SV=12:IFL=1 THENSV=15
2750 IFHA>91 THENSD=D/16:SP=HA-32-5:GOSUB2630:GOTO2840
2760 IFMID$(T$(T),L+1,1)="*" THEN2810
2770 SP=HA-5:SD=D/8:GOSUB2630:GOTO2840
2780 REM
2790 REM ** Triller **
2800 REM
2810 SD=D/32:SP=HA-5
2820 FORH1=1 TO8:SP=HA+HA-9-SP:GOSUB2630:NEXTH1
2830 L=L+1
2840 NEXTL
2850 RETURN
2900 REM
2910 REM ** Bildschirmsteuerung **
2920 REM
2930 READSR$:W=W+1:W$(W)=SR$
2940 HO=(HT-LEN(SR$))/2-3:GOSUB110
2950 RETURN
3000 REM
3010 REM ** Zeile loeschen **
3020 REM
3030 VE=VT-2:SR$=W$(10):HO=HT-8:GOSUB110:PRINTSR$;
3040 RETURN
3100 REM
3110 REM ** Textzeile **
3120 REM
3130 GOSUB3030:VE=22:GOSUB2940:PRINTSR$;:SR$=W$(X)
3140 GOSUB2940:PRINTSR$;:GOSUB210
3150 RETURN
3200 REM
3210 REM ** Zeile in inverse **
3220 REM
3230 VE=22:SR$=W$(10):GOSUB2940:PRINTSR$;:SR$=W$(X)
3240 GOSUB2940:GOSUB150
3250 RETURN
3300 REM
3310 REM ** Zeile printen **
3320 REM
3330 VE=VT-2:HO=HT-8:GOSUB110:PRINTSR$;
3340 RETURN
3400 REM
3410 REM ** Zahl loeschen **
3420 REM
3430 VE=X*2+7:HO=HE:GOSUB110:PRINTW$(10);:GOSUB110
3440 INPUTA$:GOSUB110:PRINTW$(10):GOSUB110:PRINT" ";A$;
3450 RETURN
3500 REM
3510 REM ** Tempo veraendern **
3520 REM
3530 GOSUB3430:D=INT(VAL(A$)):IF(D<6)OR(D>99)THEN3530
3540 GOTO1530
3600 REM
3610 REM ** Oktave veraendern **
3620 REM
3630 GOSUB3430:SO=INT(VAL(A$))
3640 IF(SO<0)OR(SO>5)THEN3630
3650 GOTO1530
3700 REM
3710 REM ** Takteingabe **
3720 REM
3730 X=11:GOSUB3230:X=3
3740 GOSUB3430:T=INT(VAL(A$))
3750 IF(T<0)OR(T>119)THEN3740
3760 IF(T=0)OR(TZ>150)THEN3880
3770 GOSUB3030:SR$=T$(T):GOSUB3330:GOSUB2710:GOTO3740
3800 REM
3810 REM ** Zufalls-Melodie **
3820 REM
3830 X=12:GOSUB3230
3840 FORZU=1 TO24
3850 GOSUB260:T=INT(RV*118)+1:GOSUB3030
3860 SR$=T$(T):GOSUB3330:GOSUB2710
3870 NEXTZU
3880 SV(TZ+1)=-99:GOTO2190
25000 REM
25010 REM *** MENUEDATEN ***
25020 REM
25030 DATA" ","M O Z A R T","-----------"
25040 DATA" KV 294d "," ","1 ... Tempo (6-99) :"
25050 DATA"2 ... Oktave (0-5) :","3 ... Takt (0-119) :"
25060 DATA"4 ... Random-Sound ","5 ... Mozart-Walzer "
25070 DATA"6 ... Programmende ","-ich lerne Noten-"
25080 DATA" Sie waehlen :","-ich komponiere-"
25090 DATA"-ich musiziere-"," "
25100 DATA"0 = vorspielen","So ein Zufall !",">TASTE<"
25110 REM
25120 REM *** Noten der Takte 1-119 ***
25130 REM
25140 DATA"ROT","Jghlt","TMQ","TO*","HMQ","qmqtyt","QOH"
25150 DATA"ljlmol","qmljhg","MMM","MHE","QtqM","VSO"
25160 DATA"mhmqhm","qmQT","Tx{O","mqtojs","QMH","rqoqrt"
25170 DATA"cgjosv","QQQ","rqroml","sojvso","lotoL","qmHQ"
25180 DATA"qmolH","JOS","jqotsv","txtoL","MHQ","THH"
25190 DATA"mlmqhm","mlmqH","lmoljh","Trqom","Jrojl","mlmhea"
25200 DATA"Txtol","TtoX","Qmqty","MqmH","mhqmtq","onorhl"
25210 DATA"QqrT","TXO","olHT","TQM","MqmT","qmlhjg","qmlmH"
25220 DATA"qtytqm","ojOS","SVS","Txtot","Svsos","tx{xT"
25230 DATA"rqomlo","yxytqm","SSS","txTO","OJS","olHT","MQH"
25240 DATA"OotX","totxto","rqOT","sv{vsv","OtxO","tstolh"
25250 DATA"SVO","qoqtyt","soJS","mqmhE","Jomlj","QTY"
25260 DATA"ororlo","ommllj","ROL","OOO","orvrol","ojosvs"
25270 DATA"qvtxsv","qmtqyt","[vsoj","TxtO","tstxO","tqolH"
25280 DATA"mhmqtq","LOT","vtstO","QolH","Otolo","jqomlh"
25290 DATA"SsoV","SS*","txtxO","JjoS","oqroml","TolH"
25300 DATA"orjolo","OSV","qyxtvs","roJL","QQ*","ojsovs"
25310 DATA"onosvs","txtolh","mhqmT","Loljh","qtomlj","OHH"
25320 DATA"OHL","oxtoL","MmoQ","qtotjs","lmoqro","rvJlo"
25330 DATA"qmloT","vtxtot"
25340 REM
25350 REM *** Zahlentafeln ***
25360 REM
25370 DATA18,55,18,85,98,21,33,7,55,18,86,18,9,76,5,81,5,31
25380 DATA89,88,50,46,101,5,38,5,93,80,47,53,47,96,109,12
25390 DATA11,91,105,47,45,47,77,100,32,67,14,119,78,6,63,26
25400 DATA79,32,2,32,110,43,58,20,58,99,69,51,37,87,61,58
25410 DATA69,58,28,1,71,95,71,56,22,104,114,24,106,71,54,71
25420 DATA82,19,35,13,35,107,116,18,44,118,70,35,92,35,17,66
25430 DATA83,84,42,65,79,40,41,113,97,42,64,42,115,57,30,52
25440 DATA30,60,34,15,108,62,59,30,90,30,49,103,3,72,3,4
25450 DATA112,25,48,111,94,3,39,3,102,117,10,27,10,16,8,75
25460 DATA73,68,23,10,29,10,74,36
30000 REM
30010 REM ***************************
30020 REM * *
30030 REM * Dieses Programm wurde *
30040 REM * fuer BASICODE - 3 auf *
30050 REM * einem KC85/4 entwickelt.*
30060 REM * Den Algorithmus entnah- *
30070 REM * men wir dem KV 294d von *
30080 REM * Wolfgang-Amadeus Mozart,*
30090 REM * der uns die Verstuemme- *
30100 REM * lung seines Werkes ver- *
30110 REM * zeihen moege. *
30120 REM * In die vorliegende Form *
30130 REM * brachten die Noten: *
30140 REM * *
32000 REM * Uwe und Andreas Zierott *
32020 REM * Lehnin 1804 *
32030 REM * DDR *
32040 REM * *
32050 REM * 24.07.89 *
32060 REM * *
32070 REM ***************************
32080 REM
32090 REM TROS-RADIO dd 900509