Dec 072017
 
Create, edit, play music; notes go on a staff.
File MUSIC2.ZIP from The Programmer’s Corner in
Category Games and Entertainment
Create, edit, play music; notes go on a staff.
File Name File Size Zip Size Zip Type
COLOUR.MUS 1280 305 deflated
DAYLIFE.MUS 3456 438 deflated
HANDNEWS.MUS 2944 389 deflated
HOMEWARD.MUS 1920 309 deflated
MUSIC2.DOC 41344 12593 deflated
MUSIC2.EXE 50688 28494 deflated
OVERHEAD.MUS 2944 375 deflated
PAPERBAK.MUS 2176 321 deflated

Download File MUSIC2.ZIP Here

Contents of the MUSIC2.DOC file


-Page 0-
MUSIC2 program documentation


=================================== MUSIC2 ===================================

CONTENTS

Item Page (new)
Introduction:
General information------------------------------ 1
Warning!----------------------------------------- 1
Starting out; some files------------------------- 2 *
Running the program------------------------------ 2
Entering music--the basic functions:
Entering notes----------------------------------- 3
Pauses (rests) (space bar)----------------------- 4
Note length (1,2,4,8,6; !,@,$,*,^)--------------- 4
Dotted notes (period key)------------------------ 5
Tied notes (dash key)---------------------------- 5
When to enter dots, ties, and note lengths------- 5
Maximum number of notes-------------------------- 5
Some additional music settings:
Tempo (SHIFT/F5)--------------------------------- 6
Note duration (SHIFT/F9)------------------------- 6 *
Fore/back-ground (SHIFT/F7)---------------------- 6 *
Time (or measure) (M or m)-----------------------
Repeats:
Begin definition (open parens)----------------- 7 *
End definition (close parens)------------------ 7 *
Execute definition (X or x)-------------------- 7 *
Non-playable music settings:
Help panels (question mark key)------------------ 8 *
Playing the tune (F1)---------------------------- 8 *
Playing and drawing the tune (SHIFT/F1)---------- 8
Loading previously saved music (CTRL/Pg Up)------ 8
Saving your music (CTRL/Pg Dn)------------------- 8
Turning the sound on and off (V or v)------------ 9 *
Getting out of the routine (Esc)----------------- 9 *
Editing functions:
Moving the cursor:
Cursor right----------------------------------- 10 *
Cursor left------------------------------------ 10 *
Go to start of current screen (Home)----------- 10 *
Go to end of current screen (End)-------------- 10 *
Previous screen (Pg Up)------------------------ 11 *
Next screen (Pg Dn)---------------------------- 11 *
Go to start of music (CTRL/Home)--------------- 11 *
Go to end of music (CTRL/End)------------------ 11 *
Changing notes:
Overstrike------------------------------------- 11 *
Delete----------------------------------------- 11 *
Insert----------------------------------------- 11 *
Global change (C or c)------------------------- 12 *
Compiling (SHIFT/F3)----------------------------- 12 *
The MUSIC2 screen display-------------------------- 13
How the music is stored---------------------------- 14
Changes between original MUSIC package and MUSIC2-- 15









-Page 1-
MUSIC2 program documentation


INTRODUCTION

General information:
MUSIC2 is the second revision of the MUSIC program which appeared on a
Washington, D.C. Capital PC User's Group disk in August 1982. Revisions made
since that time are briefly described at the end of this file.
MUSIC2 is a BASIC program which helps you create and play music on your
PC. The package utilizes the "PLAY" command in BASIC and allows you to enter
and play one `voice' (note) at a time as if your PC was a piano keyboard.
You may enter whole, half, quarter, eighth, or sixteenth notes. The
notes may be tied together to create notes of any longer length. You may also
play dotted notes (notes which play one-and-a-half times as long as an
undotted note). Notes are entered directly from the keyboard and flats and
sharps are shown as flats (A-sharp is shown as B-flat).
Your piece of music may be saved at any time. You may also load
previously stored music files at any time for editing or playing.
In order to use the program, you will need at least 64K, if not 96K, of
RAM. Displays are in 40-column low-resolution graphics mode. While some
displays show some color, this was accidental and a color screen is not
needed.

Warning!
Due to a peculiarity in compiled BASIC, it's possible to create an
overflow condition in the music buffer. This results in the program aborting.
Some advice: (a) save your compositions before playing them, and (b) make
music foreground (see SHIFT/F7) the default when you're creating your music
and then, optionally, switch to music background when everything's saved and
ready to rip.
==============================================================================
This is yet another one of those free programs which begins by asking you
to send money if you find it useful (or even cute). The program took quite a
bit of work and it you want to contribute something like $15, I'd be tickled
pink.
Please mail money, comments, suggestions, or pictures of cute single
women to me at:
Bruce Guthrie
113 Sheffield St
Silver Spring, MD 20910
==============================================================================
























-Page 2-
MUSIC2 program documentation


Starting out; some files:
The following input files are provided with the MUSIC2 package. The
descriptions are split into three groups (required files, documentation, and
sample music) and approximate sizes in bytes are shown.
--filename size comments --Program files-- SPACE=50700 bytes
MUSIC2 .EXE 50700 the actual program; compiled in BASIC
--filename size comments --Documentation file-- SPACE=40800 bytes
MUSIC2 .DOC 40800 instructions for the program
--filename size comments --Sample data files-- SPACE=14800 bytes
COLOUR .MUS 1300 "Colour My World" by Chicago
DAYLIFE .MUS 3500 "A Day in the Life" by the Beatles
HANDNEWS.MUS 3000 "Second Hand News" by Fleetwood Mac
HOMEWARD.MUS 1800 "Homeward Bound" by Simon and Garfunkle
OVERHEAD.MUS 3000 "Over My Head" by Fleetwood Mac
PAPERBAK.MUS 2200 "Paperback Writer" by the Beatles
The total approximate space is 106,300 bytes; a sizable portion of any
disk.
It should be pointed out that, of the sample files included, OVERHEAD.MUS
illustrates some of the problems of putting music into the PC. More than one
voice is required to make "Over My Head" work on a PC and there's no way to
come close to this song in BASIC.

Running the program:
While in DOS, type "MUSIC2". The screen clears, its title (and my name)
are printed, you are told to type a "?" (question mark) if you want to see the
help panels, and then the program reads some graphics definitions.
The program asks you for the title of the composition you will be
creating. Once entered, the title can only be changed with EDLIN or a similar
editor. If you will be loading a previously stored music file, you need not
fill in a title as the routine will use the title stored with the file. Only
the first 32 characters of the title will be displayed.
Next, the program will draw a bass and treble clef for you. The top
lines of the display will show:
Tempo: t120 Note duration: mn
Note length: 4 Fore/back-ground: mb

Default time=4/4 h=middle C
Each of these statements is explained in individual sections below.
After a moment, a flashing note sign will appear at the bottom of the
screen and you may begin to enter your music.























-Page 3-
MUSIC2 program documentation


ENTERING MUSIC--THE BASIC FUNCTIONS

When you think of music, you think of notes on a piece of paper.
Initially you will want to enter the notes themselves before you worry about
things like tempo and whether the music is played staccato or not. The next
section is for you!

Entering notes:
The initial display tells you that the "h" key is middle C. Basically,
the middle row of white keys on your PC are the white keys on your PC piano.
"a" is an E, "b" is an "F", "c" is a "G", et cetera all the way up to "`"
which is another "B". By pressing the Alt key when you enter "a" through "l",
you will get notes an octave lower than regular. By pressing the shift key,
you will get notes an octave higher. By pressing the CTRL key, you will get
notes two octaves higher.
Due to BASIC limitations, the program ignores any illegal Alt or CTRL
request (for example, forget Alt/;).
The basic octave ranges provided by each of the note combinations (Alt,
regular, shift, and CTRL) is shown in the chart below:
note key Alt reg shift CTRL
F *
E *
D *
C *
B * *
A * *
G * *
+--------- F * *
t| E * *
r+--------- D *
e| C *
b+--------- B * *
l| A * *
e+--------- G * *
| F l * *
+--------- E k * *
D j *
middle c C h *
B g *
+--------- A f *
b| G d *
a+--------- F s * *
s| E * *
s+--------- D *
| C *
+--------- B *
| A *
+--------- G *
F *
E *













