Fraktale Musik 2003 - Quellcode
Triggerprogramm
0 'Eingabe und Playprogramm fr 8 Triggerevents fr Ataris
1 'TRIGGER.BAS
2
3 CLS
4 PRINT @(1,2);"Programm zum Ausgeben von bis zu 8 Triggern"
5 ChL=8
6 INPUT @(5,2);"Tempo-Eingabe in MM ";MmL
7 ZeitspanneL=3000/MmL
8 DIM EventaL(8,16): DIM EventbL(8,16): DIM EventL(8,16): DIM EventdL(5,16)
9
10 FOR ZL=1 TO 8
11     FOR SL=1 TO 16
12     READ EventaL(ZL,SL)
13     NEXT
14 NEXT
15 FOR ZL=1 TO 8
16     FOR SL=1 TO 16
17     READ EventbL(ZL,SL)
18     NEXT
19 NEXT
20 FOR ZL=1 TO 5
21     FOR SL=1 TO 16
22     READ EventdL(ZL,SL)
23     NEXT
24 NEXT
25
26
27 INPUT @(7,2);"A:Standard - B:Bifurkation - D: Drum - RETURN:sonst ";E$
28 IF E$="A" OR E$="a" THEN Standard: GOTO Weiter
29 IF E$="B" OR E$="b" THEN Bifurkation: GOTO Weiter
30 IF E$="D" OR E$="d" THEN Drums: GOTO Weiter
31 INPUT @(8,2);"Wieviele Kan„le sollen verwendet werden? ";ChL
32 CLS
33 PRINT @(1,2);"Eingabe von Event ja/nein in 16 Schritten fr";ChL;" Kan„le"
34
35 FOR SpalteL=1 TO 16
36 PRINT @(4,3*SpalteL+3);SpalteL
37 NEXT
38 FOR ZeileL=1 TO ChL
39 PRINT @(4+2*ZeileL,3);ZeileL
40 NEXT
41
42 DIM EventL(64,64)
43 FOR ZeileL=1 TO ChL
44  FOR SpalteL=1 TO 16
45  INPUT @(4+2*ZeileL,3*SpalteL+4);WertL
46  IF WertL<>0 THEN
47  PRINT @(4+2*ZeileL,3*SpalteL+3);" + "
48  EventL(ZeileL,SpalteL)=1
49  ELSE
50  PRINT @(4+2*ZeileL,3*SpalteL+3);"  "
51  EventL(ZeileL,SpalteL)=0
52
53  ENDIF
54  NEXT
55 NEXT
56
57
58-Weiter
59
60 'Warteschleife
61 PRINT @(6+2*ChL,2),"START PLAY durch irgendeine Taste!"
62 REPEAT
63 UNTIL LEN( INKEY$ )
64 PRINT @(6+2*ChL,2),"STOP durch Mausklick!              "
65
66
67 'Play
68 PRINT @(0,2);"Erzeugen von Trigger-Events: 16 Steps auf";ChL;" Kan„len"
69 SpalteL=1
70 StartL= TIMER
71 REPEAT
72  IF TIMER -StartL>=ZeitspanneL
73  THEN
74   Play_All
75   IF SpalteL<16 THEN SpalteL=SpalteL+1 ELSE SpalteL=1
76  StartL= TIMER
77  ENDIF
78 UNTIL MOUSEBUT
79 END
80
81
82  DEF PROC Play_All
83  FOR ZeileL=1 TO 8
84   PRINT @(4+2*ChL,3*SpalteL);"   "
85   PRINT @(4+2*ChL,3*SpalteL+3);" + "
86   IF EventL(ZeileL,SpalteL)=1 THEN BIOS (,3,3,ZeileL)
87  NEXT
88  IF SpalteL=16 THEN PRINT @(4+2*ChL,3*SpalteL+3);"   "
89  RETURN
90
91
92 DEF PROC Standard
93 CLS
94 FOR SpalteL=1 TO 16
95  PRINT @(2,3*SpalteL+3);SpalteL
96 NEXT
97 FOR ZeileL=1 TO ChL
98  PRINT @(2+2*ZeileL,3);ZeileL
99 NEXT
100
101 FOR ZeileL=1 TO ChL
102  FOR SpalteL=1 TO 16
103   IF EventaL(ZeileL,SpalteL)=1
104   THEN
105      PRINT @(2+2*ZeileL,3*SpalteL+3);" + "
106      EventL(ZeileL,SpalteL)=EventaL(ZeileL,SpalteL)
107   ELSE
108     PRINT @(2+2*ZeileL,3*SpalteL+3);"  "
109     EventL(ZeileL,SpalteL)=EventaL(ZeileL,SpalteL)
110   ENDIF
111  NEXT
112 NEXT
113 RETURN
114
115
116 DEF PROC Bifurkation
117 CLS
118 FOR SpalteL=1 TO 16
119  PRINT @(2,3*SpalteL+3);SpalteL
120 NEXT
121 FOR ZeileL=1 TO ChL
122  PRINT @(2+2*ZeileL,3);ZeileL
123 NEXT
124
125 FOR ZeileL=1 TO ChL
126  FOR SpalteL=1 TO 16
127   IF EventbL(ZeileL,SpalteL)=1
128   THEN
129      PRINT @(2+2*ZeileL,3*SpalteL+3);" + "
130      EventL(ZeileL,SpalteL)=EventbL(ZeileL,SpalteL)
131   ELSE
132     PRINT @(2+2*ZeileL,3*SpalteL+3);"  "
133     EventL(ZeileL,SpalteL)=EventbL(ZeileL,SpalteL)
134   ENDIF
135  NEXT
136 NEXT
137
138 RETURN
139
140
141
142 DEF PROC Drums
143 CLS
144 FOR SpalteL=1 TO 16
145  PRINT @(2,3*SpalteL+3);SpalteL
146 NEXT
147 FOR ZeileL=1 TO 5
148  PRINT @(2+2*ZeileL,3);ZeileL
149 NEXT
150
151 FOR ZeileL=1 TO 5
152  FOR SpalteL=1 TO 16
153   IF EventdL(ZeileL,SpalteL)=1
154   THEN
155      PRINT @(2+2*ZeileL,3*SpalteL+3);" + "
156      EventL(ZeileL,SpalteL)=EventdL(ZeileL,SpalteL)
157   ELSE
158     PRINT @(2+2*ZeileL,3*SpalteL+3);"  "
159     EventL(ZeileL,SpalteL)=EventdL(ZeileL,SpalteL)
160   ENDIF
161  NEXT
162 NEXT
163
164 RETURN
165
166
167
168
169 DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
170 DATA 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1
171 DATA 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0
172 DATA 0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,0
173 DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
174 DATA 1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1
175 DATA 1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,1
176 DATA 0,0,1,0,1,0,1,0,0,1,0,0,0,1,0,1
178 DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
179 DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0
180 DATA 1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0
181 DATA 1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,1
182 DATA 1,1,1,1,1,1,1,1,0,1,1,0,1,0,1,0
183 DATA 1,1,1,1,1,1,0,0,1,0,1,0,1,0,0,1
184 DATA 1,0,0,1,1,0,1,0,1,0,0,0,1,0,1,1
185 DATA 1,0,1,0,0,0,1,0,0,1,0,0,0,1,0,1
187 DATA 1,0,0,0,1,1,0,0,1,0,0,0,1,1,0,1
188 DATA 0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,0
189 DATA 1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1
190 DATA 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1
191 DATA 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Orchestermusik
Gebeugte Obert�ne und RND(1)zu RND(114)
0 'Tastendruck mit Zeichnen: Bend und Tonh”he (SCANZUF.BAS)
1
2
3 'Bildschirmanzeigen
4 CLS
5 PRINT @(2,2);"Zweiteiliges Zufallsprogramm mit Tastensteuerung"
6 PRINT @(3,2);"Teil 1: Pitchbendsteuerung eines Liegeklanges"
7 PRINT @(4,2);"Teil 2: zuf„llige Halbtonstufen eines Xylophons"
8 PRINT @(5,2);"Von Teil 1 zu 2 durch Maustastendruck"
9 PRINT @(6,2);"ENDE mit Space-Taste!"
10 PRINT @(8,2);"Teil 1: Eingaben:"
11 INPUT @(9,2);"Tastennummer des Liegeklanges      = ";GrundtonL
12 INPUT @(10,2);"Grundtonverschiebung in Pitchbends = ";VerschiebL
13 PbL=63+VerschiebL
14 CLS
15
16 'Teil 1: Scan steuert Bend eines Liegeklanges
17 'Ausgangswerte
18  BIOS (,3,3,192): BIOS (,3,3,80)
19  ScanL=1:SpalteL=2: DIM Kreis_YL(640)
20  BIOS (,3,3,224): BIOS (,3,3,127): BIOS (,3,3,PbL)
21  BIOS (,3,3,144): BIOS (,3,3,GrundtonL): BIOS (,3,3,100)
22
23 'Spielschleife
24 PRINT @(1,2);"Endes von Teil 1 mit Mausklick."
25 PRINT @(2,2);"Tastenr.";GrundtonL;" Beugung um 1/32 Halbt”ne = ";ScanL
26 REPEAT
27 'Abfrage der Tastatur
28   A$= INKEY$
29   IF A$<>""
30      THEN AL= CVIL(A$)
31      ScanL=AL SHR 16
32   PRINT @(2,41);"    "
33   PRINT @(2,41);ScanL
34   ENDIF
35 'Algorithmus (hier Zufallsoperation)
36  'Vorz=2* RND(2)-1
37  BendL= RND(ScanL)
38  Zeichnen_Bend
39  BIOS (,3,3,224): BIOS (,3,3,127): BIOS (,3,3,BendL+PbL)
40  WAIT .1
41 UNTIL MOUSEBUT
42 BIOS (,3,3,224): BIOS (,3,3,127): BIOS (,3,3,BendL+PbL)
43 BIOS (,3,3,144): BIOS (,3,3,GrundtonL): BIOS (,3,3,0)
44 CLS
45
46
47 'Teil 2 Zufallshalbtonfolgen au Xylophom
48
49 'Ausgangswerte
50  BIOS (,3,3,224): BIOS (,3,3,127): BIOS (,3,3,63)
51  BIOS (,3,3,192): BIOS (,3,3,12)
52  ScanL=1:SpalteL=2
53
54 'Bildschirmanzeigen
55 PRINT @(1,2);"Zufallsambitus durch Tasten gesteuert. Ende mit SPACE"
56 PRINT @(2,2);"Zufallsumfang = ";ScanL
57
58 REPEAT
59 'Abfrage der Tastatur
60   A$= INKEY$
61   IF A$<>""
62   THEN AL= CVIL(A$)
63   ScanL=AL SHR 16
64   PRINT @(2,18);"    "
65   PRINT @(2,18);ScanL
66   ENDIF
67
68 'Algorithmus (hier Zufallsoperation)
69 VorzL=2* RND(2)-1
70  TasteL=60+VorzL* RND(ScanL/2)
71  IF TasteL<128 AND TasteL>0
72     THEN
73     Zeichnen
74     BIOS (,3,3,144): BIOS (,3,3,TasteL): BIOS (,3,3,127)
75     WAIT .04
76     BIOS (,3,3,144): BIOS (,3,3,TasteL): BIOS (,3,3,0)
77  ENDIF
78 UNTIL ScanL=57
79  'CLS
80  PRINT @(20,2);"(c) fraktale musik ws 02/03 stroh"
81 END
82
83
84
85 DEF PROC Zeichnen_Bend
86 FILL COLOR =0
87 PCIRCLE 4*SpalteL,Kreis_YL(4*SpalteL),2
88 FILL COLOR =1
89 CIRCLE 4*SpalteL,360-3*BendL,2
90 Kreis_YL(4*SpalteL)=360-3*BendL
91 IF SpalteL<158 THEN SpalteL=SpalteL+1
92 IF SpalteL=158 THEN SpalteL=2
93 RETURN
94
95 DEF PROC Zeichnen
96 FILL COLOR =0
97 PCIRCLE 4*SpalteL,Kreis_YL(4*SpalteL),2
98 FILL COLOR =1
99 CIRCLE 4*SpalteL,360-3*TasteL,2
100 Kreis_YL(4*SpalteL)=360-3*TasteL
101 IF SpalteL<158 THEN SpalteL=SpalteL+1
102 IF SpalteL=158 THEN SpalteL=2
103 RETURN
Kammermusik
Choral
0 'Zufallschoral mit Fermaten und Durchgangsnoten
1
2 StimmenL=4
3 FOR IL=1 TO StimmenL
4  BIOS (,3,3,191+IL): BIOS (,3,3,20)
5 NEXT
6 PRINT @(2,2);"Zufalschoral mit Fermaten und Durchgangsnoten"
7 PRINT @(3,2);"STIMMEN = ";StimmenL
8 KanalL=1
9 Clear_Buffer
10 REPEAT
11   BIOS (ML,1,3)
12   IF ML=-1 THEN BIOS (XL,2,3)
13 UNTIL XL=-251
14 REPEAT
15  BIOS (ML,1,3)
16   IF ML=-1
17    THEN
18    BIOS (XL,2,3)
19    IF XL=KanalL-256 THEN Algorithmus
20   ENDIF
21 UNTIL LEN( INKEY$ )
22
23 FOR IL=1 TO StimmenL
24   BIOS (,3,3,143+IL): BIOS (,3,3,Taste_AltL(IL)): BIOS (,3,3,0)
25 NEXT
26 CLS
27 PRINT @(3,3);" Ende!          "
28 PRINT @(4,3);"(c) fraktale musik ws 02/03 Andreas"
29
30 END
31
32 DEF PROC Algorithmus
33  ZaehlerL=ZaehlerL+1
34  IF ZaehlerL>16 THEN ZaehlerL=1
35
36  'Fermaten
37  FermateL=0
38  IF ZaehlerL=9 AND RND(4)=1 THEN
39   FermateL=1
40   FOR IL=1 TO StimmenL
41    BIOS (,3,3,143+IL): BIOS (,3,3,Taste_AltL(IL)): BIOS (,3,3,0)
42   NEXT
43  ENDIF
44
45  'Akkords„ulen
46  IF (ZaehlerL=1 OR ZaehlerL=9) AND FermateL=0 THEN
47   FOR IL=1 TO StimmenL
48    TasteL(IL)=34+8*IL+ RND(12)
49    VelL(IL)=60+ RND(50)
50   NEXT
51   FOR IL=1 TO StimmenL
52    BIOS (,3,3,143+IL): BIOS (,3,3,Taste_AltL(IL)): BIOS (,3,3,0)
53    BIOS (,3,3,143+IL): BIOS (,3,3,TasteL(IL)): BIOS (,3,3,VelL(IL))
54    Taste_AltL(IL)=TasteL(IL)
55   NEXT
56  ENDIF
57
58  'Durchgangsnoten
59  IF (ZaehlerL=5 OR ZaehlerL=13) AND RND(2)=1 THEN
60   IF StimmenL>1 THEN
61    IL= RND(StimmenL)+1
62    ELSE IL=1
63   ENDIF
64   TasteL(IL)=34+8*IL+ RND(12)
65   VelL(IL)=60+ RND(50)
66   BIOS (,3,3,143+IL): BIOS (,3,3,Taste_AltL(IL)): BIOS (,3,3,0)
67   BIOS (,3,3,143+IL): BIOS (,3,3,TasteL(IL)): BIOS (,3,3,VelL(IL))
68   Taste_AltL(IL)=TasteL(IL)
69  ENDIF
70 RETURN
71
72 DEF PROC Clear_Buffer
73 REPEAT
74 BIOS (ML,1,3)
75 IF ML=-1 THEN BIOS (XL,2,3)
76 UNTIL ML=0
77 RETURN
0 'Zufallsfeld dehnend, getriggert: Tastendruck (DRUMS.BAS)
1 PRINT @(5,2);"Percussion getriggert"
2 PRINT @(6,2);"mute,grundgroove, grundgroove+congasolo,congasolo,schlagzeugsolo"
3 INPUT @(8,2);"Midi-Empfangskanal = ";KanalL
4 BIOS (,3,3,192): BIOS (,3,3,36)
5 ScanL=75
6 DotL=1
7 Laut1L=60
8 StillL=0
9 Clear_Buffer
10 REPEAT
11 BIOS (ML,1,3)
12    IF ML=-1 THEN BIOS (XL,2,3)
13 UNTIL XL=-251
14
15 REPEAT
16  A$= INKEY$
17  IF A$<>"" THEN AL= CVIL(A$) SHR 16
18  IF AL=1 THEN StillL=-1
19  IF AL=2 THEN StillL=0
20  IF AL=3 THEN StillL=1
21  IF AL=4 THEN StillL=2
22  IF AL=5 THEN StillL=3
23  IF AL>=6 THEN StillL=4
24  'IF A=7 THEN CLS :Algorithmus2
25  'Midieingang Abfrage
26  BIOS (ML,1,3)
27   IF ML=-1
28    THEN
29    BIOS (XL,2,3)
30    IF (XL=KanalL-256) THEN Algorithmus1
31   ENDIF
32 UNTIL AL=57
33
34 BIOS (,3,3,143+KanalL): BIOS (,3,3,Taste_AltL): BIOS (,3,3,0)
35 CLS
36 PRINT @(3,3);" Ende!          "
37 PRINT @(4,3);"(c) fraktale musik ws 02/03 stefan grože"
38 END
39
40
41
42
43
44 DEF PROC Algorithmus1
45 'Errechnen und Play
46   IF StillL=1 OR StillL=2 THEN Solo1
47   IF StillL=0 OR StillL=1
48   THEN
49   IF DotL=1 THEN BIOS (,3,3,153): BIOS (,3,3,36): BIOS (,3,3,Laut1L)
50   IF DotL=3 THEN BIOS (,3,3,153): BIOS (,3,3,33): BIOS (,3,3,Laut1L)
51   IF DotL=7 THEN BIOS (,3,3,153): BIOS (,3,3,36): BIOS (,3,3,Laut1L)
52   IF DotL=9 THEN BIOS (,3,3,153): BIOS (,3,3,35): BIOS (,3,3,Laut1L)
53   IF DotL=13 THEN BIOS (,3,3,153): BIOS (,3,3,40): BIOS (,3,3,Laut1L)
54   ENDIF
55   IF StillL=3 THEN
56     IF DotL=1 THEN BIOS (,3,3,153): BIOS (,3,3,36): BIOS (,3,3,Laut1L)
57     IF DotL=5 THEN BIOS (,3,3,153): BIOS (,3,3,36): BIOS (,3,3,Laut1L)
58     IF DotL=9 THEN BIOS (,3,3,153): BIOS (,3,3,36): BIOS (,3,3,Laut1L)
59     IF DotL=13 THEN BIOS (,3,3,153): BIOS (,3,3,36): BIOS (,3,3,Laut1L)
60   ENDIF
61   DotL=DotL+1
62   IF DotL=17 THEN DotL=1
63   IF StillL=4 THEN BIOS (,3,3,153): BIOS (,3,3, RND(30)+20): BIOS (,3,3, RND(90)+30)
64
65
66 RETURN
67
68
69
70 DEF PROC Solo1
71   IF RND(3)=0 THEN LautL=127 ELSE LautL=50
72   KlangL= RND(2)+62
73   BIOS (,3,3,153): BIOS (,3,3,KlangL): BIOS (,3,3,LautL)
74 RETURN
75
76
77 DEF PROC Clear_Buffer
78 REPEAT
79   BIOS (ML,1,3)
80   IF ML=-1 THEN BIOS (XL,2,3)
81   UNTIL ML=0
82 RETURN
83
0 'Bassfigur auf Kanal 1 getriggert  (Element2.bas)
1
2 Clear_Buffer
3 BIOS (,3,3,192): BIOS (,3,3,34)
4
5 REPEAT
6 BIOS (ML,1,3)
7   IF ML=-1
8   THEN
9   BIOS (XL,2,3)
10  KanalL=XL+256
11  IF KanalL=1 THEN Algorithmus
12 ENDIF
13 UNTIL LEN( INKEY$ )
14 END
15
16 DEF PROC Algorithmus
17 XL= RND(12):TasteL=24+XL
18 BIOS (,3,3,144): BIOS (,3,3,Taste_AltL): BIOS (,3,3,0)
19 BIOS (,3,3,144): BIOS (,3,3,TasteL): BIOS (,3,3,90)
20 Taste_AltL=TasteL
21 RETURN
22
23
24 DEF PROC Clear_Buffer
25 REPEAT
26 BIOS (ML,1,3)
27 IF ML=-1 THEN BIOS (XL,2,3)
28 UNTIL ML=0
29 RETURN
30
Einsames Motiv  zwischen Dur und Moll

