Copyright: Copyright® 1994 by Thomas W. Olsen


ULTIMOD HELP
Registering UltiMOD

UltiMOD is a Shareware product. It is not "free software." You are granted a limited license to use this software on a trial basis for a period of 30 days. Upon the expiration of this trial period, you must register the product with the author or cease using all product materials. UltiMOD  is provided "as is" and without any express or implied warranties with regard to merchantibility or fitness for purpose. The author disclaims all responsibility for losses whether tangible or intangible resulting from the use of this software. The user of this product furthermore agrees to hold harmless the author from all claims for damages. Use of the product constitutes acceptance of these terms.

UltiMOD may be freely distributed provided that none of the product materials are disassembled, reverse-engineered, altered, damaged, or sold without the author's explicit written permission. Registration entitles you to automatic upgrade notification and limited technical assistance. Email queries can be sent to CIS: 76450,1767 or 76450.1767@compuserve.com.

•	Mail Registration

Send the following information and Check/Money Order in the amount of $20 U.S. to:

   Thomas W. Olsen
   163 Granville Road
   Southwick, Massachusetts 01077
   U.S.A.

Name:
Address:
City:
State:
Zip:
Country:
Diskette Format (3.5", 5.25"):
Where Did You Get UltiMOD?

•	CompuServe Registration

Dial into your CompuServe Account.
At any prompt type "GO SWREG"
Select Registration ID# "1823".
Registration fee of $20 U.S.will be billed to your CompuServe Account.

Introduction

    Digital audio has beaten a serious path to the PC desktop
thanks to the Multimedia capabilities of Microsoft Windows,
and its usefulness extends far beyond mere voice-annotated
spreadsheets into the realm of CD-quality recording and
playback. Although Multimedia is a relatively new phenomenon
to the PC, numerous other hardware platforms, including the
Commodore Amiga and Apple Macintosh to name a few, have
supported similar technology for several years now;
consequently, Windows Multimedia developers should look to
the pitfalls and successes of other platforms for valuable
cues.

    One of the primary limitations of digital audio is storage
space: digital recordings require a LOT of room. For example,
a two minute 8-bit mono recording sampled at 44.10 kHz
occupies a 5.28MB WAV file. Double that figure for a 16-bit
recording.

    The Musical Instrument Digital Interface (MIDI) protocol
overcomes space limitations by storing just the sequence of
notes for a particular song; however, on the downside, MIDI
does not guarantee that songs created on one synthesizer will
sound exactly the same on another, nor can it reproduce a
human voice. It may surprise you to learn that the Commodore
Amiga supports 8-bit digital recordings of five minutes
or more that fit on a single floppy disk. This remarkable
feat is accomplished using the so-called Module (MOD) file
format.

Using the UltiMOD Player

Technical Information


Using the UltiMOD Player

You already know the UltiMOD interface. It's the same basic setup as your home CD or cassette player. Of course, there are the standard Stop, Play, and Repeat buttons but wait...there's no Fast Forward or Rewind?!? No need--there's a slider bar for instant access to any portion of the song. Just grab the slider with the mouse and it will take you anywhere in the song. You will also notice the song description. It lists the title, number of "positions" (or segments), and an estimated playback time. Keep in mind, though, that the reported time is only an estimate and may vary depending upon the number of effects employed by the song.

Configuring UltiMOD

UltiMOD should work with all Windows MPC-compatible sound cards,
including ADLIB, SoundBlaster, and others supporting 44.1kHz 16-bit
stereo audio output. By selecting the &File&Configure option from the
UltiMOD Player menu, the following dialog box will appear. You can then
modify device, volume, frequency, resolution, and mode settings:

•	Frequency (or "Sampling Rate") -- This number specifies the number of samples that will be delivered to the sound card per second--the higher the number, the higher the quality of output. Keep in mind, however, that you will pay the price for higher audio quality with slower system performance, so choose 22.050kHz at all costs.

•	Resolution (or "Bit Rate") -- This number specifies the volume scale (8-bits or 16-bits) which will be used for each sample. Specifying 16-bits reduces the amount of noise in each sample, but it's questionable whether you can tell the difference (since all MOD are recorded as 8-bit). Use 8-bits if possible.

•	Mode -- This one is pretty self-explanatory but there is one small caution: UltiMOD *simulates* Stereo by playing two of the MOD channels to Left and the other two to Right (See Mix Channels--the unchecked channels go to Left and checked channels go to Right). If the MOD sounds weird in Stereo, you may need to remap the MOD channels with the Mix Channels selection.

•	Disable LEDs -- If you don't want to see UltiMOD's LED output meters, check this box. The LEDs are ON by default.

•	Left/Right Volume -- These scroll bars let you change the volume level for the sound card. IMPORTANT: If you move these scroll bars, the volume changes will take place regardless of whether you later choose &Okay or &Cancel.