-Page 4-
MUSIC2 program documentation


Flats and sharps are obtained from using the row of keys directly above
the a to ~ row. Flats and sharps are determined by their position on the
keyboard. For example, the "t" key is just above and to the right of the "f"
key. It is also above and to the left of the "g" key. Since the "f" key is
an A and the "g" key is a B, "t" is A-sharp or B-flat. All sharps are drawn
as the flatted equivalent (you may want an A-sharp, but it will be drawn as a
B-flat).
The sharp and flat keys work in combination with the Alt, shift, and CTRL
keys in a manner consistent with the regular note keys.
The length of each note is determined by the default note length setting
(initially 4--quarter notes) or, if you have specified one, any overridden
note length (if you press the "6" key before entering the note, that note will
be a sixteenth note). Setting note lengths is described below.
Once you have entered a note, you can change it to something else on an
individual basis through the MUSIC2 editor (described below) or globally
through the global change command ("C" or "c"--also described below).
WARNING: If you have Caps Lock set, you will get the equivalent of
shifted letters each time. This is advantageous sometimes while a pain at
other times. Be aware of where you have it set in either case. Caps Lock
does not effect non-letters (";", "'", "`", "[", and "]" keys must be shifted
individually).

Pauses (rests):
If you press the space bar, a rest of whatever length you've set will be
entered into the music.
Once entered, the rest may be changed into something else on an
individual basis through the MUSIC2 editor (described below).

Note length:
The note length shows you the default length for each note. A "4"
indicates that, unless overridden for specific notes, each note will be a
quarter note. A "2" indicates a half note, "8" indicates and eighth note, and
"1" and "16" are assigned accordingly. You can change the note length for a
given note by entering either a "1", "2", "4", "8" or "6" (for 16th) before
you enter the note. You may change the default note length to any of these by
pressing the SHIFT key while you enter them (thus "!", "@", "$", "*", and "^"
set the default note lengths to 1, 2, 4, 8, and 16 respectively).
Once entered, you cannot automatically change all note lengths to
something else (for example, change all quarter notes to eighth notes). Note
length changes can be achieved only by editing each individual note through
the MUSIC2 editor described below.
If more than one length is given for a note (for example, you enter
"12h"), the last length entered wins (in this example, "2" wins and the C
becomes a half note).
WARNING: The note lengths are entered by using the upper row of keys,
not through the numeric keypad. The numeric keypad is reserved for Editing.

















-Page 5-
MUSIC2 program documentation


Dotted notes:
In order to dot a note (playing it for 3/2 times its specified length),
you must enter a period (".") before entering the note.
The dotted note indicator toggles. If you press it once, the note which
follows will be dotted. If you change you mind and press it a second time,
the note which follows will be regular. (Of course if you press it, enter a
note, press it again, and enter a note, both notes will be dotted).

Tied notes:
In order to tie notes together (across measures or to create an smoothly
sliding or rising string of notes), enter a dash ("-") before entering the
note. That note will be tied to the one which you enter after it.
The tied note indicator toggles. If you press it once, the note which
follows will be tied. If you change you mind and press it a second time, the
note which follows will be regular. (Of course if you press it, enter a note,
press it again, and enter a note, both notes will be tied).