0 'Einsames Motiv (MOTIV2.BAS)
1 Motiv_LaengeL=6
2 DIM Motiv_TonhoeheL(Motiv_LaengeL)
3 DIM Motiv_TondauerL(Motiv_LaengeL)
4 'Motiv wird initialisiert
5 Motiv_InkrementL=1
6 FOR ZL=1 TO Motiv_LaengeL
7 Motiv_TonhoeheL(ZL)= RND(8)+48
8 Motiv_TondauerL(ZL)= RND(4)+3
9 NEXT ZL
10 PRINT @(4,2);"Zufallsmotiv mit der L„nge";Motiv_LaengeL
11 PRINT @(5,2);"das Motiv wird moduliert wiederholt"
12 PRINT @(7,2);"Ende mit SPACE! -Heiko Vetter"
13 INPUT @(8,2);"Midi-Empfangskanal = ";KanalL
14 BIOS (,3,3,192): BIOS (,3,3,20)
15 ScanL=75
16 Clear_Buffer
17 REPEAT
18 BIOS (ML,1,3)
19 IF ML=-1 THEN BIOS (XL,2,3)
20 UNTIL XL=-251
21 REPEAT
22 'Tastaturabfrage
23 A$= INKEY$
24 IF A$<>""
25 THEN
26 AL= CVIL(A$)
27 ScanL=AL SHR 16
28 'PRINT @(10,2);"Gradient: = ";Scan;" "
29 ENDIF
30 'Midieingang Abfrage
31 BIOS (ML,1,3)
32 IF ML=-1
33 THEN
34 BIOS (XL,2,3)
35 IF XL=KanalL-256 THEN Algorithmus
36 ENDIF
37 UNTIL ScanL=57
38 BIOS (,3,3,144): BIOS (,3,3,Motiv_TonhoeheL(Motiv_ZaehlerL)+Motiv_HoeheL): BIOS (,3,3,0)
39 CLS
40 PRINT @(3,3);" Ende! "
41 PRINT @(4,3);"(c) fraktale musik ws 02/03 heiko"
42 END
43 DEF PROC Algorithmus
44 'Errechnen und Play
45 'motiv spielen
46 IF Tondauer_ZaehlerL=1 THEN
47 BIOS (,3,3,144): BIOS (,3,3,Motiv_TonhoeheL(Motiv_ZaehlerL)+Motiv_HoeheL): BIOS (,3,3,127)
48 ENDIF
49 Tondauer_ZaehlerL=Tondauer_ZaehlerL+1
50 IF Tondauer_ZaehlerL>=Motiv_TondauerL(Motiv_ZaehlerL) THEN
51 BIOS (,3,3,144): BIOS (,3,3,Motiv_TonhoeheL(Motiv_ZaehlerL)+Motiv_HoeheL): BIOS (,3,3,0)
52 Tondauer_ZaehlerL=1
53 Motiv_ZaehlerL=Motiv_ZaehlerL+1
54 IF Motiv_ZaehlerL>Motiv_LaengeL THEN Init_Spielart
55 ENDIF
56 RETURN
57 DEF PROC Init_Spielart
58 Motiv_HoeheL= RND(12)
59 Motiv_ZaehlerL=1
60 RETURN
61 DEF PROC Clear_Buffer
62 REPEAT
63 BIOS (ML,1,3)
64 IF ML=-1 THEN BIOS (XL,2,3)
65 UNTIL ML=0
66 RETURN


