home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
519b.lha
/
ZSound_v1.20
/
ZSound1.20.TXT.pp
/
ZSound1.20.TXT
Wrap
Text File
|
1991-06-09
|
34KB
|
747 lines
"Z Sound"
User Documentation
###########
#/ /#
####/ /##
###/ /###
##/ /####
#/ /#
########### tm
Applies to ZSound 1.20
Conceived, designed, written and
Copyright © 1991 by Gregg M. Giles
05.21.1991
***************************************************************************
*** Purpose ***
***************************************************************************
ZSound enables you to play any SoundTracker (15 and 31 instruments) and
NoiseTracker music modules. It can be used as a stand-alone module player,
or it can be used as part of a larger multimedia presentation. It was
designed to be flexible and polite. It will not hog your memory, and can
be customized in many different ways to conform to your needs and hardware.
For a complete list of improvements since the last version of this program,
see the section "Revisions & Planned Enhancements".
***************************************************************************
*** Features ***
***************************************************************************
ZSound has been designed with two major intents:
(1) To be a stand-alone music player
(2) To be usable as part of an larger multimedia presentation
In either of these endeavors, ZSound can provide the following options:
* Plays SoundTracker (15 and 31 instrument) and NoiseTracker music
modules.
* Works in a multitasking environment.
* Works on systems with limited memory. (This program has successfully
played a 410k SoundTracker module on an Amiga with only 512k of Chip
memory and no Fast memory. Not even Module Master 1.7 can do that!)
* Works with the original Amiga custom chip set.
* Written to conform to Commodore's programming guidelines, so it
will work on all Amigas all the time.
As a stand-alone music player, this program has the following specialized
features and capabilities (using the window environment):
* An optional user-selectable full featured window display, complete
with control panel gadgets which give you control of the module being
played. Gadgets include: Play, Pause, Stop, Loop, Speed, and Filter.
* An LED-like display panel that show what the status of the player is,
as well as what settings are currently being used. Display information
includes player status, filter status, playback speed, and song
looping status.
* Switch between NTSC (North American) and PAL (European) playback
speeds on the fly.
* Toggle the audio high frequency filter on and off on the fly.
* Standard Amiga window gadgets allow depth selection and window closing.
The Amiga is a presentation and multimedia computer, and this program can
help you with such presentations. The things which make this program ideal
for such a purpose are (using the CLI/Shell options):
* Usable with AmigaVision.
* Run as a background task to provide slideshow and presentation music.
* Will not bog down the CPU when used to provide background music. This
frees up your system for the actual presentation.
* Option to shut off any window or text screen output.
* Option to toggle the high frequency audio filter on and off.
* Option to specify whether or not the song should be played
continuously (looping).
* Option to specify playback speed: NTSC or PAL.
* Can be run from an AmigaDOS script. Error codes are returned by the
program, enabling you to plan ahead for any unpleasant suprises when
you need them the least.
***************************************************************************
*** Requirements ***
***************************************************************************
In order to use ZSound, you must have the following:
* An Amiga computer
* Workbench 1.3
* The ZSound executable file (supplied)
* Module.library file (supplied)
* At least one SoundTracker or NoiseTracker music module (not supplied)
***************************************************************************
*** Installation ***
***************************************************************************
Before this program can be used at all, it is imperative that you place the
included file "Module.Library" into your "libs" directory on your Workbench
disk. To do this on any Amiga system, issue the following command:
1> copy module.library libs:
And press return. Users with one disk drive may be prompted to insert their
Workbench disk and switch the write protect tab on the disk. Please do so,
or the "module.library" cannot be installed. Hard disk users should have no
trouble with the above setup.
If you would like to add this program and its documentation to your
Workbench disk, issue the next command and press return:
1> copy ZSound#? c:
Again, single drive users may be prompted to insert their Workbench disk
and switch its write protect tab. The program is now properly installed.
***************************************************************************
*** Usage ***
***************************************************************************
ZSound is not currently executable from the Workbench, so it must be used
from the Amiga Command Line Interface (CLI) or a Shell window. The usage
for this program is:
ZSound [<Module Name>] [NTSC|PAL] [Loop|NoLoop] [FilterToggle]
[NoText] [NoWindow] [Debug]
You can have this same information displayed at any time simply by running
the program with no arguments.
The argument [<Module Name>] can be the name of any valid SoundTracker or
NoiseTracker music module. (Full drive/paths may be used as part of a
module name. For more information, see the "Usage Examples" section.)
SoundTracker and NoiseTracker modules are generally identifiable by the
prefix "MOD." or suffix ".MOD". If you are unsure whether a file is a
module or not, try and play it with this program anyway. If it is not a
module, you will be told so, and if it is a module, it will be loaded into
memory.
***************************************************************************
*** Command Line Flags ***
***************************************************************************
The program makes use of command line "flags", also known as command line
"arguments", which will greatly enhance the program's utility and power.
The way which a SoundTracker module is played may be modified to suite
your tastes or needs. Flags are not case sensitive, but must be spelled
correctly to be understood by the program.
The current flags available are:
Flag Name : NTSC
Description: Enables playback of the module using the NTSC (National
Television Standards Committee) refresh speed of 60 Hz. This
option should be used by those in North America. The default
speed is NTSC. (To those using a PAL Amiga, using the NTSC
flag will have the effect of speeding up the playback speed
of a module.)
Flag Name : PAL
Description: Enables playback of the module using the PAL (Phase
Alternation Line) refresh speed of 50 Hz. This option should
be used by those in Europe and outside of North America. (To
those using an NTSC Amiga, using the PAL flag will have the
effect of slowing down the playback speed of a module.)
Flag Name : LOOP
Description: Enables the program to play the module continuosly and without
any interruption (that is, once the end of the song is reached,
playing will resume at the beginning of the song). When this
flag is used from the CLI in conjunction with the NOWINDOW
flag, the module will play forever and cannot be stopped (this
is intentional, as it permits modules to be looped continuously
as background music during a presentation).
Flag Name : NOLOOP
Description: Restricts the program to playing the module one time only. Once
the end of the song is reached, it will not be played again.
Flag Name : FILTERTOGGLE
Description: Will check the current state of the Amiga high frequency
audio filter and will change its state. This filter will
enable higher-frequency sounds to be played audibly by the
Amiga when turned off. When turned on, the filter will tone
down high-frequency sounds (ie: high pitch notes), and all
music sounds somewhat quieter. The high-frequency audio filter
is said to be "off" when the Amiga Power LED is either dimmed
or not lit at all. The filter is said be "on" when this LED
is at its brightest state.
Flag Name : NOTEXT
Description: Suppresses all normal output to the CLI. Error messages are
not suppressed, and will appear as normal if they occur.
(This flag is ideal for use in slideshows where text or
window output from any programs other than the presentation
program will just get in the way.) [This flag was previously
known as QUIET in versions 1.00 through 1.10 of this program.]
Flag Name : NOWINDOW
Description: Forbids the opening of the program's output window, and also
supresses all text output which would normally appear in the
window. (This flag is ideal for use in slideshows where
text or window output from any programs other than the
presentation program will just get in the way.)
Flag Name : DEBUG
Description: Used for debugging purposes only. The program will generate
information helpful for tracking down errors and ensuring
that the program works properly during debugging. This flag
has no use for the end-user and is intended for the author's
convenience only.
***************************************************************************
*** Default Settings ***
***************************************************************************
This program maintains a built-in list of default flag settings. What this
means is that the program will use these settings when the program is run,
unless the user tells the program to do otherwise. A user may modify one or
more of these settings (without disturbing any other settings) by using
command line flags.
The built-in default settings are:
Feature Default Change setting by
description: setting: using this flag:
-----------------------------------------------------
Playback speed NTSC NTSC or PAL
Audio filter toggle OFF FilterToggle
CLI/Shell text output ON NoText
Window output ON NoWindow
Module looping OFF Loop or NoLoop
Debugging information OFF Debug
***************************************************************************
*** Debugging ***
***************************************************************************
As mentioned earlier, the Debug flag is intended primarily for the use of
the programmer, and it does nothing more than display internal settings,
flags, and status messages. The typical user will have no use for Debug.
The arguments displayed are shown in formatted columns, as are the internal
program flags. Note that any redirection command line argument will not
appear as an argument when using the Debug flag; this occurs because the
redirection argument is intercepted by AmigaDOS before the program ever
receives it. As such, the following example may actually have five
arguments when issued in the command line, but when the program receives
it (after intercepted by AmigaDOS), it actually only has four:
Issued in the command line:
1> ZSound >RAM:TEXT Mod.Twin_Peaks FilterToggle Debug
Program receives the arguments as:
1> ZSound Mod.Twin_Peaks FilterToggle Debug
***************************************************************************
*** Usage Examples ***
***************************************************************************
The following examples are provided to help you make better understand the
features of this program. All examples assume that you possess a
SoundTracker music module called "Mod.Twin_Peaks". (This module is not
provided with the distibution archive of this program, and is used as an
example only. However, you may substitute the name of any module in its
place to yield identical results.)
Example: Load a module.
Command: ZSound Mod.Twin_Peaks
Notes : This example assumes that the module is in your current directory.
Since no command line arguments are supplied, the program will
automatically revert to using its built-in default settings.)
Example: Load a module located in a different directory.
Command: ZSound Music/Mod.Twin_Peaks
Notes : This example assumes that the module is in a subdirectory called
"Music". It is not necessary to change you current directory in
order to load a module located in a different directory. In fact,
the module need not even be on the same disk.
Example: Load a module located on a different disk.
Command: ZSound DF1:Music/Mod.Twin_Peaks
Notes : This example assumes that the module is on a disk in drive DF1:,
and that it is also located within a directory called "Music" on
that same disk.
Example: Load a module located on a hard disk.
Command: ZSound DH0:Music/Modules/Mod.Twin_Peaks
Notes : This example assumes you have a hard disk called "DH0:", and that
the module is located down inside of two directories (the first
being "Music", and the next down being "Modules".)
Example: Load a module using logical path names.
Command: ZSound Music:Mod.Twin_Peaks
Notes : This example assumes that you have created a logical device called
"Music:", and that the module is located within that logical
device. (For more information on logical devices, refer to the
AmigaDOS manual section dealing with the command "Assign".)
Example: Load a module, use the PAL playback speed.
Command: ZSound Mod.Twin_Peaks PAL
Notes : This example loads a module in the current directory, and changes
the program's playback speed to PAL. (Refer to the section "Command
Line Flags" under the flag "PAL".)
Example: Load a module, toggle the high frequency audio filter.
Command: ZSound Mod.Twin_Peaks FilterToggle
Notes : This example loads a module in the current directory, and toggles
the high frequency audio filter. (Refer to the flag "FilterToggle"
in the section "Command Line Flags".)
Example: Load a module, but do not display an output window.
Command: ZSound Mod.Twin_Peaks NoWindow
Notes : This example loads a module in the current directory and will not
open any output window. (Refer to the flag "NoWindow" in the
section "Command Line Flags".)
Example: Load a module, but do not display any text in the CLI or Shell.
Command: ZSound Mod.Twin_Peaks NoText
Notes : This example loads a module in the current directory and will not
display any kind of text output in the CLI or Shell from which it
was run. (Refer to the flag "NoText" in the section "Command Line
Flags".)
Example: Load a song in a logical device, use PAL playback speed, toggle
the high frequency audio filter, and suppress both window and
text output.
Command: ZSound Music:Mod.Twin_Peaks PAL FilterToggle NoText NoWindow
Notes : This example loads a module on the logical device "Music:",
changes the playback speed to PAL, toggles the audio filter, and
supresses all CLI and window output. (Refer to the flags "PAL",
"FilterToggle", "NoText" and "NoWindow" in the section "Command
Line Flags".)
***************************************************************************
*** Using The Control Window ***
***************************************************************************
This program gives you the option of using a window to control a music
module. This window will be opened by default. (To prevent the window
from opening, refer to the "NoWindow" flag in the "Command Line Flags"
section.)
Once opened, you are presented with a window in the middle of the screen.
You will see a small horizontal bar containing some information - this is
the "information display". In this small display are show the current
program settings and the status of the module. When run with no flags, the
information display should read:
+-------------------------------------+
| Stopped Loop Off Toggle Off NTSC |
+-------------------------------------+
^ ^ ^ ^
| | | |
Module status ----+ | | +---- Playback speed
| |
Loop status ----+ +---- Filter toggle status
The "Module status" may say any of the following possible things:
Status: Meaning:
-----------------------------------------------------------------
Loading The song specified is being loaded into memory
Playing The song which was loaded is currently being played
Paused The song which was played has been temporarily paused
Stopped The song in memory is not currently playing or paused
The "Loop status" can be either "On" or "Off". When "On", the song will
loop continuously until paused, stopped, or until the program is stopped
by clicking on the close window gadget.
The "Filter toggle status" can be either "On" or "Off". When "On", the
high frequency audio filter has been toggled. When "Off", it has not been
toggled.
The "Playback speed" can be either "NTSC" or "PAL". When "NTSC", then the
song is being played at a speed of 60 Hz (NTSC). When "PAL", then the song
is being played at a speed of 50 Hz. (See the flags "NTSC" and "PAL" in
the section "Command Line Flags" for more information on playback speeds.)
The grouping of gadgets below the information display is known as the
"control panel". It is with this control panel that you are able to make
the song pause, play, stop, and change any of the previously mentioned
information shown in the "information display". The gadgets are (from left
to right):
Gadget : Pause
Description: Two side-by-side vertical rectangles
Purpose : Pauses the module being played
Gadget : Play
Description: Triangle with its right-angle point facing right
Purpose : Plays the module in memory
Gadget : Stop
Description: Square
Purpose : Stops playing the module being played or paused
Gadget : Loop
Description: Arrow pointing to its own tail
Purpose : Plays the song in memory continuously until stopped or paused
Gadget : Speed
Description: Speedometer
Purpose : Toggles playback speed between NTSC and PAL
Gadget : Filter
Description: Lightbulb
Purpose : Toggles the high frequency audio filter on and off
The window also has the standard Amiga close-window gadget which will, when
clicked, stop playing the song in memory immediately and stop the program.
The standard Amiga window-depth gadgets are also present, which permit the
window to be pushed to the back of the Workbench screen or brought to the
front of it.
***************************************************************************
*** Multitasking ***
***************************************************************************
To make this program multitask, it is necessary to use the AmigaDOS "Run"
command (not supplied with this program). As an example, if you desire to
run some music in the background:
1> run ZSound Mod.Twin_Peaks
While this song is playing, you will retain full control of your Amiga.
***************************************************************************
*** Output Redirection ***
***************************************************************************
The text output generated by this program can be redirected into a text
file or to a printer. This does not include any text which appears within
the program's window, only text which is displayed within the CLI window
which the program was run from. This may be of limited use, but it is
possible.
To redirect the text output of the program to a text file, use the
following format (any combination of flags may be used):
1> ZSound >TextFile.txt Mod.Twin_Peaks
Or even:
1> run ZSound >TextFile.txt Mod.Twin_Peaks
Redirecting text output to a printer is just as simple (example makes
use of the debugging flag):
1> ZSound >PRT: Mod.Twin_Peaks Debug
***************************************************************************
*** Script File Usage ***
***************************************************************************
This program can also be used within an AmigaDOS script file. Return codes
have been provided to accomodate the AmigaDOS "FailAt" and "Quit" commands.
The following are all possible return codes which can be issued:
0: No errors occured.
5: A non-fatal error occured (warning only); built-in defaults and
error checking automatically resolved the problem. An error
message will appear telling you exactly what happened and how the
problem was resolved. Be sure to contact the author in the event
of such an error.
20: Fatal error. Something occured which prevented the program from
working properly; the program will display a more explanatory
error message to tell you exactly what went wrong.
An example script file using this program is as follows:
failat 20
run ZSound Music:Mod.TwinPeaks FilterToggle NoWindow NoText
type Texts:Credits.TXT
The script file will cease execution immediately whenever any command or
program returns a returncode value of 20 or more. The music is run as a
background task, and a text file is immediately typed to the screen with
the AmigaDOS "Type" command.
For more information on AmigaDOS script files, refer to your Amiga manual.
***************************************************************************
*** Troubleshooting ***
***************************************************************************
It is possible that you will encounter an error in some form or another
during your use of this program. All error messages generated by the
program are listed and explained below.
Message : "Error: can't open Intuition.library."
Explanation: The program was unable to access and use a part of the Amiga
Kickstart ROM chip. This function, the Intuition.library,
enables the use of a windowing environment on the Amiga.
What to do : This is a hardware problem. Reset your machine after you have
stopped all other processes and try to run the program again.
If this does not work, contact your Amiga dealer or an
authorized repair center for help.
Message : "Error: can't open Module.library."
Explanation: The program cannot open the file "Module.library", which it
needs in order to play any SoundTracker or NoiseTracker music
modules.
What to do : Copy the file "module.library" into your LIBS: directory. If
you do not have this file, check the original distribution
archive which contained this program. If it is not there,
contact the author in order to obtain a copy of this library.
Message : "Error: can't open main window."
Explanation: The program was unable to open a window which it uses for
data output.
What to do : Ensure that you are using a screen resolution of 640 wide or
greater (any screen height is acceptable). The program assumes
that you are using a screen resolution of 640x200 (the number
of colors is inconsequential). It is also possible that your
Amiga may not have enough available memory in order to open
the program's window - in this case, stop other processes
which are running and run this program again.
Message : "Error: can't put device lock on <ModuleName>."
Explanation: The program could not properly access the SoundTracker/
NoiseTracker module your specified. The program attempts to
put a "file lock" on the module before it attempts to load it
into memory or play it. (This is done to accomodate
multitasking situations where another application tries to
access the same module you are trying to load.)
What to do : Check to make sure that you spelled the name of the module
correctly. If you did, you are experiencing some kind of
multitasking conflict that the Amiga operating system cannot
handle (which is rare).
Message : "Error: can't load <ModuleName>."
Explanation: The program cannot find or load the module specified in the
location it looked for it at.
What to do : Ensure the module exists. It may be necessary to provide a
full path/name for the module. (See the Usage Examples
section of this documentation).
Message : "Error: out of memory."
Explanation: Your Amiga has run out of memory, and cannot sucessfully
run the program or module.
What to do : Add more memory to your Amiga.
Message : "Error: <ModuleName> isn't a SoundTracker or NoiseTracker
module."
Explanation: The program tried to load the file it was told to load, but
it was not a SoundTracker or NoiseTracker module file.
What to do : As there are variations of the SoundTracker and NoiseTracker
module formats, it is possible that you have tried to load a
module which this program does not yet support. If this is
the case, contact the author immediately (include a copy of
the module which would not play so it can be examined) so
that the program may be upgraded to play the module type.
Message : "Error: can't determine playback speed; using NTSC."
Explanation: The program experienced difficulty in determining what
playback speed to use - NTSC or PAL. The program will
automatically default to using NTSC.
What to do : Nothing. This problem will take care of itself. If this error
reoccurs oftens, contact the author immediately (include a
note explaining the problem) so that the program may be
upgraded to solve the problem.
Message : "Error: can't determine filter toggle; won't toggle."
Explanation: The program experience difficulty in determining whether or
not to toggle the state of the high frequency audio filter
(ie: dim or brighten the Amiga "Power" LED). The program will
automatically default to no toggle.
What to do : Nothing. This problem will take care of itself. If this error
reoccurs oftens, contact the author immediately (include a
note explaining the problem) so that the program may be
upgraded to solve the problem.
***************************************************************************
*** Program Integrity & Bugs ***
***************************************************************************
It is the author's goal to keep this program as stable, correct, and as
bug-free as possible. For this reason it employs careful error checking
techniques, particularly when dealing with locks and memory. Everything
which is opened is closed, even when errors occur. As an Amiga user
himself, the author loves cleanly written programs, particularly those
that don't suck up system resources when they screw up.
This program has its own built-in error messages, and all are largely
self-explanitory. These error messages generally only appear when the
user has done something incorrectly.
However, should you discover any bugs in this program, please record them
and contact me immediately so that they may be corrected and the fixed
version of the program released.
***************************************************************************
*** Program Background ***
***************************************************************************
Having spent alot of time dealing with Amiga music (mainly listening to it)
and creating an occassional slideshow, it's always been my desire to use
quality music. To date, SoundTracker modules provide the best quality music
I've heard on the Amiga. However, I've always had to work with players
written by others which never seemed to do exactly what I needed them to
do.
ZSound is an effort in this direction, and will become a central part to
bringing quality music to my future slideshows.
***************************************************************************
*** Revisions & Planned Enhancements ***
***************************************************************************
The following changes have been made to this program since the previous
version:
* Output window: gadgets added to make the program truly interactive
(Pause, Play, Stop, Loop, Speed, and Filter). Aesthetic changes also
made.
* Command line arguments: no longer case sensitive. "Quiet" flag has been
renamed "NoText" (makes flag names easier to remember - the function
remains the same). New "Loop" and "NoLoop" flags added.
* Text output: Debugging information now formatted and cleaner looking.
More likely to fit on a single screen than before.
* Code enhancements: Main window opening code and some loop counting code
rewritten. Improved argument interpretation routine - it's shorter,
smarter, and faster than before. Alot of new error checking added,
particularly when dealing with Intuition.
Known bugs in this version:
* Contrary to the author's quaint article on how he likes programs that
don't suck up system resources when they screw up, it's been discovered
that this program does just that: after execution, the program will chew
up approximately 100 bytes to 1 kilobyte of FAST RAM. (Interestingly, this
bug does not effect CHIP RAM at all.) This also prevents the program
from being able to be completely detached from the launching CLI/Shell.
The problem is being tracked down. (It's only fair that users of this
program know of its flaws as well as its benfits.)
Planned Enhancements:
* Wildcards, including the AmigaDOS wildcard combination (#?) and the
well-liked asterisk (*) familiar to UNIX, MS-DOS, and Amiga ARP users.
* User flag to allow play-time length.
* ARexx support.
***************************************************************************
*** Legalese ***
***************************************************************************
This program is public domain and may be copied and distributed freely
without the consent of the author for non-commerical purposes where no
charge is made for the copying or distribution of this program.
Commerical sale, duplication, and distribution of this program is
forbidden without the consent of the author.
Fred Fish and Amiga Atlanta, Inc. are entitled to include this program
in their public domain collections as a thank-you for all of the work
they have done to promote the Amiga and provide scum like us with
decent public domain software. Screw (PKWare).
Module.library (Release 1.0, March 18th, 1991) was written by Peter S.
Martson, and is freely distributable.
***************************************************************************
*** Contacting The Author ***
***************************************************************************
To contact the author of this program, use any of the following addresses:
US Mail Address : Gregg Giles
2275 Gray Highway N-10
Macon, Georgia 31211-1029, USA
Voice Mail Box : 912-742-0019
FidoNet NetMail : 1:3611/11 as "Gregg Giles" (Amigalectric BBS)
Amigalectric BBS : 912-922-5655, 14.4 kbps as "Gregg Giles"
Mercer University: BearNet.CompSc (VAX) as "giles_g"
tess.uucp as "giles"
Prime System A as "cscmajch"
University Campus Mail at Box 662
Donations and contributions will be accepted, but are not demanded. Source
code is not provided in this archive as a matter of policy. Please contact
me if you would like to obtain a complete copy of it.
*EOF*