home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
utilities
/
utilst
/
tapedeck
/
!TapeDeck
/
Resources
/
PM_Help
< prev
next >
Wrap
Text File
|
1991-05-23
|
23KB
|
635 lines
!S/Tracker (Soundtracker/Tracker module music player)
-----------------------------------------------------
Version 4.00 (23 May 1991)
Originally written by Hugo Fiennes and Fabrice Mercier [(c) The Serial Port]
SWI interface and other bits added by Matt Farrow
You are allowed to use this module with any demos or p.d. stuff you write,
but permission is required before you can use it in any commercial software.
The !S/Tracker application may be freely copied if nothing more than the
cost of a disc and a small amount for the trouble is charged, but it must be
distributed with all the files complete and unchanged.
DOCUMENTATION OF * COMMANDS AND SWI's
-------------------------------------
*PlayMod - Loads into memory and starts to play the specified Tracker or
Soundtracker module, determining automatically which format it
is.
Syntax: *PlayMod <filename>
*PlayPause - Will pause the currently playing tune (kills all sound immed-
iately) but retains the soundtracker/tracker module in memory.
The tune can be restarted with a *PlayStart command.
Syntax: *PlayPause
*PlayStart - Will resume playing a tune after a *PlayPause command.
Syntax: *PlayStart
*PlayPos - Will set the current position in the sequence table, or if no
parameter is given, will simply return the current position.
Syntax: *PlayPos [<0-127>]
*PlaySamples - Will list all the samples associated with the currently
installed music module.
Syntax: *PlaySamples
*PlayStatus - Will print information about the current tune module loaded
Syntax: *PlayStatus
*PlayStereo - Controls the stereo settings while the older format sound-
tracker modules are playing (the stereo is fixed on an Amiga),
and will switch between five possible settings to cater for
most configurations:
0 - Slightly off-centre left and right (normal)
1 - Fully left and right (amiga-style)
2 - Fully left
3 - Fully right
4 - Don't alter stereo settings
(normally alters settings when a tune is loaded and when it plays a tracker stereo command - see
SWI Tracker_Stereo)
Syntax: *PlayStereo <0|1|2|3>
*PlayStop - Will stop and kill the currently playing tune module,
removing it from memory.
Syntax: *PlayStop
SWI COMMANDS
------------
Several SWI commands have been added to the module in order to simplify the
task of adding soundtracker/tracker music to your demos etc. (especially
multi-tasking situations). These provide all of the facilities offered by
the various * commands, but also allow a more detailed control of some of the
module's features.
All the SWI's remain in SVC mode, and do not alter the interrupt status.
I think most are re-entrant, except those which use system SWI's (load, play,
stop etc.), so avoid calling them from interrupts if you can avoid it.
The SWI chunk number given here (&43200) is an officially recognised chunk
number issued by Acorn.
-----------------------------------------------------------------------------
Tracker_Version (SWI &43200)
-----------------------------------------------------------------------------
On Entry: -
On Exit : R0 = version number*100 (ie. for V1.23 = 123)
Use this call to ensure that the trackermodule installed is a recent enough
version to support the SWI's you wish to use. Versions 4.00 onwards incorpor-
ate the SWI's.
-----------------------------------------------------------------------------
Tracker_Load (SWI &43201)
-----------------------------------------------------------------------------
On Entry: R0 = pointer to filename of soundtracker/tracker module
On Exit : R0 preserved
This call will claim memory from the RMA and load the specified tune module,
initialise the sound system, and set the playroutine in pause mode.
You must then use the SWI Tracker_Play to start the tune playing.
The command *PlayMod calls this routine, and then the SWI Tracker_Play.
An error will be generated if the module cannot be loaded or not enough
memory can be claimed.
-----------------------------------------------------------------------------
Tracker_MemoryLoad (SWI &43202)
-----------------------------------------------------------------------------
On Entry: R0 = pointer to first word of soundtracker/tracker module in
memory (NB must be word-aligned)
R1 = length of module in bytes
On Exit : R0 and R1 preserved
This call can be used by a non-multitasking application to specify an area
of memory as a tune module, and thereby remove the need for a seperate file
to hold a tune, and there is no need to claim a large amount of RMA space.
Once this SWI is called, the module will be treated as if it was loaded in
the module's own workspace.
Important: You must tell the trackermodule to forget the module if the
memory will be overwritten, otherwise the module may crash.
(*PlayStop or Tracker_Stop SWI)
NB This call will not work for programs running under the desktop if the
module is loaded in user memory.
When a soundtracker module is loaded, it is partially converted to an
intermediate format between soundtracker and tracker to simplify the task
for the playroutine. Once the module is loaded (by any method) it is
permanently corrupted, and should not be re-saved. Tracker modules will be
unchanged, however, and soundtracker modules should be converted fully
into this format before being loaded to avoid this problem.
-----------------------------------------------------------------------------
Tracker_Play (SWI &43203)
-----------------------------------------------------------------------------
On Entry: -
On Exit : -
This call will restart a tune after it has been paused or loaded with the
Tracker_Load SWI.
-----------------------------------------------------------------------------
Tracker_Stop (SWI &43204)
-----------------------------------------------------------------------------
On Entry: -
On Exit : -
This performs the same actions as *PlayStop
Using *PlayStop or this SWI is the only way to get the trackermodule to
release the memory taken up by the tune module, or to force it to forget the
address of a module if it has been loaded with the 'Tracker_MemoryLoad' SWI.
-----------------------------------------------------------------------------
Tracker_Pause (SWI &43205)
-----------------------------------------------------------------------------
On Entry: -
On Exit : -
This performs the same actions as *PlayPause
-----------------------------------------------------------------------------
Tracker_Stereo (SWI &43206)
-----------------------------------------------------------------------------
On Entry: R0 = Stereo setting (0-4)
On Exit : R0 preserved
This performs the same actions as *PlayStereo, with R0 passed as a parameter.
If R0 is set to 4 on entry, then the stereo settings will be unaltered
whenever a module is loaded or killed, and disables any stereo commands in
tracker modules. This is to allow interfacing programs to provide their own
stereo options, or to allow adjustment to the stereo positions while tracker
tunes are playing (which have default stereo settings stored as part of the
tune).
-----------------------------------------------------------------------------
Tracker_SetPos (SWI &43207)
-----------------------------------------------------------------------------
On Entry: R0 = New sequence position (0-127 max)
R1 = Event (0-63 max)
On Exit : R0 preserved
This performs the same actions as *PlayPos, except that the event with the
pattern can be specified