0 'Dreiklang nach Zufall
1 PRINT @(4,2);"Neuer Grundton durch Kbd-Tasten 1 bis 0."
2 PRINT @(5,2);""
3 PRINT @(7,2);"Ende mit Esc!"
4 INPUT @(8,2);"Midi-Empfangskanal = ";KanalL
5 'Instrumente:
6 BIOS (,3,3,192): BIOS (,3,3,5)
7 BIOS (,3,3,193): BIOS (,3,3,35)
8 BIOS (,3,3,194): BIOS (,3,3,28)
9 ScanL=6
10 Clear_Buffer
11 TaktL=0
12 TasteL=36'Grundton am Anfang
13 GrundtonL=36
14 Grundton_AltL=36
15
16 'Start bei Trigger auf Kanal 5:
17 REPEAT
18 BIOS (ML,1,3)
19 IF ML=-1 THEN BIOS (XL,2,3)
20 UNTIL XL=-251
21
22
23 REPEAT
24 'Tastaturabfrage
25 A$= INKEY$
26 IF A$<>""
27 THEN
28 AL= CVIL(A$)
29 ScanL=AL SHR 16
30 PRINT @(10,2);"Gradient: = ";ScanL;" "
31 ENDIF
32
33 'Midieingang Abfrage
34 BIOS (ML,1,3)
35 IF ML=-1 THEN
36 BIOS (XL,2,3)
37 IF XL=KanalL-256 THEN
38 TaktL=TaktL+1
39
40 IF ScanL>1 AND ScanL<14 THEN
41
42 ' IF Takt=1 THEN
43 ' Taste=36+ RND(13)
44 ' Taste_Alt=Taste
45 ' ENDIF
46
47 'Neuer Takt:
48 IF TaktL=1 THEN
49 REPEAT
50 TonmodL=(-3+ RND(ScanL+1))
51 Grundton_AltL=GrundtonL
52 GrundtonL=GrundtonL+TonmodL
53 UNTIL GrundtonL>=0 AND GrundtonL<128
54 TasteL=GrundtonL
55 Taste_AltL=TasteL
56 DurmollL= RND(2)
57 ENDIF
58
59 IF DurmollL=0 THEN
60 PRINT @(12,2);"Tonart: = Dur (Scan:";ScanL;") "
61 Alg_Dur
62 ENDIF
63 IF DurmollL=1 THEN
64 PRINT @(12,2);"Tonart: = Moll (Scan:";ScanL;") "
65 Alg_Moll
66 ENDIF
67 Alg1
68
69 ENDIF
70 ENDIF
71 ENDIF
72 IF TaktL=16 THEN TaktL=0
73 UNTIL ScanL=1
74
75 CL=0
76 REPEAT
77 BIOS (,3,3,143+KanalL): BIOS (,3,3,CL): BIOS (,3,3,0)
78 BIOS (,3,3,144+KanalL): BIOS (,3,3,CL): BIOS (,3,3,0)
79 BIOS (,3,3,145+KanalL): BIOS (,3,3,CL): BIOS (,3,3,0)
80 CL=CL+1
81 UNTIL CL=128
82
83 CLS
84 PRINT @(3,3);" Ende! "
85 PRINT @(4,3);"(c) fraktale musik ws 02/03 Hauke Helmers"
86 END
87
88
89 DEF PROC Alg1
90 IF TaktL MOD 2=0 THEN
91 BIOS (,3,3,144+KanalL): BIOS (,3,3,Grundton_AltL): BIOS (,3,3,0)
92 BIOS (,3,3,144+KanalL): BIOS (,3,3,GrundtonL): BIOS (,3,3,90)
93 ENDIF
94 IF TaktL MOD 3=0 THEN
95 BIOS (,3,3,144+KanalL): BIOS (,3,3,Grundton_AltL): BIOS (,3,3,0)
96 BIOS (,3,3,144+KanalL): BIOS (,3,3,GrundtonL): BIOS (,3,3,70)
97 ENDIF
98
99 RETURN
100
101
102 DEF PROC Alg_Dur
103 N_AltL=0
104 NL=0
105 IF TaktL=1 THEN
106 N_AltL=7
107 NL=0
108 SL=70
109 ENDIF
110 IF TaktL=4 THEN
111 N_AltL=0
112 NL=4
113 SL=70
114 ENDIF
115 IF TaktL=7 THEN
116 N_AltL=4
117 NL=7
118 SL=70
119 ENDIF
120 IF TaktL=1 OR TaktL=4 OR TaktL=7 THEN
121 BIOS (,3,3,143+KanalL): BIOS (,3,3,Grundton_AltL+N_AltL): BIOS (,3,3,0)
122 BIOS (,3,3,143+KanalL): BIOS (,3,3,GrundtonL+N_AltL): BIOS (,3,3,0)
123 BIOS (,3,3,143+KanalL): BIOS (,3,3,GrundtonL+NL): BIOS (,3,3,127)
124 ENDIF
125
126
127 BIOS (,3,3,145+KanalL): BIOS (,3,3,Grundton_AltL+N_AltL): BIOS (,3,3,0)
128 BIOS (,3,3,145+KanalL): BIOS (,3,3,GrundtonL+N_AltL): BIOS (,3,3,0)
129 BIOS (,3,3,145+KanalL): BIOS (,3,3,GrundtonL+NL): BIOS (,3,3,SL)
130 SL=SL-5
131 RETURN
132
133 'DEF PROC Alg_Dur2
134 '
135 ' IF Takt=Warten OR Takt=Warten*2 OR Takt=Warten*3 THEN
136 '
137 ' BIOS (,3,3,143+Kanal): BIOS (,3,3,Taste_Alt+N_Alt): BIOS (,3,3,0)
138 ' BIOS (,3,3,143+Kanal): BIOS (,3,3,Taste+N): BIOS (,3,3,100)
139 ' ENDIF
140 'RETURN
141
142 DEF PROC Alg_Moll
143 N_AltL=0
144 NL=0
145 IF TaktL=1 THEN
146 N_AltL=7
147 NL=0
148 SL=70
149 ENDIF
150 IF TaktL=4 THEN
151 N_AltL=0
152 NL=3
153 SL=70
154 ENDIF
155 IF TaktL=7 THEN
156 N_AltL=3
157 NL=7
158 SL=70
159 ENDIF
160 IF TaktL=1 OR TaktL=4 OR TaktL=7 THEN
161 BIOS (,3,3,143+KanalL): BIOS (,3,3,Grundton_AltL+N_AltL): BIOS (,3,3,0)
162 BIOS (,3,3,143+KanalL): BIOS (,3,3,GrundtonL+N_AltL): BIOS (,3,3,0)
163 BIOS (,3,3,143+KanalL): BIOS (,3,3,GrundtonL+NL): BIOS (,3,3,127)
164 ENDIF
165
166
167 BIOS (,3,3,145+KanalL): BIOS (,3,3,Grundton_AltL+N_AltL): BIOS (,3,3,0)
168 BIOS (,3,3,145+KanalL): BIOS (,3,3,GrundtonL+N_AltL): BIOS (,3,3,0)
169 BIOS (,3,3,145+KanalL): BIOS (,3,3,GrundtonL+NL): BIOS (,3,3,SL)
170 SL=SL-5
171 RETURN
172
173
174 DEF PROC Clear_Buffer
175 REPEAT
176 BIOS (ML,1,3)
177 IF ML=-1 THEN BIOS (XL,2,3)
178 UNTIL ML=0
179 RETURN

