MZIK - A Music Interpreter / Program Creator Author: Jonathan T. Higa Date: Wed Dec 18 1991 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Mini-instructions: String of music notation; MZIK; wait; EVAL. -jkh- ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ MZIK is a music translator. It takes a string in level 1 and returns a program in level 1. It follows the conventions of the music interpreter which I've seen in IBM Advanced BASIC, except for the following: 1. There is no "MS" or "ML" command; you'll have to insert pauses for staccato music. (I promise that it's really not that bad; you have better control over exactly how staccato a note will be.) 2. There is an "H" directive, meaning to tie the previous note to another of the same frequency and specified duration. For example, "A2H8" translates to a half note tied to an eighth note. 3. There is a "K" directive, meaning to change the key in the presence of accidentals, as in "K#" (which transposes up a half step), or to set the frequency of the octave-zero A in the absence of accidentals, as in "K55" (so that the octave 3 A is 440 Hz). 4. The interpreter is case-sensitive. The syntax of the source string is: cmdchar[accidentals][number][dots] repeated _ad_libitum_, where cmdchar is one of "ABCDEFGHKLOPT<>", accidentals is an optional string whose chars are in "-+#b", number is an optional whole number, and dots is an optional string of dots. There may not be spaces separating the cmdchar from its qualifiers, but there may be whitespace separating command units, like "Ab4 E#8." Here's a sample (Greensleeves) to get you started: "T84O3L8EG4AB.>C#16EG4AB.>C#16D4.D.C#16>D4.D.C#16 Go up one octave (e.g. CDEFGAB>C plays the C scale). < Go down one octave. # or + Sharp preceeding note (e.g. A# or A+). b or - Flat preceeding note (e.g. Ab or A-). L n Sets length of each note (e.g. L4 is quarter note; L1 is whole note; L8 is eighth note, etc.) SHORTCUT: You may also put the desired length after each note, e.g. A8 B2 is the same as L8 A L2 B. Likewise P2 is the same as L2 P.