For 8-Bit software
Mix-ed is a program to load in, edit,
play, alter and save mixes.
RunBld is a program to build a machine
code mix player routine to play the
mix.
For both programs PAGE is best at &E00.
However it will be alright elsewhere.
If using PAGE elsewhere, the only
problem is likely to occur when using
the example data lines I include.
The main menu from which you no doubt
loaded this help has a selection of
mixes for you to listen to. The routine
which runs the sample was written using
RunBld, some of the samples were edited
using Mix-ed.
Mix-ed presents you with a menu, the
options from which are chosen by a
single keypress highlighted in brackets
(H)istory. Will display a history of
load actions. When a
program is loaded, the
start and end addresses in
memory to where it was
loaded are remembered. Up
to 55 loads are remembered
After that, the memory is
reset and a beep is
sounded.
(L)oad file from &<location>.
A file will be loaded into
memory from the location
displayed. This location
can be changed by the
options listed below.
(S)ave file from (B) to (E).
A file is saved using the
memory locations specified
by BEGIN and END. It is
saved with the reload
address set to wherever
HIMEM is.
(B)egin at &<location>.
Change the load and play
start address. This figure
will be used to start
saves from and to start
playing from using option
(P). Two keypresses are
required. Enter the MSB
of the number only, ie for
&6700 just press 6 then 7.
Remember to check that you
do not load data to below
HIMEM.
(E)nd at. &<location>.
Change the load and play
end address. This figure
will be used to end saves
at and to finish playing
at. Again, enter only the
MSB.
(R)ate &<number>.
Change the speed that the
mix is played at. 0 is
slow. 1 is fastest. &FF is
slowest. &28 is about the
usual. The program will
allow you to select a rate
in the range of &19 to &80
although any rate between
0 and &FF would work.
(Z) Decrease begin address by &100
(X) Increase begin address by &100
(<) Decrease end address by &100
(>) Increase end address by &100
(P)lay mix.
Plays mix from specified
begin to end addresses.
(*) Oscli.
Issue a MOS command.
Useful for changing filing
systems etc.
It is possible to select a short
section of sound, save it back to disc,
do this with other short sections from
other samples, then load them all back
in into different areas of memory by
the use of the Begin option. Then
resave the whole thing. You can then
load the new mix into RunBld. To play
each section you must make a note of
the start and end addresses of the
separate sections whilst using Mix-ed.
After saving your own mix, you can then
run it directly without using Mix-ed.
(You can also use this program to build
run routines for any other mix ).
RunBld assembles a run routine for
the mix. There are three things
that the run routine needs to know
before it can play a mix. The Most
Significant Byte ( MSB ) of the
start and finish address of the
section of memory to be played,
and the rate at which it is to be
played. (The MSB of &1900 is &19).
At the end of RunBld (line 260
onwards) are data lines. You
write these data lines, when
the play option is chosen the
program reads the data to find
out the three values it needs
to play each section of mix.
The data is entered in blocks
of three. The first number is
the MSB of the start address.
The second number is the MSB
of the end address. The third
number is the speed at which
the section is played.
There can be a number of
repeats of blocks. The start
and end addresses are
determined by you when
listening to the mix using
Mix-ed.
You are presented with a menu, the
options are as follows:
(L)oad a mix
Load a mix starting at HIMEM.
Please see the note about
HIMEM being at different
values.
(S)ave a mix player
Save the mix player that you
have assembled from &900
onwards.
(P)lay the mix
Plays the mix using the
addresses that you have put
into the DATA statements at
the end of the program.
(I)load in the data statements that you
have previously saved. The data needed
to tell the mix player what to play is
stored in the lines from 260 onwards.
It is possible to save just these lines
to disc. I have included example data
lines in directory D. Before loading a
set of lines in, all the line numbers
in the program from 260 onwards are
deleted first, this stops any mixing of
lines.
(O) Spool the lines containing the data
statements to disc. Lines 260 onwards
are the lines which hold the
information the mix player needs. After
entering a file name, the lines are
saved to disc. The data lines from the
examples are in directory D, they were
saved using this option.
(*) Enter an oscli command.
Escape to list the data statements.
The Data statements are read in blocks
of three. The first number of the block
is the MSB of the start address. The
second number of the block is the MSB
of the end address. The third number of
the block is the rate at which the mix
is played, 1 is the fastest &FF is the
slowest, &10 to &20 is about the usual
speed. The data is terminated by three
zeros. However only the first zero is
needed, if the second zero is changed
to 1, then the mix will be played in an
endless loop. If the third zero is
changed to 1, then the mix will be also
played backwards. Remember that the
start address must then be higher than
the end address!
Here are a couple of examples of the
data lines:
DATA&19,&80,&10,0,0,0
Will play the whole of the
mix in memory (&1900 to
&8000) at a rate of &10.
DATA&19,&80,&10,&19,&80,&10,0,0,0
Will do the same again but
twice.
DATA&30,&40,&40,0,0,0
will play a small section
of the mix slowly.
DATA&80,&19,&20,0,0,1
will play the whole of
memory but backwards note
that the start address must
be higher than the end
address.
DATA&80,&19,&20,0,1,1
will play the whole of
memory, backwards and
forever.
Once you have saved the mix using
Mix-ed and noted the start and end
addresses of each section in the mix,
run RunBld. Load in the mix. Escape,
list the program and then change the
data statements, each start and finish
address followed by the speed it is to
be played at. Look at some of the
examples in directory D. Load in any of
these programs using the (I) option
from RunBld, they are the data
statements that I wrote to build the
mix player examples. Run the program
again and listen to the mix by pressing
P. When you are happy with the sound,
use the save mix runner option (S).
After naming the file, in future all
you have to do is *LOAD the mix, then
*RUN the mix runner. If in doubt,
examine the menu to see how I have done
that.
When loading a mix into RunBld, HIMEM
is the address that it will be loaded
to. This is to avoid the mix
overwriting the program. Usually HIMEM
will be at the same address for both
Mix#ed and RunBld and no problem will
occur. However, if you are using a
model B with PAGE at &1900 and load in
the example mixes, you will find that
if you then load in the example data
lines that I include on the disc, that
they will not run the mix as desired.
This is because the mix will have been
re-loaded from a different address and
therefore you will need to alter the
data statements, adding an offset. The
mix should run from &1900. If you are
running it from &2400 (which is where
it will be if page is at &1900) every
first and second data statement needs
&B adding to it. The third value
(pitch) does not need altering.
One way to do this without spending
ages converting hex numbers is to
change line 160 of MixBld to:
160P%=P%+20:[OPTl%:.start:]:REPEAT:READ
a%,b%,c%:IF a%<>0:a%=a%+&B:b%=b%+&B:[:O
PTl%:LDA#a%:STA&75:LDA#b%:STA&76:LDA#c%
:STA&74:JSR&900:]
Which will simply add the desired
offset to the data as it is read in,
thus allowing the data examples I
include to run correctly.
Another solution is to *LOAD the mix in
before CHAINing MixBld. However, the
first bit of the mix will then be
corrupted.