When to enter dots, ties, and note lengths:
You have been told that to tie a note, you have to enter a dash before
entering the note. For example, to get a tied C, you might enter "-h".
Dotted notes are similarly indicated (a period and then the note), as are
notes with a length different from the default (a sixteenth note is created by
entering the number 6 and then the note).
If you have more than one of these to specify, they can be specified in
any order as long as they all precede the note itself. For example, a dotted
sixteenth note C could be ".6h" or "6.h". Also, a dotted, tied eighth note C
could be ".6-h" or "-.6h" etc.

Maximum number of notes:
The maximum number of notes (including special notes like measures,
repeats, et cetera) is set as 1,000.
































-Page 6-
MUSIC2 program documentation


SOME ADDITIONAL MUSIC SETTINGS

The following MUSIC2 functions have a direct effect on how your music is
displayed or played. These functions can usually be ignored by initial users
of the program but will be necessary to make your music come out anything like
you want it to.

Tempo:
The tempo can be set to any value between 32 and 255 using the temp set
key (SHIFT/F5). The higher the number, the faster the notes play. The
initial display panel tells you that the tempo setting defaults to 120.
The tempo setting is stored and displayed as a special note in your
music. It can be changed at any time by choosing a new tempo setting or else
by modifying the special note through the MUSIC2 editor described below.

Note duration:
The initial display panel tells you that the default note duration is
"mn". The note duration is different from note lengths. Note duration
settings are set by using the toggle staccato/normal/legato key (SHIFT/F9).
"mn" is music normal; each note plays for 7/8 of the time specified for its
length (simulating the normal movement between keys). "ml" is music legato;
each note plays for the entire time specified by its length. Music legato is
used automatically to tie notes. "ms" is music staccato; each note plays for
3/4 of the time specified for its length.
The duration of each note is stored with each note. In order to change
these durations, you can either manually edit each note through the MUSIC2
editor described below or you may globally change all notes with one type of a
setting to something else (e.g. all music staccato notes to music normals).
The latter is the global change function ("C" or "c") which is described with
the MUSIC2 editor.

Fore/back-ground:
The initial display panel tells you that the default fore/back-ground
setting in "mb".
The fore/back-ground setting indicates whether the music will be played
in the foreground ("mf"--playing and drawing each note simultaneously) or in
the background ("mb"--putting notes to be played in a buffer when possible,
allowing a more even flow of audible music but probably resulting in a
different note being displayed than that being played). You may change the
ground setting by pressing the fore/back-ground key (SHIFT/F7).
The fore/back-ground setting is stored and displayed as a special note in
your music. It can be changed at any time by choosing a new fore/back-ground
setting or else by modifying the special note through the MUSIC2 editor
described below.



















-Page 7-
MUSIC2 program documentation


Time (or measure):
The initial display panel tells you that the default time is 4/4. This
means that four quarter notes will make up each measure. You can override the
time by pressing the change measure ("M" or "m") key. What you enter here
will not effect how the music is played (there is no cut-time indicator), just
where measure breaks are drawn.
The time setting is stored and displayed as a special note in your music.
It can be changed at any time by choosing a new setting or else by modifying
the special note through the MUSIC2 editor described below.

Repeats:
Repeats are generated by specifying the music portion to be repeated and
then by saying the play (execute) that portion of music. This process is
described below.
* Begin definition: In order to specify where the repeated music begins,
use the "(" (open parens) key. The routine will assign a number to this
particular "sub-definition" of your music. The numbering begins with 0. The
maximum number is 10 (allowing 11 sub-definitions). Numbers are assigned
sequentially. Any number of sub-definitions (up to 11) can be open at a time.
* End definition: In order to specify where the repeated music ends, use
the ")" (close parens) key. The routine will close the most-recently-opened
sub-definition. (If 0 and 1 are open, 1 will be closed when you press ")".)
* Execute definition: In order to play a previously-defined sub-
definition, enter "X" or "x". The routine will ask you for the number of the
sub-definition you want to play here.
Note that sub-definitions are ignored when measures are calculated.
The repeat keys generate special notes and are drawn on the screen like
any normal note. They may be revised or deleted like any note through the
MUSIC2 editor (see below).


































