35
RC8650 VOICE SYNTHESIZER
RC SYSTEMS
Table 3.1. Musical Note Pitch/K
i
Values
The task of finding K
i
for a particular musical note is greatly simplified
by using Table 3.1. The tone generator can cover a four-octave range,
from C two octaves below Middle C (K
i
= 255), to D two octaves above
Middle C (K
i
= 14). K
i
values less than 14 are not recommended.
For example, the Voice frame
DATA 24,64,0,0
will play Middle C using voice 1 (K
1
= 64). Since K
2
and K
3
are zero,
voices 2 and 3 will be silent during the frame. The duration of the note
is a function of both the tempo K
T
and duration K
D
, which in this case
is 24.
As another example,
DATA 48,64,51,43
plays a C-E-G chord, for a duration twice as long as the previous
example.
Choosing note durations and tempo
Table 3.2 lists suggested K
D
values for each of the standard musical
note durations. This convention permits shorter (
1
/
64
th note) and inter-
Table 3.2. Musical Note Duration/K
D
Values
Using the suggested values, it turns out that most musical scores
sound best when played at a tempo of 255 or faster (i.e., K
TH
= 0). Of
course, the “right” tempo is the one that sounds the best.
Play Command
The Play command causes the voice data in the input buffer to begin
playing. Additional Initialize commands and Voice frames may be sent
to the RC8650 while the tone generator is operating. The TS pin and
TS flag are asserted at this time, enabling the host to synchronize to
the playing of the tone data. TS becomes inactive after all of the data
has been played.
Quit Command
The Quit command marks the end of the tone data in the input buffer.
The RC8650 will play the contents of the buffer up to the Quit com-
mand, then return to the text-to-speech mode that was in effect when
the tone generator was activated. Once the Quit command has been
issued, the RC8650 will not accept any more data until the entire buf-
fer has been played.
Example Tune
The Basic program shown in Figure 3.2 reads tone generator data
from a list of DATA statements and LPRINTs each value to the RC8650.
The program assumes that the RC8650 is connected to a PC’s printer
port, although output could be redirected to a COM port with the DOS
MODE command.
The astute reader may have noticed some “non-standard” note dura-
tions in the DATA statements, such as the first two Voice frames in
line 240. According to the original music, some voices were not to be
played as long as the others during the beat. The F-C-F notes in the
first frame are held for 46 counts, while the low F and C in the second
frame are held for two additional counts. Adding the duration (first and
fifth) bytes together, the low F and C do indeed add up to 48 counts
(46 + 2), which is the standard duration of a quarter note.
mediate note values to be played, while maintaining the same degree
of accuracy. This is important when, for example, a thirty-second note
is to be played staccato, or a note is dotted (multiplying its length by
1.5).