0 'Ganzton-Bass auf Kanal 1 getriggert (Element5.bas)
1
2 Clear_Buffer
3 BIOS (,3,3,192): BIOS (,3,3,33)
4 LautstL=90
5 REPEAT
6 BIOS (ML,1,3)
7 IF ML=-1
8 THEN
9 BIOS (XL,2,3)
10 KanalL=XL+256
11 IF KanalL=1 THEN Algorithmus
12 ENDIF
13 UNTIL LEN( INKEY$ )
14 BIOS (,3,3,144): BIOS (,3,3,Taste_AltL): BIOS (,3,3,0)
15 END
16
17 DEF PROC Algorithmus
18 Dichte!=Dichte!+1/16
19 DL= INT(Dichte!)
20 IF DL=9 THEN Dichte!=1
21 ZufallL= RND(DL)
22 IF ZufallL<>0 THEN
23 IF TasteL<60 THEN TasteL=36+IntervallL
24 IF TasteL>=60 THEN TasteL=36:IntervallL=0
25 IF TasteL>38 THEN LautstL=80
26 AkzentL= RND(4)
27 IF AkzentL=0 THEN LautstL=120 ELSE LautstL=80
28 IF TasteL=36 THEN LautstL=120
29 BIOS (,3,3,144): BIOS (,3,3,Taste_AltL): BIOS (,3,3,0)
30 BIOS (,3,3,144): BIOS (,3,3,TasteL+ChromL): BIOS (,3,3,LautstL)
31 Taste_AltL=TasteL+ChromL
32 IntervallL=IntervallL+ RND(1)+1
33 ENDIF
34 RETURN
35
36
37 DEF PROC Clear_Buffer
38 REPEAT
39 BIOS (ML,1,3)
40 IF ML=-1 THEN BIOS (XL,2,3)
41 UNTIL ML=0
42 RETURN
43