-Page 8-
MUSIC2 program documentation


NON-PLAYABLE MUSIC SETTINGS

The following MUSIC2 functions will not actually effect the music you're
trying to create. They are still pretty vital though.

Help panels:
The contents of the dataset MUSIC2.HLP will be displayed on your screen
if you use the help request key ("?"--a question mark).

Playing the tune:
Once you've entered any portion of the music, you can have it played back
for you without displaying it by press the play tune key (F1). You may not
play the tune while in Insert mode.
This function is not effected by whether you have turned the volume
(sound) on or off through the "v" function (see below). There is a pause
before the tune is played as the PC consolidates its memory.

Playing and drawing the tune:
Once you've entered any portion of the music, you can have it played back
and displayed by pressing the play and draw key (SHIFT/F1). This option
cancels you out of Edit mode if necessary. You may not select this option
while you're in Insert mode.
If you have opted to turn the sound off (though the "v" function
described below), the music will be drawn only. There is a pause before the
tune is played as the PC consolidates its memory.

Loading previously-saved music:
If you want to load some previously stored music, press the load-from-
disk key (CTRL/Pg Up). You will be prompted for the name of the file to load.
If it is on a non-default disk drive, specify that with the name (e.g.
"b:test").
Once the music is loaded, it is compiled. During this time, the music is
condensed where possible and a table of repeat calls is generated. For
information on this process, see the discussion of compiling music (below).
After compilation, you are dumped at the end of the piece. Note that
settings like tempo, note duration, and time are not set until the code
containing these settings is played. If you set non- default settings for
these, you should ask to play the music from the beginning in order to have
them activated.

Saving your music:
In order to save a file of music, press the save-to-disk key (CTRL/Pg
Dn). You will be prompted for the name of the file to save it as. If it is
to be saved on a non-default disk drive, specify that with the name (e.g.
"b:test").
You should save your music periodically during its creation. If you
suddenly run out of space, the PC will wipe out anything saved only in memory.
















-Page 9-
MUSIC2 program documentation


Turning the sound on and off:
It is often desirable to not have each note played when displayed. For
example, in edit mode, playing each note can delay you greatly.
The playing of each note can be turned on or off through the volume
on/off key ("V" or "v"). When pressed, a line appears at the bottom of the
screen saying whether the sound is on or off. This switch toggles; pressing
it again sets it back to normal.
Sound defaults to on. It is automatically reset to on after compilation.

Getting out of the routine:
The normal way to leave the routine (as opposed to Break-ing out) is to
press the Esc key. You will be prompted to enter a character if you really
want out. Otherwise, you will be returned to where you were.


















































-Page 10-
MUSIC2 program documentation


EDITING FUNCTIONS

Once you have entered some (or all) of your music, you may want to edit
portions of it. The MUSIC2 editor should fulfill most of the changes you'll
want to make. Since the stored music from this routine is kept in an ASCII
format, you can also edit it through EDLIN or whatever as long as you do not
change the total number of notes stored in the file.
The MUSIC2 editor functions are described below. If you select to
play/draw your music (SHIFT/F1) while you're in the Editor, the routine will
dump you out of Edit.
When you're in the MUSIC2 editor, the word EDIT will appear at the bottom
of the screen.

