120 lines
5.1 KiB
HTML
120 lines
5.1 KiB
HTML
<HTML>
|
|
<HEAD><TITLE>QuickBASIC 3.0 - Long Entry</TITLE></HEAD>
|
|
<BODY>
|
|
|
|
<A HREF="ng24ced.html">[<<Previous Entry]</A>
|
|
<A HREF="ng320.html">[^^Up^^]</A>
|
|
<A HREF="ng25c31.html">[Next Entry>>]</A>
|
|
<A HREF="menu.html" >[Menu]</A>
|
|
<A HREF="info.html">[About The Guide]</A>
|
|
<HR>
|
|
<PRE>
|
|
<B>PLAY Play Music Statement</B>
|
|
|
|
<B>PLAY</B> <U>string</U>
|
|
|
|
Plays a melody according to instructions specified as a string
|
|
expression.
|
|
|
|
<U>string</U> A string expression containing one or more commands in the
|
|
BASIC tune definition language.
|
|
|
|
<B>Tune Definition Language</B>
|
|
|
|
A to G Name of a note to play. Case is not significant.
|
|
|
|
N<U>n</U> Number of a note to play. Notes are numbered from 1,
|
|
corresponding to the lowest C on a piano, to 84,
|
|
corresponding to the highest B on a piano. A value of 0
|
|
for <U>n</U> specifies a rest.
|
|
|
|
#, +, - Sharps and flats. The equivalent symbols # and + tell
|
|
BASIC to raise the specified note by a half step. The
|
|
symbol - tells BASIC to lower the specified note by a half
|
|
step. Only those sharps and flats that correspond to black
|
|
keys on a piano are valid; i.e., E# and B# are not valid
|
|
notes. Append these symbols to the notes.
|
|
|
|
O<U>n</U> Octave (register) in which to play a letter-named note.
|
|
Octaves are numbered from 0 (lowest) to 6. The lowest note
|
|
in each octave is C. The default is octave 4.
|
|
|
|
L<U>n</U> Duration of note, as a reciprocal (but see MS, ML, and MN,
|
|
below). A value of 4 indicates a quarter note, a value of
|
|
16 indicates a sixteenth note, and so on. All values from
|
|
1 through 64 are valid. An L command affects all notes
|
|
that follow, until the next L command. But you may also
|
|
specify a duration value in conjunction with a note name
|
|
or number--as, for example, D#4 (a D-sharp quarter note);
|
|
a duration specified in this manner affects only the note
|
|
with which it is associated.
|
|
|
|
P<U>n</U> A rest (pause) of specified duration. The duration is
|
|
specified in the same manner as for a note--i.e., as a
|
|
reciprocal. To generate a rest in the current value of L,
|
|
you may simply indicate a note number of 0.
|
|
|
|
. Appended to a note name or number, or a rest, a dot
|
|
(period) extends the current duration of the note (or
|
|
rest) by one half. You may have more than one dot after a
|
|
note or rest.
|
|
|
|
T<U>n</U> Tempo, specified as a number of quarter notes per minute.
|
|
Values of 32 to 255 are valid; the default is 120.
|
|
|
|
>A to >G Increment the octave value by 1 and play the named note.
|
|
The octave value stays at the increased level. If the
|
|
current octave is 6, > has no effect.
|
|
|
|
<A to <G Decrement the octave value by 1 and play the named note.
|
|
The octave value stays at the decreased level. If the
|
|
current octave is 0, < has no effect.
|
|
|
|
MF Run music in foreground.
|
|
|
|
MB Run music in background. Other program statements may be
|
|
executed while music is running. Up to 32 notes may be
|
|
held in the background music buffer at any time.
|
|
|
|
ML Music legato: Notes are played for their full specified
|
|
duration.
|
|
|
|
MS Music staccato: Notes are played for 3/4 of their
|
|
specified duration.
|
|
|
|
MN Music normal: Notes are played for 7/8 of their specified
|
|
duration. This mode is default.
|
|
|
|
"=" + VARPTR$(<U>var</U>)
|
|
Get argument from variable. May be used to supply
|
|
arguments to any of the foregoing commands.
|
|
|
|
"X" + VARPTR$(<U>stringvar</U>)
|
|
Execute command sequence stored in a string variable. This
|
|
command allows you to call "subtunes."
|
|
|
|
--------------------------------------------------------------------------
|
|
|
|
<B>Notes:</B> To get arguments or instructions from variables, you must
|
|
use VARPTR$(<U>var</U>) or VARPTR$(<U>stringvar</U>). QuickBASIC does
|
|
not support the =<U>variable</U>; and X<U>stringvar</U> formulations
|
|
available with the Interpreter.
|
|
|
|
Spaces between or within instructions are insignificant.
|
|
|
|
Semicolons may be used between commands to enhance
|
|
readability.
|
|
</PRE>
|
|
<HR>
|
|
<B>See Also:</B>
|
|
<A HREF="ng579e.html">BEEP</A>
|
|
<A HREF="ng1f18c.html">ON PLAY(n)</A>
|
|
<A HREF="ng248ab.html">PLAY (Event Trap)</A>
|
|
<A HREF="ng2e58f.html">SOUND</A>
|
|
<HR>
|
|
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
|
|
Written by <A HREF="http://www.acemake.com/hagbard">Dave Pearson</A>
|
|
<HR>
|
|
</BODY>
|
|
</HTML>
|