•	Buffers -- Before UltiMOD can begin playback, it needs to allocate enough space for its WAV output buffers. You can specify a number between 1 and 30 buffers. This number--together with the Frequency, Mode, Resolution, and Rows Per Buffer--determines how much memory is needed. Allocating more buffers reduces the amount of memory available to other applications...but ensures that UltiMOD always has enough buffers to use and will not have to wait for one. You will have to experiment with this and the 'Rows Per Buffer' settings to tune the performance of UltiMOD to your individual machine. In
general, it's usually better to have a high 'Buffers' number and a low 'Rows Per Buffer' for better performance.

•	Rows Per Buffer -- This number, which ranges between 1 and 30, determines how many "rows" of instruments will be fed into each WAV buffer before it is delivered to the sound card. Remember: Specifying a large number means more work for UltiMOD and, hence, less processing time for other applications.

•	Mix Channels -- This option only applies if the mode is Stereo; otherwise, it doesn't make any difference. As mentioned previously, UltiMOD *simulates* Stereo by mixing 2 channels to Left and the other 2 channels to Right. You may not hear certain sounds in Mono because all 4 channels get mixed together. But, when you send 2 channels Left and the other 2 Right, sounds which were previously "lost in the mix" suddenly take on a life of their own. Not all MODs sound _good_ in stereo, though. Some artists don't give much consideration to which channels they're using (and some even count on their MODs being run in Mono only). But, on the bright side, these check boxes allow you to decide which channels to mix together-- unchecked channels go to Left and checked channels go to Right. If the song sounds choppy or skips, try altering the channel mappings first...and, if it still sounds lousy, try modifying the 'Buffers' and 'Rows Per Buffer' parameter...and, if worse comes to worse, try Mono.

Opening MOD Files

There are several ways to open and start playback of a MOD file.

•	&File&Open Menu -- The easiest way is to select the &File&Open menu item on the UltiMOD Player. The following dialog box
will appear (COOL TIP: This Open File dialog box allows you to select multiple filenames for playback. All that you
have to do is hold down the <Ctrl> or <Shift> key while clicking on the filenames. Then, when you click on &OK,
UltiMOD will begin playing back each selected file in sequence):

•	Instant Recall -- As you use UltiMOD, it remembers the last 5 selections that you've made...and stores them on the &File
menu. Clicking on one of the selections automatically loads that MOD file into memory and begins playback.

•	Drag-and-Drop -- Programs like the File Manager allow you to "pick up" a file with the mouse and drag it over to another application. UltiMOD recognizes Drag-and-Drop...and will begin playback immediately:


TECHNICAL INFORMATION
Anatomy of the MOD Format

    The MOD file format falls somewhere between MIDI and
WAV format. MODs contain a bunch of digitized samples--called
instruments--in a format similar to WAV Pulse Code
Modulation (PCM). MODs were originally designed to have
15 instruments but it soon became necessary to expand
the number to 31, due to the growing sophistication of songs. Unfortunately, the architects of this change headed in opposite
directions and several different formats emerged--each named
after its respective MOD sequencer or "tracker" (ie. NoiseTracker, SoundTracker, etc).

    Each digital sample represents one note of a particular
instrument in one pitch; that is, the digitized "plink" of a piano
or the "bang" of a drum. Human voice is considered an
instrument, too. This digitized waveform is a sort of instrument
"signature." Modifying the pitch, tempo, and attack of the digitized
sample enables you to reproduce virtually any note for a given
instrument. MIDI has 16 channels--MODs four; hence, four
instruments can be played simultaneously. MOD files contain tables
that describe when to play an instrument and upon which channel.
All kinds of special effects can be applied to individual notes:
arpeggios, portamentos, pitch and volume slides, vibratos, etc.
The following structures represent the least common denominator of the various MOD formats:

typedef struct tagMODHEADER
{
    char    name[20];
} MODHEADER;

typedef struct tagINSTRUMENT
{
    char        name[22];
    WORD    sampleLength;
    WORD    volume;
    WORD    repeatOffset;
    WORD    repeatLength;
} INSTRUMENT;

typedef struct tagPOSITIONTABLE
{
    BYTE    noOfPositions;
    BYTE    reserved;
    BYTE    position[ MAX_POSITIONS ];
} POSITIONTABLE;

typedef struct tagNOTE
{
    WORD    word1;
    WORD    word2;
} NOTE;

typedef struct tagCHANNEL
{
    NOTE    note;
} CHANNEL;

typedef struct tagPATTERNROW
{
    CHANNEL channel[MAX_CHANNELS];
} PATTERNROW;

typedef struct tagPATTERNTABLE
{
    PATTERNROW row[MAX_PATTERN_ROWS];
} PATTERNTABLE;

// This is the order of these elements in the .MOD file.

MODHEADER       modHeader;
INSTRUMENT      instrument[NO_OF_INSTRUMENTS];
POSITIONTABLE   positionTable;
PATTERNTABLE    patternTable;

NOTE:  NO_OF_INSTRUMENTS defaults to 15, unless
the .MOD file contains 'M.K.', 'FLT4', or 'FLT8' at Offset
1080 (decimal)--in which case there are 31 instruments.