Contents of the MUZAK.DOC file
MUZAK.DOC Documentation to MUZAK.BAS
Version 2.11 (11/2/85)
By Aaron Ross Priven
Music Written by Assorted Authors
MUZAK.BAS is a very simple program. It plays music (or muzak if you
prefer). There are lots of programs around that play music. In fact, MUZAK
is entirely based on other people's programs: I did not write a single one
of the .MUZ files. Rather, I took other peoples' programs and put them in
MUZAK. You are asking, first of all, "Who cares? The bloody credits are all
in the .MUZ files when you play them, aren't they?" and second "why do you
need documentation? Hit a button when the menu comes up and it plays!"
Good questions! (After all, I did think of them myself...) This does not
tell you how to run MUZAK; it tells you how to add to MUZAK. MUZAK runs on
separate files, which is the important thing. That way you can add to the
program without actually modifying it. There are two kinds of .MUZ files:
those with words and those without. (GOODMORN and CLAVIER, respectively.)
(Also there are the definition .MUZ files, but we go into that later.)
Files with words are not really more complicated than those without; they
are simply more lengthy.
But first, the way to create a .MUZ file. The way to create a .MUZ file
is first, to get out a text editor (EDLIN or the like) and type three string
constants, enclosed in quotes. The constants can be anything you want: these
are the lines that appear inside the box while the music is playing. I used
these as credits: First line name of the song, 2d line name of the author of
the music; 3d line name of the person who programmed the music. However, you
can use them any way you want. This is the first line of the file; we will be
back to it later.
Now we create the music. There are two ways to do this; 1) to create it
in the text editor and 2) to do it in a program. To do it in the text editor
all you have to do is turn to pages 4-209 through 4-212 in your BASIC manual
and use the codes there to produce something that sounds nice. (Also this is
the best way to do it if you are taking the notes from sheet music.) Make a
new line at least every 80 columns so that the program can test to see if
was pressed (if it is, it will go back to the menu). If you decide to put words
in your music, then before each music line, put a string constant again in
quotes. If you start a new music line before you want to print anything else,
you must put two quotes right next to each other before the new music line; the
same goes for starting a new word line before a new music line.
Suppose you had two files like this:
must have the comma or start a new line
"Sample with words","By Aaron Priven","Rin Tin Tin"
"Do ","C","Re ","D","Mi ","E","Fa ","F" "Sol ","G","La ","A","Ti ","B","Do!","C2" instead of starting
a new line>
That would print out on one line:
Do Re Mi Fa Sol La Ti Do!
To go to the next line, make the last character in the word string a vertical
"Sample 2 with words"
"By Aaron Priven"
"Rin Tin Tin"
"D" <== You can also put them on different lines like this.
This would print:
Here is a sample without words:
"No Words","Douglas Adams","Piers Anthony"
"C C# D D# E F F# G"
"G# A A# B C"
The way to make a .MUZ file from a BASIC program is first to write one.
(Or download one, like I did.) Then save it into ASCII form, go into EDLIN,and
1 OPEN "YOURFILE.MUZ" FOR OUTPUT AS #1
If you have words in the program, also do this:
and then leave EDLIN. Go into BASIC, and then run the program. It will then
write the music codes and words onto the YOURFILE.MUZ file. (If there were
codes of the form "Xv$;" in the program where v$ is the name of a string
variable change that to ""+v$+"". Similarly,
if there are equals signs in the codes as such:"N=v;" or "O=v;" or the like,
replace the "=v" with: ""+STR$(v)+"".)
You will then have to go and write the three strings as described above.
Make sure (in a file with words) that there are not two music strings or two
word strings right next to each other.
When you have got the codes and words all ready, count up the total number
of MUSIC strings. Every time there is a new line or new quote after a comma,
and the data inside the quote is music code, that is another count. Put this
number the fourth item in the file: right after the third string whose contents
go into the box. This is to tell how many times to look for music when MUZAK
loads the .MUZ file.
There is one more thing you have to do. There is a number of different .MUZ
files. These are the definition files. Supplied are: INITIAL.MUZ, XMAS.MUZ,
CLASSICS.MUZ, THEMES.MUZ, TEMP.MUZ, and DEFINTN.MUZ. In MUZAK version 1.0 there
was only one file, DEFINTN.MUZ. In that version, there was a maximum of 40
files available in MUZAK. In V2.xx there are now 1600 files possible
(if you feel like dedicating that much memory to MUZAK.) The way it works is
this: each music file has to be listed in a subdefintion file which has to be
listed in DEFINTN.MUZ! It isn't really that complicated. First we have to have
a subdefinition file. I have supplied five of these kinds of files; XMAS.MUZ
contains Christmas Carols, CLASSICS.MUZ contains classical music (or muzak?),
THEMES.MUZ has movie and TV themes, POPULAR.MUZ has generally miscellaneous
music, and INITIAL.MUZ contains everything the other four do. These files
have the format:
Which means that the first item is either one or zero (if it includes words,
it is a zero; if it doesn't, it is a one); the second is the name of the file;
and the third is the prompt you will see when the file is displayed on the
screen, or a short description of the file. An example:
0,"YOURFILE.MUZ","My Very First File!!"
After you have added that line to the end of the subdefinition file, you
must add one to the number that serves as the first line of the file. If this
number then becomes 41 or higher, you have some work to do. Do not save the
work we have done so far since "There is one more thing you have to do" and
create another text file. You may call this file anything you like. Write
the line described above into THIS file, add a "1" as the first line (unless
there will be more than one line in the file) and then save it.
Now we get to modify DEFINTN.MUZ. Edit DEFINTN.MUZ, and add the name of the
new file to the end of DEFINTN.MUZ (same method as adding a new file to a
subdefintion file except leave out WORDFLAG), and add one to the number at
the top of DEFINTN.MUZ.
Congratulations! You have not only added a new file to MUZAK.BAS but gone
through the worst documentation in history!!!!! Good luck in understanding
it. Any comments and suggestions (particularly about documentation writing!)
please leave on the Hot Rod BBS at 415-343-7498, or the Charisma BBS at
415-349-6576, both in San Mateo, CA. to me, Aaron Priven. Or you can write me
Aaron Ross Priven
540 Sylvan Avenue
San Mateo, CA
I would appreciate any comments, suggestions, wisecracks, or even insults
because I have heard all of ONE person saying anything about MUZAK in the
months it has been distributed, and that was "Oh pretty neat."
(He'll probably like it better now that some of his music is in it, but
Original version. If you still have this one, you're out of date.
Adds the ability of subdefinition files to allow more than 40 .MUZ files.
I thought some people might like this. Also adds the usual assortment
Version 2.1 adds subdefinition files XMAS.MUZ, CLASSICS.MUZ, and THEMES.MUZ,
the type of music at the top of the music-playing menu, the box running
the entire way across the screen, a number of new music files, and something
else that I seem to have forgotten the details of. Oh well, believe me,
if the program is a worm, I don't know about it!
Version 2.11 adds a couple of new music files (mostly by Char Aznabul),
and gets rid of that stupid "Violin Man" thing at the bottom of the box
(it was only supposed to do that on a 1-in-100 chance, but obviously THAT
didn't work). Anyway since I got a compiler I was wondering if you all
think I should compile this program. Any response? Please?
t work). Anyway since I got a compiler I was wondering if you all
think I should com