Solomusik
Das etwas freundlichere Livespiel (Mischmasch-Spiel)
0 'Das Live Spiel (MI_MONIT.BAS)
1
2 CLS
3 PRINT CHR$(27)+"f"
4 DIM PL(64,40)
5 DIM P_NeuL(64,40)
6
7 BIOS (,3,3,192): BIOS (,3,3,18)
8
9-Anfang
10 Bildbelegung
11 Einfuegen
12
13 AnzahlL=1
14 'Start= TIMER
15 REPEAT
16   FOR YL=10 TO 25
17       FOR XL=20 TO 35
18        Umgebung
19        IF SummeL=1
20           THEN P_NeuL(XL,YL)=1:SumL=SumL+1
21           ELSE
22           IF SummeL=3 AND PL(XL,YL)=1 THEN P_NeuL(XL,YL)=1:SumL=SumL+1 ELSE P_NeuL(XL,YL)=0
23        ENDIF
24       NEXT
25   NEXT
26   IF AnzahlL=1 THEN Toene
27   Neu_Alt
28   AnzahlL=AnzahlL+1
29   Toene
30   SumL=0
31   AnzahlL=AnzahlL+1
32 UNTIL MOUSEBUT =2
33 CLS
34   FOR YL=10 TO 25
35     IF PL(XL-1,YL) THEN
36       BIOS (,3,3,144): BIOS (,3,3,157-YL*5): BIOS (,3,3,0)
37     ENDIF
38   NEXT YL
39   PRINT @(1,1);"   Li Maus = Wiederholen"
40   PRINT @(2,1);"Li+Re Maus = Ende "
41   REPEAT : UNTIL MOUSEBUT =3 OR MOUSEBUT =1
42   IF MOUSEBUT =1 THEN CLS : GOTO Anfang ELSE END
43 END
44
45 DEF PROC Setzen
46 FILL COLOR =1
47 IF XL<64 AND YL<40 THEN PBOX XL*12-176,YL*12-120,11,11
48 IF XL=64 AND YL<40 THEN PBOX 0,YL*12-120,11,11
49 IF XL<64 AND YL=40 THEN PBOX XL*12-176,0,11,11
50 IF XL=64 AND YL=40 THEN PBOX 0,0,11,11
51 RETURN
52
53 DEF PROC Toene
54 FOR XL=20 TO 36
55   FOR YL=10 TO 25
56     IF PL(XL,YL) THEN
57       BIOS (,3,3,144): BIOS (,3,3,157-YL*5): BIOS (,3,3,90)
58     ENDIF
59     IF PL(XL-1,YL) THEN
60       BIOS (,3,3,144): BIOS (,3,3,157-YL*5): BIOS (,3,3,0)
61     ENDIF
62   NEXT YL
63   WAIT .1
64 NEXT XL
65 RETURN
66
67 DEF PROC Leeren
68 FILL COLOR =0
69 IF XL<64 AND YL<40 THEN PBOX XL*12-176,YL*12-120,11,11
70 IF XL=64 AND YL<40 THEN PBOX 0,YL*12-120,11,11
71 IF XL<64 AND YL=40 THEN PBOX XL*12-176,0,11,11
72 IF XL=64 AND YL=40 THEN PBOX 0,0,11,11
73 RETURN
74
75 DEF PROC Umgebung
76 SummeL=PL(XL-1,YL)+PL(XL,YL-1)+PL(XL,YL+1)+PL(XL+1,YL)
77 A$= INKEY$
78 IF A$<>"" THEN AL= CVIL(A$):ScanL=AL SHR 16
79 IF ScanL=77 THEN PrgL=PrgL+1: TEXT 5,20, STR$(PrgL): BIOS (,3,3,193): BIOS (,3,3,PrgL):ScanL=0
80 IF ScanL=75 THEN PrgL=PrgL-1: TEXT 5,20, STR$(PrgL)+"  ": BIOS (,3,3,193): BIOS (,3,3,PrgL):ScanL=0
81 RETURN
82
83 DEF PROC Neu_Alt
84 FOR XL=20 TO 40
85  FOR YL=10 TO 25
86     IF P_NeuL(XL,YL)=1 AND PL(XL,YL)=0 THEN Setzen
87     IF P_NeuL(XL,YL)=0 AND PL(XL,YL)=1 THEN Leeren
88   PL(XL,YL)=P_NeuL(XL,YL)
89  NEXT
90 NEXT
91 RETURN
92
93 DEF PROC Bildbelegung
94 FOR XL=20 TO 35
95     FOR YL=10 TO 25
96     IF XL=YL+10 THEN PL(XL,YL)=1:Setzen ELSE PL(XL,YL)=0
97     NEXT
98 NEXT
99 RETURN
100
101 DEF PROC Einfuegen
102 MOUSEON
103 REPEAT
104  XL=( MOUSEX +176)/12
105  YL=( MOUSEY +120)/12
106  IF XL>19 AND XL<36 AND YL>9 AND YL<26
107  THEN
108  IF MOUSEBUT =1
109     THEN
110     MOUSEOFF
111     PL(XL,YL)=1
112     P_NeuL(XL,YL)=1
113     Setzen
114     MOUSEON
115  ENDIF
116  IF MOUSEBUT =2
117     THEN
118     MOUSEOFF
119     PL(XL,YL)=0
120     P_NeuL(XL,YL)=0
121     Leeren
122     MOUSEON
123  ENDIF
124  ENDIF
125 UNTIL LEN( INKEY$ )
126 MOUSEOFF
127 RETURN

das unfreundliche Original-Lifespiel

 

0 'Das klassische Life Spiel (Life.BAS)
1
2 CLS
3 PRINT CHR$(27)+"f"
4 DIM PL(64,40)
5 DIM P_NeuL(64,40)
6 BIOS (,3,3,192): BIOS (,3,3,27)
7-Anfang
8 Einfuegen
9
10 AnzahlL=1
11 REPEAT
12   FOR YL=10 TO 25
13       FOR XL=20 TO 35
14        SummeL=PL(XL-1,YL-1)+PL(XL,YL-1)+PL(XL+1,YL-1)+PL(XL-1,YL)+PL(XL+1,YL)+PL(XL-1,YL+1)+PL(XL,YL+1)+PL(XL+1,YL+1)
15        IF SummeL=3 THEN P_NeuL(XL,YL)=1
16        IF SummeL=2 AND PL(XL,YL)=1 THEN P_NeuL(XL,YL)=1
17        IF SummeL<2 THEN P_NeuL(XL,YL)=0
18        IF SummeL>3 THEN P_NeuL(XL,YL)=0
19        NEXT
20   NEXT
21   BIOS (,3,3,144): BIOS (,3,3,Ton_AltL): BIOS (,3,3,0)
22   Neu_Alt
23   TEXT 10,180, STR$(AnzahlL)
24   AnzahlL=AnzahlL+1
25 UNTIL MOUSEBUT =2
26 CLS
27 PRINT @(1,1);"Ende li+re Maus - zum Anfang mit li Maus"
28 REPEAT : UNTIL MOUSEBUT =1 OR MOUSEBUT =3
29 IF MOUSEBUT =1 THEN CLS :Nullsetzen: GOTO Anfang
30 IF MOUSEBUT =3 THEN BIOS (,3,3,144): BIOS (,3,3,Ton_AltL): BIOS (,3,3,0): END
31 END
32
33
34 DEF PROC Setzen
35 FILL COLOR =1
36 IF XL<64 AND YL<40 THEN PBOX XL*12-176,YL*12-120,11,11:Toene
37 IF XL=64 AND YL<40 THEN PBOX 0,YL*12-120,11,11:Toene
38 IF XL<64 AND YL=40 THEN PBOX XL*12-176,0,11,11:Toene
39 IF XL=64 AND YL=40 THEN PBOX 0,0,11,11:Toene
40 RETURN
41
42 DEF PROC Toene
43 BIOS (,3,3,144): BIOS (,3,3,Ton_AltL): BIOS (,3,3,0)
44 BIOS (,3,3,144): BIOS (,3,3,157-YL*4): BIOS (,3,3,90)
45 WAIT .1
46 Ton_AltL=157-YL*4
47 RETURN
48
49 DEF PROC Leeren
50 'BIOS (,3,3,144): BIOS (,3,3,Ton_Alt): BIOS (,3,3,0
51 FILL COLOR =0
52 IF XL<64 AND YL<40 THEN PBOX XL*12-176,YL*12-120,11,11
53 IF XL=64 AND YL<40 THEN PBOX 0,YL*12-120,11,11
54 IF XL<64 AND YL=40 THEN PBOX XL*12-176,0,11,11
55 IF XL=64 AND YL=40 THEN PBOX 0,0,11,11
56 RETURN
57
58
59 DEF PROC Neu_Alt
60 FOR XL=20 TO 40
61  FOR YL=10 TO 25
62     IF P_NeuL(XL,YL)=1 THEN Setzen
63     IF P_NeuL(XL,YL)=0 AND PL(XL,YL)=1 THEN Leeren
64     PL(XL,YL)=P_NeuL(XL,YL)
65  NEXT
66 NEXT
67 RETURN
68
69
70 DEF PROC Nullsetzen
71 FOR XL=20 TO 35
72     FOR YL=10 TO 25
73     PL(XL,YL)=0
74     NEXT
75 NEXT
76 RETURN
77
78
79 DEF PROC Einfuegen
80 MOUSEON
81 REPEAT
82  XL=( MOUSEX +176)/12
83  YL=( MOUSEY +120)/12
84  IF XL>19 AND XL<36 AND YL>9 AND YL<26
85  THEN
86  IF MOUSEBUT =1
87     THEN
88     MOUSEOFF
89     PL(XL,YL)=1
90     P_NeuL(XL,YL)=1
91     Setzen
92     MOUSEON
93  ENDIF
94  IF MOUSEBUT =2
95     THEN
96     MOUSEOFF
97     PL(XL,YL)=0
98     P_NeuL(XL,YL)=0
99     Leeren
100     MOUSEON
101  ENDIF
102  ENDIF
103 UNTIL LEN( INKEY$ )
104 MOUSEOFF
105 RETURN
Entwickelnde Variation(en)

