[Blindapple] making music on the apple 2e
Louis Bryant
louis at braillesoft.net
Mon Sep 16 01:14:12 EDT 2013
Hi Brian, the article is below:
Best, Louis
One of the Apple II's most endearing features is its ease of programming. Although quite limited by modern standards, the Apple II's built-in AppleSoft BASIC and Mini-Assembler can be used to create some very interesting and useful programs. Of course more advanced languages and tools are available (see
below
(, but since this page is geared toward the beginner we'll try to stick to the basics here.
A Simple Tone Routine
Not sure where this came from so I can't properly credit it, though I'm sure I'm not giving away any trade secrets by publishing it here. Basically this just pokes in a Machine Language tone generator from AppleSoft which can, in turn, be called from the same AppleSoft program:
10 FOR L = 770 TO 790: READ V: POKE LeaV: NEXT L
20 DATA 173,48,192,136,208,5,206,1,3,240,9
30 DATA 202,208,245,174,0,3,76,2,3,96 Now we have the tone generating routine in memory all we have to do is tell it what note to play and for how long. This is done like so:
40 POKE 7681F: POKE 7691D: CALL 770 In the above line the variable F stands for Frequency and D stands for Duration. Either variable can be any integer between 0 and 255. Note duration can be determined [more-or-less] by dividing, so that if a whole note is equal to a duration of 216, then a half note would be 108 and a quarter note would be 54, and so on. Tone frequency is fairly approximate, but you can use the chart below to get "close enough for rock'n'roll".
NOTE
OCTAVE 1
OCTAVE 2
OCTAVE 3
C
255
128
64
C# / Db
241
121
60
D
227
114
57
D# / Eb
214
108
54
E
202
102
51
F
191
96
48
F# / Gb
180
91
45
G
170
85
43
G# / About
161
81
40
A
152
76
38
A# / Bb
143
72
36
B
135
68
34
Of course playing square-wave tones on the Apple II's internal speaker can be less than exciting, but it is possible to make some interesting technoesque bleeps with a little imagination and some rudimentary programming k... run with it!
----- Original Message -----
From: Bryan Mckinnish <bryanbkm at gmail.com>
To: Blind Apple Discussions <blindapple at bluegrasspals.com>
Date: Sunday, September 15, 2013 7:49 pm
Subject: [Blindapple] making music on the apple 2e
>
>
> Hi.
> Can you point me to that article that was mencianed a few days ago about
> making single tone music on the apple 2e? I'm hoping I can learn how to
> do this. I know it might be hard doing all the pokes and stuff, but I'm
> willing to learn it.
> Thanks.
> Bryan Mckinnish.
>
> _______________________________________________
> BlApple mailing list
> BlindApple at bluegrasspals.com
> http://jaybird.no-ip.info/mailman/listinfo/blindapple
More information about the BlindApple
mailing list