Moving the cursor:
A colored bar always appears on the screen. When you enter a note, that
note is drawn over this bar and the bar moves to the right so you can enter
another note. The bar will henceforth referred to as the "pointer".
In order to revise your music, it is necessary to move the pointer.
Several functions are provided to do this. Some move the pointer one note,
others move it to the beginning or end of the current screen, others move it
to the prior or next screen, and finally others move it to the start or the
end of your music. All of these functions are found either on the numeric
keypad or else by using the CTRL key and then a numeric keypad key. None of
these functions can be called while you're in Insert mode (described below).
NOTE: The "screen" here refers to one display of music. Each screen can
hold up to 20 notes or any combination of 20 notes, fore/back-ground, measure,
etc settings.
NOTE: If any of these functions moves the pointer to a new screen, that
screen will be drawn. If volume (sound) is set on, that screen will also be
audibly played for you. Any music sub-definitions on the screen will also be
played out. If you have long sub-definitions being played on the next screen,
you might be advised to set the sound off.
WARNING: If you have Num Lock set, you will not be able to use these
functions. Num Lock must be off.
WARNING: Whenever a previous screen is drawn, the hapless little beat
counter which has been diligently trying to draw in measures where appropriate
is wiped out. To reset the counter, you can either use the play/draw
(SHIFT/F1) or go-to-start-of-music (CTRL/Home) functions. Otherwise, the
measures will usually be incorrect whenever you enter Edit mode.
* Cursor right key. This key moves the pointer one note to the right. If
necessary, a new screen will be drawn to accommodate this.
* Cursor left key. This key moves the pointer one note to the left. If
necessary, a new screen will be drawn to accommodate this. NOTE: Do not use
the backspace key to do this. A backspace is the same as a CTRL/H and will
result in the playing of a very high C note.
* Home. This key moves the pointer to the beginning of the current screen.
* End. This key moves the pointer to the end of the current screen.
















-Page 11-
MUSIC2 program documentation


* Pg Up. This key moves the pointer to the end of the screen just prior to
the current one. The new screen is displayed for you.
* Pg Dn. This key moves the pointer to the beginning of the screen
immediately following the current one. The new screen is displayed for you.
* CTRL/Home. This key combination moves the pointer to the very beginning
of the music. A new screen is displayed for you.
* CTRL/End. This key combination moves the pointer to the very end of the
music. A new screen is displayed for you. If sound was turned off before
("V" or "v"), it is restored.

Changing notes:
Once the pointer has been moved to the desired location, you can change
the note at the pointer or insert notes before it. Note that the term "note"
here includes special notes like tempo indicators, measure settings, and music
fore/back-ground designations. It also includes repeat indicators.
The note-changing functions are described individually below.
NOTE: With the exception of the global change command, each of these
note-change functions wipe out the little beat counter which has been
diligently trying to draw in measures where appropriate. To reset the
counter, you can either use the play/draw (SHIFT/F1) or go-to-start-of-music
(CTRL/Home) functions. Otherwise, the measures will usually be incorrect
whenever you enter Edit mode.
WARNING: If you modify a repeat, delete the execution of that delete
(x##) before deleting the repeat begin [(##] or end [)] or the program will
crash when it is asked to play the sub-definition. If you re-compile the
music (SHIFT/F3) before trying to play it, the routine automatically deletes
any )## or x## calls lacking correct (## definitions as well as deleting any
x## call without both a proper (## and )## string.

* Overstrike. You can simply enter a note over an existing one and the new
note will replace the existing one. Once this is done, the pointer will move
one note to the left. This will result in two notes being displayed on the
screen. Only the newest note is retained. To see the screen cleaned up, you
could do something like Pg Up and then Pg Dn.

* Delete. You can delete the character under the pointer by pressing the
delete ("Del") key. The character will be blotted out and the pointer will
move one note to the left. When you draw this note again, it will be displayed
as an empty space until the music is compiled again (see below). The empty
space is treated like a special note by the routine and can be overstruck with
another character if desired.

* Insert. Insert ("Ins") allows you to enter any number of characters
which will be placed immediately before the note originally under the pointer.
When activated, the word "INSERT" will be printed at the bottom of the screen.
Initially, inserted characters will appear to overstrike the existing
characters until the pointer has to move to the next screen. To see the
screen cleaned up, you will have to leave Insert mode and do something like Pg
Up and then Pg Dn.














