-
Notifications
You must be signed in to change notification settings - Fork 0
/
CodeFromArticle.txt
153 lines (114 loc) · 3.75 KB
/
CodeFromArticle.txt
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
CODE FROM ARTICLE
Now let’s experiment with programming sounds on the Phasor.
Boot AppleWin and start up a disk image that lets you exit to Basic.
Type CALL -151 to enter the monitor, then type the following lines:
C0CD
The monitor will return a value. You can ignore it.
C493:FF
C492:FF
C411:0 N C410:F N C410:C
C411:F4 N C410:E N C410:C
C411:1 N C410:F N C410:C
C411:0 N C410:E N C410:C
C411:7 N C410:F N C410:C
C411:38 N C410:E N C410:C
C411:8 N C410:F N C410:C
C411:A N C410:E N C410:C
If you now hear a tone playing you have typed everything correctly.
To stop the tone, enter:
C411:0 N C410:E N C410:C
Let’s play a little bit more:
C411:8 N C410:F N C410:C
C411:10 N C410:E N C410:C
C411:B N C410:F N C410:C
C411:0 N C410:E N C410:C
C411:C N C410:F N C410:C
C411:40 N C410:E N C410:C
C411:D N C410:F N C410:C
C411:9 N C410:E N C410:C
You should now hear the tone play, and then decay in volume until it is silent.
C411:D N C410:F N C410:C
C411:8 N C410:E N C410:C
You should now hear the tone play and decay repeatedly.
C411:C N C410:F N C410:C
C411:8 N C410:E N C410:C
You should now hear the tone play and decay faster, repeatedly.
C411:6 N C410:F N C410:C
C411:F N C410:E N C410:C
C411:7 N C410:F N C410:C
C411:7 N C410:E N C410:C
You should now hear noise instead of the tone, like a drumbeat.
C411:D N C410:F N C410:C
C411:C N C410:E N C410:C
You should now hear a train sound, where the noise repeatedly ramps up in a sawtooth pattern.
C411:C N C410:F N C410:C
C411:80 N C410:E N C410:C
C411:D N C410:F N C410:C
C411:E N C410:E N C410:C
You should now hear the sound of the ocean.
To stop the sound (it will play a one-shot decay, then go silent):
C411:D N C410:F N C410:C
C411:9 N C410:E N C410:C
Control-Reset also works as a panic button to stop all sounds, but you may need to re-enter the initialization commands when you want to play sound again:
C0CD
C493:FF
C492:FF
In Applesoft BASIC, this initialization can be done as follows:
(Note: Add a line number before each command)
REM SET SL=SLOT NUMBER WHERE PHASOR CARD IS INSTALLED
XX = PEEK (12*4096 + 16*SL + 8*16 + 13)
POKE 12*4096 + SL*256 + 9*16 + 3, 255
POKE 12*4096 + SL*256 + 9*16 + 2, 255
CODE FROM SUPPLEMENT:
The commands that we entered into the monitor can be entered into Basic as a subroutine:
POKE DR(CH-1), RG
POKE CR(CH-1), LA(0,CH-1)
POKE CR(CH-1), LA(1,CH-1)
POKE DR(CH-1), DA
POKE CR(CH-1), WR(0, CH-1)
POKE CR(CH-1), WR(1, CH-1)
RETURN
The arrays should be initialized as follows:
SL = 4: REM SLOT
DIM CR(4),DR(4),LA(2,4),WR(2,4)
CR(0) = 12 * 4096 + SL * 256 + 16:CR(1) = CR(0)
DR(0) = CR(0) + 1:DR(1) = CR(1) + 1
CR(2) = 12 * 4096 + SL * 256 + 8 * 16:CR(3) = CR(2)
DR(2) = CR(2) + 1:DR(3) = CR(3) + 1
LA(0,0) = 15:LA(1,0) = 12:WR(0,0) = 14:WR(1,0) = 12
LA(0,1) = 23:LA(1,1) = 20:WR(0,1) = 22:WR(1,1) = 20
LA(0,2) = 15:LA(1,2) = 12:WR(0,2) = 14:WR(1,2) = 12
LA(0,3) = 23:LA(1,3) = 20:WR(0,3) = 22:WR(1,3) = 20
The following commands will play a C major chord on Chip 1 using envelope shape 13 to ramp up and 9 to ramp down.
C0CD
C493:FF
C492:FF
C411:0 N C410:F N C410:C
C411:F4 N C410:E N C410:C
C411:1 N C410:F N C410:C
C411:0 N C410:E N C410:C
C411:2 N C410:F N C410:C
C411:C1 N C410:E N C410:C
C411:3 N C410:F N C410:C
C411:0 N C410:E N C410:C
C411:4 N C410:F N C410:C
C411:A3 N C410:E N C410:C
C411:5 N C410:F N C410:C
C411:0 N C410:E N C410:C
C411:7 N C410:F N C410:C
C411:38 N C410:E N C410:C
C411:8 N C410:F N C410:C
C411:10 N C410:E N C410:C
C411:9 N C410:F N C410:C
C411:10 N C410:E N C410:C
C411:A N C410:F N C410:C
C411:10 N C410:E N C410:C
C411:B N C410:F N C410:C
C411:0 N C410:E N C410:C
C411:C N C410:F N C410:C
C411:20 N C410:E N C410:C
C411:D N C410:F N C410:C
C411:D N C410:E N C410:C
To stop the chord:
C411:D N C410:F N C410:C
C411:9 N C410:E N C410:C