home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
C!T
/
C!T12_93
/
MODPLAY
/
MP.DOC
< prev
next >
Wrap
Text File
|
1991-07-26
|
21KB
|
499 lines
_ __ _ __ _ ,
) ) _// / ) ' ) / Amiga module player
M O D /--' / /--/ / / for a 10Mhz or faster
/ /___ / (_ (__/_ IBM compatible PC
//
(/ (C) Mark J Cox 1991
VERSION 1.35
____________________________________________________________________________
Contents:
o What are modules
o How to use MODPLAY
o How to get modules & contact author
and o How to make a D/A converter for about ONE POUND!
that works with MODPLAY, PLAY and other software
o Questions and Answer session
____________________________________________________________________________
Quick Guide: If you are like me and don't want to read all the
documentation before playing with the program, type:
mp /i
or mp /a/i If your machine is 10Mhz - 12Mhz
____________________________________________________________________________
Quick Guide to changes:
** Now supports playing from ZIP's and LHZ's as well as
shelling to DOS. Just create an archive with one file
in it - the file being the .MOD file and make sure that
somewhere on your path there is a copy of PKUNZIP and LHA
(or batch files that run similar programs).
** If your video card supports text modes such as 25*132,
44*132, 60*132 or just about any other text mode then enter
this mode (using the utility supplied with your card) and
MODPLAY will take full advantage of it.
** Two programs are in the archive
MP.COM and
MP128.COM
** Both these programs are identical except the second will
play MOD's that have samples >64k in them. MP128.COM is
still being tested so I recommend using MP.COM for your
normal modules. MP128.COM needs a processor running at
at least 16MHz. (Soon MP/MP128 will be one program)
** WILL NOT WORK WITH QEMM OR EMM386. IF YOU HAVE ANY
EMS DRIVER LOADED PLEASE DISABLE IT BEFORE USING MODPLAY!
(I've just bought a 386 so I should be able to fix this
soon)
____________________________________________________________________________
Introduction
------------
Modplay allows you to play (most) Amiga soundtracker/noisetracker files
on a PC (10Mhz or faster clock speed). Any CGA/MGA/HERC or better
display is needed to get a graphical display when playing, and the
display can be turned off if required. MODPLAY detects automatically
if a module is corrupt, and detects if it is a 15 or 31 instrument module.
What are Modules?
-----------------
A module consists of 15 (or 31) sampled instruments and a four channel
music track. By playing the instruments at different pitches a
soundtrack lasting many minutes can be produced. The PC speaker is not
really up to handling modules, since in total we have a 10 bit sample
to be played, and the speaker can only handle 5 (with difficulty!). A
D/A converter gives 8 and the stereo version gives effectively 9. The
output sounds OK through a good sized PC speaker, the cheap piezo
devices found in some computers including laptops are not really
designed to cope.
Implementation:
---------------
MODPLAY implements all Amiga effects such as volume sliding, vibrato etc.
Instructions:
-------------
There are two ways of using MODPLAY - the first from the command line and
the second in 'interactive mode'
Command Line:
-------------
From the command line a module can be played through any of the output
devices with or without a moving graph display. The format is
MP [/q] [/0..6] [/a..c] filename [.MOD]
or to play multiple modules
MP [/q] [/0..6] [/a..c] filespec
Items in [ ] are optional. The /q if present tells MODPLAY not to
display any text and so the module will play without disturbing the
text display. (You could use this in a game's title screen written
in C or Basic, by doing a system or shell command - MODPLAY exits when
a key is pressed). The /number tells MODPLAY what hardware to play
the module through. The filename can contain wildcard characters
(*,?), so MODPLAY * would be valid and would play all the *.MOD files
in the current directory one after the other. Playback of a sequence
of files can be aborted by pressing ESCape two or three times in rapid
sucession.
/0 is the PC Speaker
/1 is an D/A converter on printer port 1
/2 is on printer port 2
/3 is 2 D/A converters, one on port1 the other on port2 (gives stereo)
/4 is 2 D/A converters as above but giving mono.
/5 is a D/A converter on printer port 1 (thats on a video card)
/6 is a prototype board
/s plays through a Soundblaster board installed at base address:
/s1 210
/s2 220
/s3 230
/s4 240
/s5 250
/s6 260
(These are explained in more detail later on).
/a should be used if your computer crashes when playing tunes, it
decreases the rate of playing samples - decreasing the quality
noticably through the speaker, but should mean 10Mhz-12Mhz machines
can cope.
/b This is the default mixing speed designed for a 12MHz PC
/c Can be used with machines running at 25MHz or faster and provides
a slightly better output to the speaker (not really noticable)
Playing is stopped by pressing *any* key, or when the module is finished
Modules that loop at the end, or jump backwards are stopped so they
will only play once.
There are three special keys, described in the next section that can
be used to whiz through a module like a CD player.
Interactive:
------------
MP /i will bring up a display menu screen - help on all key presses
is available by pressing F1. From this screen you can change
directory, change drive or play one or more modules.
The commands allowed are:
Basic:
Cursor Keys Move the highlight bar together with the 'PgUp',
'PgDn', 'Home' and 'End' keys.
<SPACE> This will play the current module highlighted, or change
to the directory or drive hightlighted
<ESC> Quits modplay
<c> Steps through the allowed output devices
<!> Shells to DOS
Advanced:
<t> Tags the currently highlighted module (displays a "+")
<u> Untags the module if already tagged
<T> Tags all modules in directory
<U> Untags all modules in directory
<p> Plays all tagged modules automatically
<s> Takes you into the Sample sub-menu screen
Sample Sub-menu:
From here you can look at the samples that make up the module - there
are a few special keys that perform various functions that are not
fully tested and are provided for users that know what they are
doing (i.e. not bomb proof input routines!)
<p> Plays the sample highlighted
<m> Plays the whole module
<w> Prompts for a filename and then saves the sample to disk
<r> Reads a new sample into the old slot.
Special Keys:
-------------
During any playback, pressing the left arrow key will slow the music
down, the right arrow key will speed it up and the down arrow key
restores to default speed.
Archived Modules:
-----------------
Using a popular archiving utility normally saves about 30%
Source of Modules:
------------------
There are many sources or BBS's and via ftp. Modules usually come archived
in LZH form, these can be unpacked with the LHARC program which can be
found on most MSDOS BBS's. The files will usually unpack as 'mod.something'
and MSDOS cuts them short to 'mod.SOM' and it is best to rename these to
'something.mod' so that MODPLAY will automatically detect them.
Speaker Routines:
-----------------
The PC Speaker routines I used in PLAY and RESPLAY were not good enough for
MODPLAY. PLAY and RESPLAY worked by linearly assigning the 64 different
waves the speaker could produce to the 256 levels of sample. Most of
MODPLAYs information is in the middle 30 or so levels, as its not very
often that all the four channels are at maximum volume together. So I
have designed a new logarithmic table - this means that the sound will be
a little wierd from the speaker, but it is better than it was with the
PLAY algorithm. (noticable only on speech samples)
Supported Hardware:
-------------------
MODPLAY will play modules through the PC Speaker as mentioned above, through
an D to A converter on any of the three possible parallel ports, in stereo
if you have an D to A converter on both LPT1 and LPT2 (this sounds really
good) and also through a prototype board (currently in development by
a friend - stereo replay and sampling).
How to make a D/A converter for five pounds:
--------------------------------------------
A simple circuit for HiFi quality sound needs only a few components (and
this circuit will work with lots and lots of other software). A diagram
is enclosed in file MP.C00, and can be printed on any Postscript
compatible printer.
You need:
IC1 a ZN426E (about 3 pounds)
C1 a 10micro-farad electrolytic capacitor (10V or greater)
C2 a 4.7micro-farad electrolytic capacitor (10V or greater)
R1 a 380ohm resistor (any sort)
CON1 a phono socket
CON2 a 25 way male D-type connector (for your parrallel port)
A bit of 10 way cable - or 10 short wires.
1 roll of double sided sticky tape (how'd that get there?)
A +5v supply
Connect the following pins of IC1 to the numbered pins of CON2 (should
be numbered on the socket).
IC1 - CON2 IC1 - CON2
3 9 12 5
2 8 11 4
1 7 10 3
13 6 9 2
Connect 0v of your power supply to pin 25 of CON2, the ground connection
of CON1, pin 7 of IC1 and also the -ve side of C2.
Connect +5v of your power supply to pin 14 IC1 and one end of the resistor
IC1 pin 5 and 6 are joined together and also to the +ve side of C2 and the
other end of the resistor.
IC1 pin 4 is connected to the +ve side of C1, the -ve side being connected
to the centre connection of the phono socket CON1.
Every pin except pin 8 of IC1 should now be connected somewhere. Connect
a +5v power supply, attach to a parallel port and plug in your amplifier
to the phono socket.
Getting a +5v power supply
--------------------------
Catalogues such as MAPLIN (uk) provide simple circuits for obtaining
a +5v power supply (it only has to be 100mA maximum). Alternatively
you could tap +5v off the keyboard connector or use 3 1.5volt
batteries (or even 4 1.5volt batteries with two diodes in series to
drop the voltage). In fact, anything that produces a voltage in the
range 4.5 - 5.5 volts. (in fact you can even tap +5v from the game
port)
How to make an even cheaper D/A
-------------------------------
For the price of 20 1% resistors and a plug, with no power supply
needed you can make a D/A converter that sounds close to the IC
one above (it seems only the UK can get a Plessey ZN426E)
You need one plug for your amp, one for your parallel port and
9 20k and 9 10K resistors
Use 1% resistors if possible - try to get 20k rather than 22k
Printer Port:
signal pin 20k 20k
____ ____
D0 2 >---|____|---+---|____|---+
| |
+-+ --- 0v
| | 10k
20k +-+
____ |
D1 3 >---|____|---+
|
+-+
| | 10k
20k +-+
____ |
D2 4 >---|____|---+
|
+-+
| | 10k
20k +-+
____ |
D3 5 >---|____|---+
|
+-+
| | 10k
20k +-+
____ |
D4 6 >---|____|---+
|
+-+
| | 10k
20k +-+
____ |
D5 7 >---|____|---+
|
+-+
| | 10k
20k +-+
____ |
D6 8 >---|____|---+
|
+-+
| | 10k
20k +-+
____ |
D7 9 >---|____|---+
|
+-+
| | 10k
+-+
| | |
+-------------| |--------> To AMPLIFIER
| | |100nF
+-+
| | 10k
+-+
|
GND 20 >-------------+------------------------>
|
--- 0v
Thanks to Harry Stox for the above circuit.
Freeware:
---------
This software is Freeware - that means that there is no registration fee,
you can copy this software, give it to anyone, and use it for anything
(subject to the license at the end of this document). If you like this
software, and would like the author to continue writing- a gift would be
appreciated. For gifts of 10 UK pounds or greater I will send a package
of the full circuit diagrams for sampling as well as the playback mentioned
here, printed documentation for PLAY, RESPLAY and MODPLAY and two disks
with Samples and the latest versions of the programs.
*** Was free, Is free, Always free ***
Credits:
--------
Many thanks must go to Mahoney & Kaktus for their Amiga assembler
noisetracker replay routine which provided much inspiration and
help with the module format and effects. And the numerous number
of people (aproaching three figures) that have contributed by giving
bug fixes and ideas for future developments.
Over 60 people have given hints and tip for MODPLAY - special thanks
to Norman Lin (Modedit) who pointed out a couple of mistakes in my
program, Francois Jalbert for spending hours wading through the source
code in hunt of an elusive bug and Derek Beacroft for providing the
much needed Soundblaster programming information. (even though I
still can't get it to work).
_____________________________________________________________________________
Copyright/License/Warranty
--------------------------
This document and the program files MP.COM, MP128.COM ("the software")
are copyrighted by the author. The copyright owner hereby licenses
you to: use the software; make as many copies of the program
and documentation as you wish; give such copies to anyone; and
distribute the software and documentation via electronic means.
There is no charge for any of the above.
You are specifically prohibited from charging, or requesting
donations, for any such copies, however made; and from
distributing the software and/or documentation with commercial
products without prior permission.
NO FOR-PROFIT ORGANIZATION IS AUTHORIZED TO CHARGE ANY AMOUNT
FOR DISTRIBUTION OF COPIES OF THE SOFTWARE OR DOCUMENTATION,
OR TO INCLUDE COPIES OF THE SOFTWARE OR DOCUMENTATION WITH SALES
OF THEIR OWN PRODUCTS.
THIS INCLUDES A SPECIFIC PROHIBITION AGAINST FOR-PROFIT
ORGANIZATIONS DISTRIBUTING THE SOFTWARE, EITHER ALONE OR WITH
OTHER SOFTWARE, AND CHARGING A "HANDLING" OR "MATERIALS" FEE OR
ANY OTHER SUCH FEE FOR THE DISTRIBUTION. NO FOR-PROFIT
ORGANIZATION IS AUTHORIZED TO INCLUDE THE SOFTWARE ON ANY MEDIA
FOR WHICH MONEY IS CHARGED WITHOUT PRIOR PERMISSION FROM THE
COPYRIGHT OWNER.
* No copy of the software may be distributed or given away without *
* this document; and neither the program or document may be altered *
* in any way, or reverse-engineered by disassembly or other method. *
There is no warranty of any kind, and the copyright owner is not
liable for damages of any kind. By using this free software,
you agree to this.
The software and documentation are:
Copyright (C) 1990/1991 Mark J Cox
All Trade Marks and Registered Names Acknowledged.
_____________________________________________________________________________
Example Questions
-----------------
These are a selection of comments/suggestions and questions made recently:
Q. Modplay crashes.
A. Try the /a switch, if it still persists then it probably means you
have some high memory drivers that don't like MODPLAY - let me know
your system config so I can try to solve it
Q. I keep getting 'Divide Error' and my computer locks up
A. Some modules I have seen are corrupt - there is no way MODPLAY can
tell and there is no time to do any checks.
Q. It sounds like my computer is about to explode.
A. You have a small piezo speaker - why not build a resistor D/A as
explained above or put a nice sized speaker (Radio Shack/Tandy) in
instead.
Q. Can I edit modules?
A. Not with MODPLAY - use MODEDIT written by Norman Lin that uses
MODRES a resident version of MODPLAY
Q. Ever thought of supporting 8 channels like 'Startreker'?
A. Yeah, but you would need a 386 33M to run it and since I don't
have one to design the program and as there aren't many 8 track
modules.
Q. I wrote to you yesterday and haven't had a reply
A. I get a large volume of mail about MODPLAY - I aim to reply within
a week, two at maximum
Q. I can't find this ZN426E chip
A. Try MAPLINS (if you are in the UK) otherwise you could always
substitute any D/A or use the resistor version
Q. I really like MODPLAY
A. A gift would be appreciated :-)
Q. Hey, I can't use BOARDMAKER any more
A. I bet you played a module when you had your DONGLE still plugged in!
Don't you just hate dongles? All programs that play Modules and
samples to a printer port will blow a dongle if it happens to be on
that port at the time. Why not write to the manufacturer and
complain?
Q. "Speech on the IBM PC is not just a case of 'yet another Lotus-1-2-3'
but a basic piece of innovative software which is being incorporated
into several commercial products at this very moment. Releasing an
un-supported non-commercial product of this nature is a highly
irresponsible act which we cannot stand by and watch without doing our
utmost to prevent" - A Well known company about the PLAY program.
A. (I'll let you make your own answer up)
__________________________________________________________________________
Address:
--------
Mark J Cox Electronic Mail (from August 1st 1991)
29 Lundie Close (JANET) m.j.h.cox@uk.ac.bradford
Stenson Fields m.j.h.cox@bradford.ac.uk (non UK)
Derby (NETMAIL) Post a message in PLAY SUPPORT on
DE2 3AN Kingdom of Greyhawk BBS
(+44 332 756414)
(Or if before June 1992, 17 Kirkburn Place, Bradford, W Yorks BD7 2BZ
is a bit quicker)
All comments on PLAY, RESPLAY, MODPLAY or future software are welcomed!
Any company need an PC assembler programmer?