0 'Varifrac
1 BIOS (,3,3,192): BIOS (,3,3,48)
2 MotivlaengeL=5
3 NummerL=1
4 RL=3.7
5 DIM TonL(MotivlaengeL)
6 DIM LengL(MotivlaengeL)
7 DIM VelL(MotivlaengeL)
8 FOR IL=1 TO MotivlaengeL
9 READ TonL(IL)
10 DATA 60,62,64,65,67
11 NEXT
12 FOR IL=1 TO MotivlaengeL
13 READ LengL(IL)
14 DATA 4,4,4,2,2
15 NEXT
16 FOR IL=1 TO MotivlaengeL
17 READ VelL(IL)
18 DATA 120,110,100,90,80
19 NEXT
20
21 'clear buffer
22 REPEAT
23 BIOS (ML,1,3)
24 IF ML=-1 THEN BIOS (XL,2,3)
25 UNTIL ML=0
26
27 'warten auf die 1
28 REPEAT
29 BIOS (ML,1,3)
30 IF ML=-1 THEN BIOS (XL,2,3)
31 UNTIL XL=-251
32
33 'los geht's
34 REPEAT
35 BIOS (ML,1,3)
36 IF ML=-1
37 THEN
38 BIOS (XL,2,3)
39 IF XL=-255 THEN Play
40 ENDIF
41 UNTIL LEN( INKEY$ )
42 BIOS (,3,3,144): BIOS (,3,3,Taste_AltL): BIOS (,3,3,0)
43 CLS
44 PRINT @(3,3);" Ende! "
45 PRINT @(4,3);"(c) fraktale musik ws 02/03 Andreas & Hauke"
46 END
47
48
49 DEF PROC Variation
50 WahlL= RND(3)
51 IF WahlL=0 THEN Var_Ton
52 IF WahlL=1 THEN Var_Len
53 IF WahlL=2 THEN Var_Vel
54 RETURN
55
56 DEF PROC Var_Ton
57 X_TonL= RND(MotivlaengeL-1)+1
58 Rel_Ton!=TonL(X_TonL)/128
59 Tempton!=Rel_Ton!*(1-Rel_Ton!)*RL
60 TonL(X_TonL)= INT(Tempton!*128)
61 IF TonL(X_TonL)<20 OR TonL(X_TonL)>107 THEN TonL(X_TonL)=64
62 PRINT "Ton nr.:";X_TonL;" Tonh”he:";TonL(X_TonL)
63 RETURN
64
65 DEF PROC Var_Len
66 X_LengL= RND(MotivlaengeL-1)+1
67 VariL=2* RND(2)-1
68 LengL(X_LengL)=LengL(X_LengL)+VariL
69 IF LengL(X_LengL)=0 THEN LengL(X_LengL)=1
70 IF VariL>0 THEN PRINT "Ton nr.:";X_LengL;" ist einen Puls l„nger"
71 IF VariL<0 THEN PRINT "Ton nr.:";X_LengL;" ist einen Puls krzer"
72
73 RETURN
74
75 DEF PROC Var_Vel
76 X_VelL= RND(MotivlaengeL-1)+1
77 Rel_Vel!=VelL(X_VelL)/128
78 Tempvel!=Rel_Vel!*(1-Rel_Vel!)*RL
79 VelL(X_VelL)= INT(Tempvel!*128)
80 IF VelL(X_VelL)<20 OR VelL(X_VelL)>107 THEN VelL(X_VelL)=64
81 PRINT "Ton nr.:";X_VelL;" Lautst„rke:";VelL(X_VelL)
82 RETURN
83
84 DEF PROC Play
85 PulsL=PulsL+1
86
87 IF PulsL=1 THEN
88 BIOS (,3,3,144): BIOS (,3,3,Taste_AltL): BIOS (,3,3,0)
89 BIOS (,3,3,144): BIOS (,3,3,TonL(NummerL)): BIOS (,3,3,VelL(NummerL))
90 Taste_AltL=TonL(NummerL)
91 Puls_AltL=1
92 ENDIF
93
94 IF LengL(NummerL)=PulsL-Puls_AltL THEN
95 Puls_AltL=PulsL
96 NummerL=NummerL+1
97 IF NummerL>MotivlaengeL THEN NummerL=1:PulsL=1:Var_Ton
98 BIOS (,3,3,144): BIOS (,3,3,Taste_AltL): BIOS (,3,3,0)
99 BIOS (,3,3,144): BIOS (,3,3,TonL(NummerL)): BIOS (,3,3,VelL(NummerL))
100 Taste_AltL=TonL(NummerL)
101 Puls_AltL=PulsL
102 ENDIF
103 RETURN

Fractal Workstation ‘94

