Mod Player/1

 BBS: Inland Empire Archive
Date: 11-30-92 (21:14)             Number: 373
From: RICH GELDREICH               Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: Mod Player/1                   Conf: (2) Quik_Bas
'QBMP15.BAS (experiment 26-parallel substager/mixer & looping overmix)
'A PDS/QB4.5 4-Channel Amiga MOD Player
'Written by Rich Geldreich (C) Copyright November 27, 1992
'You may use this program for anything you wish, but if you're going to
'make any money off it I would like to know about it first.
'
'NOTES: This program also requires INTRPT.OBJ (from QB.LIB or QBX.LIB),
'and QBMPASM.ASM to function. I have only tested this program in
'PDS 7.1. I *highly* recommend that you only run this program compiled!
'
'To compile(this is a pretty complicated procedure for beginners):
'-First, you must extract INTRPT.OBJ from QB.LIB or QBX.LIB(depending
'-on QB/BC7). Type:
'LIB QBX.LIB *INTRPT.OBJ,;              [BC7]
'LIB QB.LIB *INTRPT.OBJ,;               [QB4.5]
'-Then make a QLB by:
'LINK /q QBMPASM+INTRPT,,,QBXQLB,;      [BC7]
'LINK /q QBMPASM+INTRPT,,,BQLB45        [QB4.5]
'-And a LIB by:
'LIB QBMPASM QBMPASM+INTRPT,;           [BC7 or QB4.5]
'-Then load QB(or QBX) with the following and compile:
'QB(x) /lQBMPASM QBMP15
'Please note that the above instructions for QB4.5 haven't been tested.
'
'If you have a fast computer and want better sound change the variable
'"IntRate=11000" below to a larger number(max is about 19,000 hz). This
'program is currently configured to load MODs up to about 300k, change
'the line that says "Null& = SETMEM(-300000)" to load larger MODs.
'Anyone having problems or questions and can afford a L/D call:
'(609)-742-8752 between 3:00pm and 1:00am eastern time.
'
'If you get it compiled successfully, then run it with:
'QBMP15 modfile.MOD
'You should hear the MOD play on your PC-Speaker. The keys 1-4 turn
on/off
'each channel, and the left and right arrows fast forward/rewind the
MOD.
'Press escape to drop back to DOS. Here goes!! -RG
DEFINT A-Z
CONST True = -1, False = 0
DECLARE FUNCTION CheckDoneFlag% ()
DECLARE SUB SetBuffers (BYVAL BDS%, BYVAL Buffer1%, BYVAL Buffer2%, _
BYVAL BufferSize%)
DECLARE FUNCTION GetCS% ()
DECLARE FUNCTION GetOF% ()
DECLARE FUNCTION UnsignedComp% (BYVAL A%, BYVAL B%)

DECLARE SUB SetInt8Rate (A&)
DECLARE SUB SpeakerOff ()
DECLARE SUB SpeakerOn ()
DECLARE FUNCTION Alloc% (A%)
DECLARE SUB ExitWithError (A$)
DECLARE FUNCTION Extract% (A$, offset%)

TYPE RegTypeX
     ax    AS INTEGER
     bx    AS INTEGER
     cx    AS INTEGER
     dx    AS INTEGER
     bp    AS INTEGER
     si    AS INTEGER
     di    AS INTEGER
     flags AS INTEGER
     ds    AS INTEGER
     es    AS INTEGER
END TYPE
DIM SHARED CPU as RegTypeX

'Sample arrays.
DIM S.Name(30) AS STRING * 22
DIM S.Volume(30)
DIM S.Segment(30)
DIM S.RepStart(30),     S.RepLength(30)
DIM S.Length(30)

'Channel arrays
DIM C.InactiveFlag(3)
DIM C.Volume(3)
DIM C.Segment(3)
DIM C.Period(3),        C.HighStep(3),  C.LowStep(3)
DIM C.Offset(3),        C.Remainder(3)
DIM C.RepStart(3),      C.RepLength(3), C.LoopEnd(3)
DIM C.Length(3)

'For command processing
DIM C.Command(3)
DIM C.PortSpeed(3)
DIM C.PortDest(3)
'<<-Continued On Next Message->>

--- MsgToss 2.0b
 * Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET