Sharp MZ-700 Series Owner's Manual page 67

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

2.3.9 Music control statements
This section discusses the MUSIC and TEMPO statements which are used to control performance of
music by the computer. As its name implies, the TEMPO statement specifies the speed with which music is
performed. The notes (including half notes and upper and lower octaves) and duration of notes produced
are controlled by the MUSIC statement.
Tempo:
Melody:
Note specification
Specified with TEMPO as a numeric variable or constant with a value from
1 (slow) to 7 (fast).
Specified with MUSIC as a string variable consisting of a collection of
notes.
octave
# (sharp)
note name
duration
2. 3. 9. 1 MUSIC
(abbreviated format: MU.)
Format
Discussion
MUSIC X$
X$ . . . String data
Automatically performs music.
This statement outputs the melody or sound effects specified by the character string
or string variable of its argument to the speaker. The speed with which this melody-
is played is that which is specified with the TEMPO statement (see page 67).
The format for specification of each note is as follows:
< octave specification > < # (sharp) > note name < duration >
The plus or minus signs are used to specify the octave. If neither is specified, the
middle range is assumed.
The three ranges of sounds which can be output by the computer are as shown in the
figure below. For example, the C notes ( " d o " on the 8-note C scale) indicated by
the black dots below are differentiated from each other by the octave specification.
Low C
- C
Middle C
C
High C
+C
?
>
V
Low
Middle
High
range
[ |
range
[ |
range
No specification
+
65-

Advertisement

Table of Contents
loading

Table of Contents