home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Audio 4.94 - Over 11,000 Files
/
audio-11000.iso
/
msdos
/
sndbords
/
proaudio
/
fm42a
/
fm.doc
< prev
next >
Wrap
Text File
|
1992-02-23
|
5KB
|
209 lines
FM - 3812 Resident Driver
Substitute for "sound.com"
Syntax
fm
fmmin
fmmax
Options
None.
Operation
This program is a TSR that installs into interrupt 65h and handles
the function calls as specified in the 1987 Ad Lib Synthesizer Card
Programmer's Manual.
Run the program fm.com to load the driver. The program will not load
more than once unless interrupt 65h is intercepted by another program
that does not have a valid signature.
Use the fmmin.com program to use the minimum amount of memory while
providing a 400-note buffer size, and without the background sound
option. Use the fmmax.com program to obtain a 2200-note buffer size,
and fm.com for a 1200-note buffer size, both with the background sound
option.
Auxiliary Programs
A program can be written to load the queue and terminate before
turning the driver on.
The "mp.com" and "mm.com" programs switch the card into percussive and
melodic modes, respectively.
The programs "qo.com" and "qf.com" turn on and off the driver.
If you wish to remove the TSR from memory, first run "qf"
to turn the driver off in order to reset the clock timer to
its normal speed; then, release the memory.
Disassembly of these programs will show you that they
are simply function calls to interrupt 65h.
The programs "bo.com" and "bf.com" turn on and off background sound.
The program "i65.com" simply reinitializes the driver.
Programming Information
Interrupt Service Functions
F# Definition
0 Initialize; set volume to 100%, set pitch to 0,
set melodic mode, set timbre for all voices
to piano, empty queues, and set tempo to 90 bpm.
2 Set Relative Time Start;
3 Set State; either 1, active, or 0, stopped.
4 Get State; either 1, playing, or 0, complete or stopped.
5 Empty queues; silence all voices, stay active.
6 Set Mode; set melodic or percussive, set volume to 100%,
set timbre for all voices to piano, set pitch to 0.
7 Get Mode; return 0 for melodic, 1 for percussive.
8 Set Volume at Time.
9 Set Tempo at Time.
10 Set Transpose; immediately affect all voices by specified
number of semitones.
11 Get Transpose.
12 Set Active Voice.
13 Get Active Voice.
14 Play Note with Delay; play note of pitch for length, set delay.
15 Play Note without Delay; play note of pitch for length.
16 Set Voice Timbre at Time.
17 Set Pitch at Time; affect all voices.
18 Set Ticks per Beat; all notes should fall on multiple of
1/TickBeat, and obey: 18.2 <= (TickBeat * Tempo / 60).
19 Direct Note On; play voice at pitch.
20 Direct Note Off; stop voice.
21 Direct Set Timbre; set timbre for voice.
Development Notes
02/23/92 - Queue entry size halved, reducing memory needs dramatically.
01/27/92 - All known defects corrected.
01/23/92 - Corrected delta pitch effect.
01/22/92 - Beta version 3.0 released. Fully functional. Queue size
too small.
01/09/92 - A defect with the combination of the timer and music interrupt
routines caused the computer to enter an endless loop, with
interrupts disabled: lock-up. Version 2.1 corrects this.
01/07/92 - Additional functions 8000h, 8001h return pointers to internal
data structures and the count of voices; 8002h and 8003h start
and stop background fm sounds; 8004h returns the offset to the
note-queue; 8005h single-steps the note queue.
mov si, 8002h ; start background sound
int 65h
mov si, 8003h ; stop background sound
int 65h
12/30/91 - Only the Reset Chip and Direct Note On/Off and Set Timbre
functions are implemented. All other functions simply return 0.
Otherwise, fully resident with proper signature placement and
checking.
Supplied test program fmfun.exe allows manipulation of voice
parameters and pitch; the tab key causes the program to begin
reading memory at 0:0, determining a pitch and length for each
voice.
Notes
Use the fmfun.exe program to modify the characteristics of the voice
operators internal to the driver, when experimenting with the background
sound feature.
The keystrokes accepted by the program are grouped as so:
< > Previous/Next Voice
[ ] Lower/Higher Pitch, Play Note
{ } Lower/Higher Pitch, no Play
M Select Modulator Operator
C Select Carrier Operator
a Attack Rate
d Decay Rate
l Sustain Level
r Release Rate
s Sustain Sound On/Off
e KSR Value
m Multiply Frequency Value
v Vibrato On/Off
b Feedback Value
o Output Level
k KSL value
t Tremolo
f FM Toggle
+ Increment Selected Operator Variable
- Decrement same
SPACE Play Current Voice, Current Pitch
TAB Begin Random Play
BS Display Current Random Position and Time Factor
CR Display Voice Data: Pitch, Octave, FNUM, Operator Data
ESC Quit Program
Comparison with "sound.com"
Command Line Max Notes Memory (K)
fm 1217 18
sound 410 18
fmmin 417 11
sound b1000 410 18
fmmax 2225 26
sound b3000 1229 26
As can be seen from the above, the fm program queues almost three times
as many notes as does sound.com, but uses the same amount of memory.
When memory usage is of no concern, fmmax provides double the note
buffer space while using the same amount of memory as "sound b3000".
Essentially, by simply using "fm.com", you obtain "sound b3000" results
using only "sound b1000" memory.