-Page 12-
MUSIC2 program documentation


While in Insert mode, you cannot do other editing functions, save the
music, load other music, play and/or draw the music, or compile the music.
Insert mode toggles. Pressing it once puts you into Insert mode.
Pressing it again takes you out of Insert mode.
NOTE: When you insert, the routine keeps track of what's where by adding
6 pointers in the array which contains your music. These take up memory and
slow down the execution of the program. In order to clear up the music array,
you have to compile your music (see below). If you try to insert notes around
an area in which you previously inserted other notes, the routine will
automatically re-compile the music before it lets you insert anything.
WARNING: Sometimes, entering Insert mode will cause the routine to
forget where it is in your music. If you find that the regular Pg Up and Pg
Dn functions fail to work as expected, try CTRL/Pg Up or CTRL/Pg Dn.

* Global changes. The most powerful and potentially dangerous MUSIC2 editor
function is the global change command. It allows you to change all instances
of a given note (such as a C) into something else (such as a B-). It also
allows you to change all instances of one note duration (such as music
staccato) into another (such as music legato).
To begin the global change command, enter "C" or "c". You will be asked
for the note or setting your want to change from. You may enter something
like "C", "B-", "ms", or "mn" here. You will then be asked what to change the
note or setting to. You can change it to a similar type of character (notes
can change into other notes, one note duration can change into another). Then
the routine changes all instances of that note or setting in the file and
tells you how many notes it actually changed.
WARNING: Just in case you do something wrong, you should always (re)save
your music before trying a global change.

Compiling:
It has already been stated that when you delete a note, the space
originally reserved for that note remains. Also, when you insert one or more
notes, 6 special indexing notes are created. Thus whenever you insert or
delete in this routine, wasted space is created and the routine has to take up
time dealing with the deleted notes and branching. To clean up the space, you
must compile the music.
In order to compile the music, enter SHIFT/F3. A line on the screen will
show you how many elements there were in the music array (roughly
corresponding to the number of notes) before compilation and then you will be
told how many elements there are after.
After compilation, you will be moved to the end of your
music (a CTRL/End is performed) and, if previously turned off, sound ("V" or
"v") is restored.




















-Page 13-
MUSIC2 program documentation


THE MUSIC2 SCREEN DISPLAY

Except for some special menus, the MUSIC2 screen display remains fairly
constant. The screen consists of a maximum of 12 lines of text, 12 lines of
music, and 1 blank line. A fully utilized screen is shown below. You will
never see a screen exactly like this one but it gives you an idea of what's
possible.
---rule--- 12345678 1 2345678 2 2345678 3 2345678 4 ---rule---
lines: lines:
1 Tempo: t120 Note duration: mn 1
2 Note length: 4 Fore/back-ground: mb 2
3 3
4 4
5 t120 5
6 mb 6
7-18 (bass and treble clefs) 7-18
19 19
20 (0 0) (1 1) 20
21 x0 x0x1 21
22 INSERT Compiling Space=23456 EDIT 22
23 121^140 Elements (notes):1003 Sound off 23
24 TITLE:
Homeward Bound' by Paul Simon 24
25 * 25
---rule--- 12345678 1 2345678 2 2345678 3 2345678 4 ---rule---
The first four lines of the display will sometimes offer prompts or give
error messages. More normally, they will show the default tempo, note
duration, note length, and fore/back-ground.
Line 5 shows that the tempo was set. This line appears only where the
tempo is initially set or when it is changed.
Line 6 shows that the music fore/back-ground was set, This line appears
only when ground is initially set or when it is changed.
Line 20 shows the beginning and end of each musical sub-definition.
Line 21 shows when a sub-definition is called for.
Line 22 gives an often-changing status line. "INSERT" appears when
you're in Insert mode. "EDIT" appears when you're in the Editor mode.
"Compiling" indicates that the music is being compiled. The "Space="
reference appears when the routine is trying to consolidate internal-PC space
(through the FRE("a") command).
Line 23 shows what portion of the music array is currently being viewed.
This notice is given only when you're in the Editor mode and have chosen to
move the pointer to a prior screen. The "Elements (notes)" reference appears
during compiling and should appear twice, the second time showing some
reduction in the number of notes. "Sound on" or "Sound off" appears when you
pick the sound on/off option and disappears whenever you pick another screen.
Line 24 gives the title of the composition you're working on.
Line 25 has a flashing note sign which indicates that the routine is
patiently waiting for you to do something.
















