EasyManua.ls Logo

Sharp MZ-700 - Music Control Statements (MUSIC, TEMPO)

Sharp MZ-700
213 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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:
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.
Note specification:
I octave
11
#(sharp)
11
note
name 11 duration I
2. 3. 9. 1 MUSIC
.....................................
(abbreviated format: MU.)
Format
MUSIC X$
X$ . . . String
data
Automatically performs music.
I Discussion I 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
("do"
on
the 8-note C scale) indicated
by
the
black
dots
below are differentiated from each
other
by
the octave specification.
LowC
.......
-C
Middle C
..
. .
..
C
High C
..
.....
+C
Low
Middle
High
range 1 1 range 1 1 range
No specification +
------
--------------
----------------------
--------
----------~-----65

Other manuals for Sharp MZ-700

Related product manuals