0 'Hpfer Demoprogramm (HšPFER.BAS)
1
2
3 CLIP
4 DEFSNG "A-Z"
5 CLS
6 PRINT " Eine Zifferntaste drcken!"
7 REPEAT
8 W$= INKEY$
9 IF W$<>"" THEN W!= CVIL(W$):Scan!=W! SHR 16
10 Eingabe
11 UNTIL Scan!>0 AND Scan!<11
12
13 'Anfangswerte:
14 Ao!=A!:Bo!=B!:Co!=C!:Schritto!=Schritt!
15 Scan!=0
16 PRINT CHR$(27)+"f"
17 CLS
18 CLIP
19 TEXT HEIGHT =4
20 TEXT 150,5,"Parameter: ("+ STR$(A!)+"/"+ STR$(B!)+")"
21 CLIP 10,10 TO 310,190
22 BOX 10,10 TO 310,190
23 Xo!=120
24 Yo!=90
25 N!=1:F!=0:Cl!=1
26 Ch!=1
27 Fac!=1/(4* PI )
28
29 'Playvorgang:
30-Anfang
31 CLIP
32 TEXT 5,5," "
33 CLIP 10,10 TO 310,190
34 REPEAT
35 DRAW Xo!+X!/200,Yo!+Y!/200
36 X!=Y_Alt!- SGN(X_Alt!)*((B!*X_Alt!-C!)) MOD 64000
37 Y!=A!-X_Alt! MOD 40000
38 Za!=Za!+1
39 CLIP
40 TEXT 75,5, STR$(Za!)
41 CLIP 10,10 TO 310,190
42 IF Z!=1
43 THEN
44 L!=((X!-Xo!)^2+(Y!-Yo!)^2)^(1/2)
45 T!= INT(L!/300)
46 Tonh!=36+T!
47 IF Tonh_Alt!<>Tonh! AND Tonh!<108
48 THEN
49 IF Prg!=1 THEN Play1
50 IF Prg!=9 OR Prg!=10 THEN Play3
51 IF Prg!=3 OR Prg!=6 OR Prg!=11 THEN Play2
52 Tonh_Alt!=Tonh!
53 ENDIF
54 ENDIF
55 X_Alt!=X!+R!
56 Y_Alt!=Y!
57 R!=0
58 W$= INKEY$
59 IF W$<>"" THEN W!= CVIL(W$):Scan!=W! SHR 16
60 IF Scan!>0 THEN Change
61 N!=N!+1
62 Z!=N! MOD Schritt!+1
63 UNTIL MOUSEBUT =2
64 CLIP
65 TEXT 150,5,"Parameter: ("+ STR$(A!)+"/"+ STR$(B!)+")"
66 CLIP 10,10 TO 310,190
67 REPEAT : UNTIL MOUSEBUT =1
68 GOTO Anfang
69 END
70
71 'Prozeduren:
72
73 DEF PROC Change
74 IF Scan!=30 THEN A!=A!+100
75 IF Scan!=48 THEN B!=B!+.1
76 IF Scan!=57 THEN BIOS (,3,3,144): BIOS (,3,3,Tonha!): BIOS (,3,3,0):Ende
77 IF Scan!=25 THEN Percussion
78 IF Scan!=83 THEN Mute
79 IF Scan!=75 OR Scan!=77
80 THEN CLIP
81 TEXT 125,5, STR$(F!): CLIP 10,10 TO 310,190
82 ENDIF
83 IF Scan!=71
84 THEN CLIP 10,10 TO 310,190: CLS
85 BOX 10,10 TO 310,190
86 ENDIF
87 IF Scan!=97
88 THEN A!=Ao!:B!=Bo!:C!=Co!:Schritt!=Schritto!:X_Alt!=0:Y_Alt!=0
89 CLS
90 CLIP
91 TEXT 150,5,"Parameter: ("+ STR$(A!)+"/"+ STR$(B!)+")"
92 TEXT 5,5," "
93 TEXT 5,5,"T = "+ STR$(Tonh!)
94 CLIP 10,10 TO 310,190
95 BOX 10,10 TO 310,190
96 ENDIF
97 Eingabe
98 Scan!=0
99 Anzeige
100 RETURN
101
102 DEF PROC Anzeige
103 CLIP
104 TEXT 150,5,"Parameter: ("+ STR$(A!)+"/"+ STR$(B!)+")"
105 CLIP 10,10 TO 310,190
106 RETURN
107
108 DEF PROC Play1
109 CLIP
110 TEXT 5,5,"T ="+ STR$(Tonh!)
111 CLIP 10,10 TO 310,190
112 BIOS (,3,3,144): BIOS (,3,3,Tonha!): BIOS (,3,3,0)
113 BIOS (,3,3,145): BIOS (,3,3,Tonha!): BIOS (,3,3,0)
114 Bend!= RND(16)
115 IF Mt_On!=0
116 THEN BIOS (,3,3,224): BIOS (,3,3,0): BIOS (,3,3,63+Bend!)
117 BIOS (,3,3,144): BIOS (,3,3,Tonh!): BIOS (,3,3,90)
118 BIOS (,3,3,145): BIOS (,3,3,Tonh!): BIOS (,3,3,80)
119 ENDIF
120 IF Perc_On!=1
121 THEN
122 BIOS (,3,3,153): BIOS (,3,3,27+Tonh!/4): BIOS (,3,3,90)
123 ENDIF
124 Tonha!=Tonh!
125 RETURN
126
127
128 DEF PROC Play2
129 CLIP
130 TEXT 5,5,"T ="+ STR$(Tonh!)
131 CLIP 10,10 TO 310,190
132 BIOS (,3,3,144): BIOS (,3,3,Tonhalt!): BIOS (,3,3,0)
133 BIOS (,3,3,144): BIOS (,3,3,Tonhalt!+1): BIOS (,3,3,0)
134 IF Mt_On!=0
135 THEN BIOS (,3,3,144): BIOS (,3,3,Tonh!): BIOS (,3,3,90)
136 BIOS (,3,3,144): BIOS (,3,3,Tonh!+1): BIOS (,3,3,90)
137 ENDIF
138 IF Perc_On!=1
139 THEN
140 BIOS (,3,3,153): BIOS (,3,3,27+Tonh!/4): BIOS (,3,3,90)
141 ENDIF
142 Tonhalt!=Tonh!
143 RETURN
144
145 DEF PROC Play3
146 CLIP
147 TEXT 5,5,"T ="+ STR$(Tonh!)
148 CLIP 10,10 TO 310,190
149 BIOS (,3,3,144): BIOS (,3,3,Tonhb!): BIOS (,3,3,0)
150 BIOS (,3,3,144): BIOS (,3,3,Tonh_Diffa!): BIOS (,3,3,0)
151 Tonh_Diff!=3* RND(4)
152 IF Mt_On!=0
153 THEN BIOS (,3,3,144): BIOS (,3,3,Tonh!): BIOS (,3,3,90)
154 BIOS (,3,3,144): BIOS (,3,3,Tonh!+Tonh_Diff!): BIOS (,3,3,80)
155 ENDIF
156 IF Perc_On!=1
157 THEN
158 BIOS (,3,3,153): BIOS (,3,3,27+Tonh!/4): BIOS (,3,3,90)
159 ENDIF
160 Tonhb!=Tonh!
161 Tonh_Diffa!=Tonh!+Tonh_Diff!
162 RETURN
163
164
165
166 DEF PROC Percussion
167 IF Perc_On!=0
168 THEN Perc_On!=1
169 CLIP
170 TEXT 305,196,"P"
171 CLIP 10,10 TO 310,190
172 ELSE
173 Perc_On!=0
174 CLIP
175 TEXT 305,196," "
176 CLIP 10,10 TO 310,190
177 ENDIF
178 RETURN
179
180 DEF PROC Mute
181 IF Mt_On!=0
182 THEN Mt_On!=1
183 CLIP
184 TEXT 295,196,"M"
185 CLIP 10,10 TO 310,190
186 ELSE
187 Mt_On!=0
188 CLIP
189 TEXT 295,196," "
190 CLIP 10,10 TO 310,190
191 ENDIF
192 RETURN
193
194 DEF PROC Eingabe
195 IF Scan!=1
196 THEN A!=5000:B!=1000:C!=5025:Schritt!=20:Prg!=1
197 Aenderung
198 BIOS (,3,3,192): BIOS (,3,3,86)
199 BIOS (,3,3,193): BIOS (,3,3,86)
200 ENDIF
201 IF Scan!=3
202 THEN A!=1000:B!=23:C!=333:Schritt!=20:Prg!=3
203 Aenderung
204 BIOS (,3,3,192): BIOS (,3,3,94)
205 BIOS (,3,3,193): BIOS (,3,3,94)
206 ENDIF
207 IF Scan!=6
208 THEN A!=123:B!=456:C!=7890:Schritt!=10:Prg!=6
209 Aenderung
210 BIOS (,3,3,192): BIOS (,3,3,87)
211 BIOS (,3,3,193): BIOS (,3,3,87)
212 ENDIF
213 IF Scan!=9
214 THEN A!=6000:B!=800:C!=6000:Schritt!=20:Prg!=9
215 Aenderung
216 BIOS (,3,3,192): BIOS (,3,3,95)
217 BIOS (,3,3,193): BIOS (,3,3,95)
218 ENDIF
219 IF Scan!=10
220 THEN A!=6000:B!=-200:C!=6000:Schritt!=20:Prg!=10
221 BIOS (,3,3,192): BIOS (,3,3,95)
222 BIOS (,3,3,193): BIOS (,3,3,95)
223 Aenderung
224 ENDIF
225 IF Scan!=11
226 THEN A!=7010:B!=-3000:C!=4000:Schritt!=10:Prg!=11
227 Aenderung
228 BIOS (,3,3,192): BIOS (,3,3,5)
229 BIOS (,3,3,193): BIOS (,3,3,5)
230 ENDIF
231 'Prg=Scan
232 RETURN
233
234 DEF PROC Aenderung
235 'Za=0
236 All_Off
237 B!=B!/10000
238 X_Alt!=0:Y_Alt!=0
239 CLS
240 CLIP
241 TEXT 150,5,"Parameter: ("+ STR$(A!)+"/"+ STR$(B!)+")"
242 CLIP 10,10 TO 310,190
243 BOX 10,10 TO 310,190
244 RETURN
245
246 DEF PROC Ende
247 All_Off
248 CLS
249 PRINT @(4,2);"Beenden: rechter Mausklick"
250 PRINT " Zum Anfang: linker Mausklick"
251 PRINT ""
252 PRINT " FractalMusic 2003 (c) stroh"
253 REPEAT : UNTIL MOUSEBUT
254 IF MOUSEBUT =1 THEN GOTO -Vonvorn!
255 All_Off
256 END
257 RETURN
258
259 DEF PROC All_Off
260 BIOS (,3,3,177): BIOS (,3,3,123): BIOS (,3,3,0)
261 BIOS (,3,3,176): BIOS (,3,3,123): BIOS (,3,3,0)
262 RETURN

Orchestermusik
Vorspiel: algorithmischer Blues