-Page 14-
MUSIC2 program documentation


HOW THE MUSIC IS STORED

In case you need to change the stored music files, data is stored in this
program in the following manner:
* The first record has the variables DATE$,TIME$,TITLE$,CUREND, MAXNOTES,
and MAXSUBDEF where CUREND=how many notes are in music, MAXNOTES=maximum
number of notes allowed (1000), and MAXSUBDEF= maximum number of repeats in
the piece (10).
* The second and the next CUREND records contain strings which determine
what's played.
For normal notes or rests (pauses), each string begins with the letter
"m". Their format is as follows:
--123456789--cols
mno3B-. 4
where columns:
1-2 : "mn" (music normal), "ml" (music legato), or "ms" (music staccato)
3-4 : octave (o0-o6--only o1-o5 exist in routine)
5 : note ("A"-"G" or "P" [pause])
6 : "-" if flat note, blank otherwise
7 : "." if dotted note, blank otherwise
8-9 : length of the note (" 1", " 2", " 4", " 8", "16")
This format is pretty much standard for the PLAY command so any string
which begins with "m" can be played directly.
Non-note/rest strings are called "special notes" and begin with "x".
None can be played directly although the x-m and x-t strings can be played by
specifying MID$(P$(i),3). The format for special notes is as follows:
x-b#/# set time (e.g. 4/4 or 2/4) (default=4/4)
x-mb play music in background (default, vs. x-mf)
x-mf play music in foreground
x-t### set music tempo as ### (default=t120)
x-(## begin repeat ## (routine figures which one)
x-)## end repeat ## (routine figures which one)
x-x## play repeat segment numbered ##
x-*#### goto string element ####,
element referred to has corresponding x-*#### back here
(null) deleted note
When the music is compiled (SHIFT/F3), null strings are deleted, all goto
references (x-*####) are eliminated as the array is reconstructed, and all x-
(##, x-)##, and x-x## strings are re-computed.
The x-(##, x-)##, and x-x## commands were used instead of the PLAY "X
string" commands in order to allow unlimited lengths for the repeats, and to
allow easier definitions of the strings to be repeated.





















-Page 15-
MUSIC2 program documentation


CHANGES BETWEEN ORIGINAL MUSIC PACKAGE AND MUSIC2

* All of the features marked with an asterisk in the table of contents
are new to MUSIC2. Most of the other functions are now invoked by different
keystrokes.
* Music is now entered as if the PC has a (somewhat limited) piano
keyboard. Before, you had to move the cursor up and down the clefs.
* You can no longer designate keys. Before, you could fill in flats and
sharps in the margins and all notes would become flatted or sharped as per
your instructions. Since you enter sharps and flats directly, that feature
became unnecessary.
* The range of playable notes has increased by several octaves.
* Measures are drawn as guides now. Previously, measures had to be
obeyed (you couldn't fit a quarter note in a measure that had room for only an
eighth note).
* Default note lengths can be specified.
* The routine, now compiled, is much quicker to run.
* Error recovery has been improved.
* Instructions and documentation have been vastly expanded.
* The files are stored differently now so you won't be able to use a data
file created by the old version of the package.


 December 7, 2017  Add comments

Leave a Reply