falta solo revisar

Instruccion PLAY

Objetivo:

Tocar música insertando una música macro lenguaje dentro de cadena de datos.

Sintaxis:

 PLAY string expression

Comentarios:

Las órdenes de carácter solo en el JUEGO son como sigue:

A-G [#,+,-] Los A-G son notas. # or + después de nota produce un agudo; - produce un piso.

Cualquier nota seguida  #,+,o - debe referirse a una tecla negra en un piano.

L(n) Pone la longitud de cada nota. El L4 es una negra, L1 es una semibreve, etcétera. el n puede ser de 1 a 64.

La longitud también puede seguir la nota para cambiar la longitud para aquella nota sólo. El A16 es equivalente a L16A.

MF Primer plano de música.las instrucciones PLAY y SOUND corren en el primer plano. Es decir cada nota subsecuente o sonido no son comenzados hasta la nota anterior o sonido es terminado. Este es la falta inicial.
MB Fondo de música. las instrucciones PLAYSOUND corren en el fondo. Es decir cada nota o sonido son colocados en un buffer que permite al programa BASIC seguir la ejecución mientras la música juega en el fondo. Tanto como 32 notas (o restos) pueden ser jugadas en el fondo en un tiempo.
MN Música normal. Cada juegos de nota siete-eighths del tiempo determinado por L (longitud).
ML Ligadura de música. Cada nota juega el período lleno puesto por L.
SRA. Música staccato. Cada nota juega tres cuartos del tiempo determinado por L.
N(n) La nota de juego n. n puede extenderse de 0 a 84. En las 7 octavas posibles, hay 84 notas. n juego a 0 indica un resto.
O(n) Octava 0 juegos la octava corriente. Hay 7 octavas (0 a 6). Predeterminado es 4. El Medio C es a principios de la octava 3.
P(n) Pausa. P puede extenderse de 1-64.
T(n) Ritmo. T pone el número de L4s en un minuto. el n puede extenderse de 32-255. La falta es 120.
. (período) Un período después de una nota aumenta el tiempo de juego de la nota antes de tiempos 3/2 el período determinado por L (la longitud de la nota) tiempos T (ritmo). Períodos múltiples pueden aparecer después  de una nota, y el tiempo de juego es escalado en consecuencia. Por ejemplo, A. hará que la nota un juegue un y tiempos el tiempo de juego determinado por L (longitud de la nota) tiempos T (el ritmo); dos períodos colocados después un (A..) hará que la nota sea jugada en tiempos 9/4 su valor asignado; Un un con tres períodos (A. ..) en 27/8, etc.

Los períodos también pueden aparecer después de un P (pausa), y aumentar la longitud de pausa como descrito encima.

Xstring; Ejecuta una subcadena, donde la cadena es una variable adjudicada a una cuerda de órdenes PLAY.

A causa del reloj lento interrumpen el precio, algunas notas no juegan en ritmos más altos; por ejemplo, 1.64 en T255. Estas combinaciones de nota/ritmo deben ser determinadas por la experimentación.

>n Un mayor - que el símbolo que precede a la nota el n juega la nota en la siguiente octava más alta.
<n Un menos - que el símbolo que precede a la nota el n juega la nota en la siguiente octava inferior.



Note

Los argumentos numéricos siguen la misma sintaxis descrita bajo la instruccion DRAW.


n cuando un argumento puede ser una constante, o esto puede ser una variable con = delante de ello (= variable). Se requiere un punto y coma después de la variable y también después de la variable en Xstring.

 

PLAY Statement

Purpose:

To play music by embedding a music macro language into the string data type.

Syntax:

PLAY string expression

Comments:

The single-character commands in PLAY are as follows:

A-G [#,+,-] A-G are notes. # or + following a note produces a sharp; - produces a flat.

Any note followed by #,+,or - must refer to a black key on a piano.

L(n) Sets the length of each note. L4 is a quarter note, L1 is a whole note, and so on. n may be from 1 to 64.

Length may also follow the note to change the length for that note only. A16 is equivalent to L16A.

MF Music foreground. PLAY and SOUND statements are to run in foreground. That is, each subsequent note or sound is not started until the previous note or sound is finished. This is the initial default.
MB Music background. PLAY and SOUND statements are to run in background. That is, each note or sound is placed in a buffer allowing the BASIC program to continue execution while music plays in the background. As many as 32 notes (or rests) can be played in background at one time.
MN Music normal. Each note plays seven-eighths of the time determined by L (length).
ML Music legato. Each note plays the full period set by L.
MS Music staccato. Each note plays three-quarters of the time determined by L.
N(n) Play note n. n may range from 0 to 84. In the 7 possible octaves, there are 84 notes. n set to 0 indicates a rest.
O(n) Octave 0 sets the current octave. There are 7 octaves (0 through 6). Default is 4. Middle C is at the beginning of octave 3.
P(n) Pause. P may range from 1-64.
T(n) Tempo. T sets the number of L4s in a minute. n may range from 32-255. Default is 120.
. (period) A period after a note increases the playing time of the note by 3/2 times the period determined by L (length of note) times T (tempo). Multiple periods can appear after  a note, and the playing time is scaled accordingly. For example, A. will cause the note A to play one and half times the playing time determined by L (length of the note) times T (the tempo); two periods placed after A (A..) will cause the note to be played at 9/4 times its ascribed value; an A with three periods (A...) at 27/8, etc.

Periods may also appear after a P (pause), and increase the pause length as described above.

Xstring; Executes a substring, where string is a variable assigned to a string of PLAY commands.

Because of the slow clock interrupt rate, some notes do not play at higher tempos; for example, 1.64 at T255. These note/tempo combinations must be determined through experimentation.

>n A greater-than symbol preceding the note n plays the note in the next higher octave.
<n A less-than symbol preceding the note n plays the note in the next lower octave.



Note

Numeric arguments follow the same syntax described under the DRAW  statement.


n as an argument can be a constant, or it can be a variable with = in front of it (= variable). A semicolon is required after the variable and also after the variable in Xstring.

1