0 'Blues mit rekursiver Formel (ALG_BLUE.BAS)
1
2
3 MODE =1
4 ZeigenL=1
5 A!=2.5:B!=7
6 CLS
7 ZL=1:AzL=0
8 PRINT @(2,2);"Algo-Blues"
9 PRINT @(3,2);"nach X(n+1)=X(n)^2-A modulo 60"
10 PRINT @(4,2);"A = ";A!
11 PRINT @(6,5);"Periodennr.";ZL
12
13 REPEAT : UNTIL LEN( INKEY$ )
14 StartL= TIMER
15
16-Anfang
17 PRINT @(2,2);"Algo-Blues"
18 PRINT @(3,2);"nach X(n+1)=X(n)^2-A modulo 60"
19 PRINT @(4,2);"A = ";A!
20 PRINT @(6,5);"Periodennr.";ZL
21
22 Aus
23 DIM XL(66)
24 XL(0)=24:CL=0:NL=0
25 MOUSEON
26
27 REPEAT
28 IF TIMER -StartL>=AzL*25
29 THEN
30 XL(NL+1)=(XL(NL)*A!+B!) MOD 60
31 TonhL=XL(NL)+36
32 VelL=100
33 Abfragen
34 Percus
35 BIOS (,3,3,146): BIOS (,3,3,Tonh_AltL): BIOS (,3,3,0)
36 BIOS (,3,3,146): BIOS (,3,3,TonhL): BIOS (,3,3,VelL)
37 PCIRCLE 30+NL*3,225-TonhL,3
38 Tonh_AltL=TonhL
39 'Suche
40 FOR KL=0 TO NL-1
41 IF XL(KL)=XL(NL)
42 THEN
43 PRINT @(6,16);" * ";NL-KL;"er Repetition "
44 'Loop
45 BIOS (,3,3,146): BIOS (,3,3,Tonh_AltL): BIOS (,3,3,0)
46 NL=NL+1
47 AzL=AzL+1
48 REPEAT
49 IF TIMER -StartL>=AzL*25
50 THEN
51 XL(NL+1)=(XL(NL)*A!+B!) MOD 60
52 TonhL=XL(NL)+36
53 RL= RND(4)
54 IF RL>0 THEN VelL=90 ELSE VelL=120
55 Abfragen
56 Percus
57 BIOS (,3,3,145): BIOS (,3,3,Tonh_AltL): BIOS (,3,3,0)
58 BIOS (,3,3,145): BIOS (,3,3,TonhL): BIOS (,3,3,VelL)
59 BIOS (,3,3,153): BIOS (,3,3,TonhL): BIOS (,3,3,80)
60 IF ZeigenL=1 THEN CIRCLE 30+NL*3.5,225-TonhL,2
61 Tonh_AltL=TonhL
62 NL=NL+1
63 AzL=AzL+1
64 IF MOUSEBUT =2
65 THEN
66 StopzeitL= TIMER -StartL
67 Aus
68 REPEAT
69 IF LEN( INKEY$ ) THEN Ende
70 UNTIL MOUSEBUT =1
71 StartL= TIMER -StopzeitL
72 ENDIF
73 ENDIF
74 UNTIL NL=64
75 BIOS (,3,3,145): BIOS (,3,3,Tonh_AltL): BIOS (,3,3,0)
76 A!=A!+.01
77 ZL=ZL+1
78 CLS
79 GOTO Anfang
80 ENDIF
81 NEXT KL
82
83 NL=NL+1
84 AzL=AzL+1
85 IF MOUSEBUT =2
86 THEN
87 StopzeitL= TIMER -StartL
88 Aus
89 REPEAT
90 IF LEN( INKEY$ ) THEN Ende
91 UNTIL MOUSEBUT =1
92 StartL= TIMER -StopzeitL
93 ENDIF
94 ENDIF
95 UNTIL NL=64
96
97 A!=A!+.01
98 ZL=ZL+1
99 GOTO Anfang
100 END
101
102
103 DEF PROC Ende
104 BIOS (,3,3,177): BIOS (,3,3,127): BIOS (,3,3,0)
105 BIOS (,3,3,178): BIOS (,3,3,127): BIOS (,3,3,0)
106 CLS
107 PRINT @(2,2);"FractalMusic 2003 (c) stroh"
108 END
109 RETURN
110
111 DEF PROC Aus
112 BIOS (,3,3,146): BIOS (,3,3,Tonh_AltL): BIOS (,3,3,0)
113 BIOS (,3,3,145): BIOS (,3,3,Tonh_AltL): BIOS (,3,3,0)
114 RETURN
115
116 DEF PROC Abfragen
117 IF MOUSEX >500 AND MOUSEX <550 AND MOUSEY >200 AND MOUSEY <230 AND MOUSEBUT =1
118 THEN
119 TEXT HEIGHT =6
120 ENDIF
121 RETURN
122
123 DEF PROC Percus
124 TL=0:'PRINT @(13,4);"D"
125 IF AzL MOD 192>=65 AND AzL MOD 192<97 THEN TL=7: PRINT @(6,2);"G"
126 IF AzL MOD 192>=161 THEN TL=7: PRINT @(6,2);"G"
127 IF AzL MOD 192>=129 AND AzL MOD 192<161 THEN TL=5: PRINT @(6,2);"A"
128 IF NL MOD 2=1 THEN BIOS (,3,3,153): BIOS (,3,3,42): BIOS (,3,3,90)
129 IF NL MOD 16=1 THEN BIOS (,3,3,153): BIOS (,3,3,36): BIOS (,3,3,110)
130 IF NL MOD 16=5 THEN BIOS (,3,3,153): BIOS (,3,3,36): BIOS (,3,3,110)
131 IF NL MOD 16=11 THEN BIOS (,3,3,153): BIOS (,3,3,36): BIOS (,3,3,110)
132 IF NL MOD 8=5 THEN BIOS (,3,3,153): BIOS (,3,3,38): BIOS (,3,3,90)
133 IF NL MOD 16=15 THEN BIOS (,3,3,153): BIOS (,3,3,46): BIOS (,3,3,90)
134 BIOS (,3,3,147): BIOS (,3,3,50-TL): BIOS (,3,3,0)
135 BIOS (,3,3,147): BIOS (,3,3,45-TL): BIOS (,3,3,0)
136 IF NL MOD 32=1 THEN BIOS (,3,3,147): BIOS (,3,3,50-TL): BIOS (,3,3,110)
137 IF NL MOD 32=7 THEN BIOS (,3,3,147): BIOS (,3,3,50-TL): BIOS (,3,3,110)
138 IF NL MOD 32=13 THEN BIOS (,3,3,147): BIOS (,3,3,50-TL): BIOS (,3,3,110)
139 IF NL MOD 32=15 THEN BIOS (,3,3,147): BIOS (,3,3,45-TL): BIOS (,3,3,110)
140 IF NL MOD 32=21 THEN BIOS (,3,3,147): BIOS (,3,3,50-TL): BIOS (,3,3,110)
141 IF NL MOD 32=27 THEN BIOS (,3,3,147): BIOS (,3,3,50-TL): BIOS (,3,3,110)
142 IF NL MOD 32=31 THEN BIOS (,3,3,147): BIOS (,3,3,45-TL): BIOS (,3,3,90)
143 RETURN


Die Hasen auf Wangeroog

0 'Zufallsfeld dehnend, getriggert: Tastendruck (trigbifo.BAS)
1 PRINT @(2,2);"Bifurkation getriggert Formel: X=X^2-C"
2 PRINT @(3,2);"Anfangswerte:  X=0, C=1.0"
3 PRINT @(4,2);"Ende mit Leertaste"
4 INPUT @(6,2);"Midi-Empfangskanal = ";KanalL
5 INPUT @(7,2);"PROGRAMNUMMER = ";PrgL
6 CLS
7 PRINT @(2,2);"Biffurkation - emmpf„ngt au Kanal Nr. ";KanalL;
8 BIOS (,3,3,192): BIOS (,3,3,PrgL-1)
9 Scan!=0
10 Konstante!=1.
11 TonL=60
12 VorzL=1
13 DotL=1
14 Laut1L=60
15 StillL=0
16 SpalteL=2
17 BreiteL=1
18 DIM Kreis_YL(640)
19 Clear_Buffer
20 REPEAT
21   BIOS (ML,1,3)
22   IF ML=-1 THEN BIOS (XL,2,3)
23 UNTIL XL=-251
24 REPEAT
25   A$= INKEY$
26   IF A$<>"" THEN AL= CVIL(A$) SHR 16
27   'Midieingang Abfrage
28   BIOS (ML,1,3)
29   IF ML=-1
30    THEN
31    BIOS (XL,2,3)
32    IF (XL=KanalL-256) THEN Algorithmus1
33   ENDIF
34   TonaltL=TonL
35 UNTIL AL=57
36 Ende
37 END
38
39
40
41 DEF PROC Ende
42
43   BIOS (,3,3,143+KanalL): BIOS (,3,3,TonaltL): BIOS (,3,3,0)
44   CLS
45   PRINT @(3,3);" Ende!          "
46   PRINT @(4,3);"(c) fraktale musik ws 02/03 stefan grože"
47   END
48
49
50
51
52 DEF PROC Algorithmus1
53  'Errechnen und Play
54  IF Konstante!>=1.99 THEN VorzL=0
55  IF Konstante!<1. THEN Ende
56  IF IL=4 THEN
57    IF VorzL=1 THEN Konstante!=Konstante!+5E-3
58    IF VorzL=0 THEN Konstante!=Konstante!-(5E-3)
59    PRINT @(9,2);"C=";Konstante!;" "
60 ENDIF
61 IL=(IL+1) MOD 5
62   Scan!=Scan!*Scan!-Konstante!
63   TonL= INT(((Scan!*40/Konstante!)+120)/2)
64   'PRINT @(Dot,3);Scan!
65   'PRINT @(Dot,44);Ton
66   'Durchlauf=Durchlauf+1
67   Zeichne
68   BIOS (,3,3,143+KanalL): BIOS (,3,3,TonaltL): BIOS (,3,3,0)
69   BIOS (,3,3,143+KanalL): BIOS (,3,3,TonL): BIOS (,3,3,120)
70   IF DotL=17 THEN DotL=1
71   DotL=DotL+1
72 RETURN
73
74 DEF PROC Clear_Buffer
75 REPEAT
76   BIOS (ML,1,3)
77   IF ML=-1 THEN BIOS (XL,2,3)
78 UNTIL ML=0
79 RETURN
80
81
82
83 DEF PROC Zeichne
84 FILL COLOR =0
85 PCIRCLE BreiteL*SpalteL,Kreis_YL(BreiteL*SpalteL),1
86 FILL COLOR =1
87 CIRCLE BreiteL*SpalteL,430-3*TonL,1
88 Kreis_YL(BreiteL*SpalteL)=430-3*TonL
89 IF SpalteL<640 THEN SpalteL=SpalteL+1
90 IF SpalteL=640 THEN SpalteL=2
91 RETURN

zur�ck zur Titelseite