🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.coco
Article #43274

Thoughts on .MOD players

#43274
From: PAULSENIURA
Date: Sun, 19 Dec 1993 21:03
76 lines
5344 bytes
 C>Steve ... by .mod I take it you don't mean the MODule files that where
 C>originated on the Amigas (ie, song files), do you?

 >      The OS9\6809 L2 Play V5.0 command allows a raw playing of the
 > Atari (and maybe Amiga?) .MOD files.  I downloaded 3 zipped .MOD
 > files from my friends BBS, knowing I did not have a player for them.
 > 2 do play quite well with Play, since there is a lot of audio in
 > them... the third just had 2 sampled synth sounds.  Looked at the
 > header and I saw that there are instructions to make music out of
 > those 2 sampled synth sounds.  That sure would make a nice project
 > for OS9 and/or OSK to make a .MOD player!!!
 >
 >                     -= The Cosmonaut of the Color Galaxy =-
 >                                Cosmo9000@AOL.com
 >                              cosmonaut@rcisnet.org

.MOD files come from 'Tracker software, e.g. NoiseTracker, ProTracker, and
others, originally developed for the Amiga 4-channel (8 bits per) sound
system and 'PAULA' chipset(?).  Amigans will know more about this than I do.
There are similar software for PClones & Ataris as well.

From the software I've been using on my Atari-ST system, you'd need two
precision timers: one for the note on/off timing, and one for the actual
loading of the DACs if you don't have DMA sound.  Almost all song files use
50-Hz as the "note on/off resolution", not 60-Hz.  To make this easy on the
ST, for example, the video must be in 50-Hz mode, so that Timer IRQ can be
used for the note on/off phase, and the higher resolution timer used for the
real-time DAC functions.

There are a couple of programs (mainly for the PClones) that can convert the
note on/off data to Standard MIDI Format (SMF) files, so you can see the
similarity here.

The digitalized data for the sampled sounds correspond to what an external
synthesizer would do: it receives the note on/off data and plays it.  The
sampled sound data is found at near the beginning of the .MOD file, and each
sample would be a "recording" made at a known frequency.

A player must interpolate the sound data and play it at the "real" frequency
dictated by the note data.  Doing this for 4 channels will hog most of your
CPU if you don't have 4 "real" DACs each with its own (assigned) DMA (memory
area) and each with its *own* programmable sample-frequency.

So most non-DMA (and certainly non-stereo) hardware & software systems (like
a plain ST with its single 12-bit [dynamic range] DAC in its Yamaha sound
chip) will usually lower the "final result" sample frequency to make the
coding more tolerable.  The best such program so far has been PT-Player 1.02,
which gives us 11-bit dynamic range at 17-KHz resolution (you can find this
at the Atari archive sites, and in the Atari SIGs at Delphi, CIS and GEnie,
I'm sure).  This pgm even shuts off interrupts from any other source
including the mouse & floppy "media changes".  I.e. it hogs a "dedicated"
8-MHz 68000 (I have a 16-MHz cached 68000 upgrade w/ 0-wait-state on my ST).

Recently someone posted a large file on known sound/music file formats; the
.MOD structure is the most complex.  In the next message on this list, I'll
include the part about .MOD files.  Study this carefully: what a .MOD player
must do is not only (1) read the note on/off data (as in a SMF player) but
also (2) compute the 8-bit waveforms based on the note data (for each of four
channels) thus "playing" that sampled sound "at" that note's frequency
[B-flat 3rd octave, middle-C, whatever], (3) emulate the ADSR envelope (for
each of four channels) found in the note data, (4) emulate the 'pitch bend'
and 'tremolo' data (for each of four channels) found in the note data, and
(5) even which Left/Right audio channel the sound should be played and (6)
'mix' other sounds from the other channels within those two audio channels as
well.  In other words, your player pgm must "be the innards of a synth" as
well as the "human who played the notes", all in real time.

Writing a .MOD player for OS-9 Level 2 and/or OSK, well, y'all better read my
"CoCo3 12-bit Timer project" paper I've mentioned here on this list.  I'm
still waiting for some of y'all to get back with me on this project; my
articles are available at Cabrales and WUArchive and Delphi's OS9 SIG.  The
standards we set for "real-time timing" would apply to OSK, also.  So
everyone should study the proposals I've made over 2 years ago and let's get
busy.

-- thx, Paul Seniura (from Oklahoma)
Technical Details
Message-ID: <01H6O6C9UBNM8ZG1IP@delphi.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!paladin.american.edu!auvm!DELPHI.COM!PAULSENIURA

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 110568,6d2e202aa03ae0a2,start
X-Google-Attributes: gid110568,public
X-Google-ArrivalTime: 1993-12-19 14:07:55 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!paladin.american.edu!auvm!DELPHI.COM!PAULSENIURA
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.coco
Return-Path: <@AUVM.AMERICAN.EDU:COCO@PUCC.BITNET>
X-VMS-To: INTERNET"coco@pucc.princeton.edu"
MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET=US-ASCII
Content-transfer-encoding: 7BIT
Message-ID: <01H6O6C9UBNM8ZG1IP@delphi.com>
Date: Sun, 19 Dec 1993 17:03:16 -0400
Reply-To: PAULSENIURA@DELPHI.COM
Sender: COCO - Tandy Color Computer List <COCO@PUCC.BITNET>
From: PAULSENIURA@DELPHI.COM
Subject: Thoughts on .MOD players
Lines: 75