home *** CD-ROM | disk | FTP | other *** search
- unit drums; { DRUMS.PAS Copyright (c) 1990 DSoft Specialties }
- interfac { Drum routines for the Tandy 1000 and/or PCJr. See DRUMS.SIM }
- uses dos,noiz;
-
- { All I ask is if you use any of these routines in your program
- please mention DSoft in the docs or in a copyright message }
-
- type
- echo_style = (short,long); { long or short echo }
-
- const
- drumpitch: word = 0; { initial pitch for drum sounds }
- inturbo: boolean = true; { true = shorter delay in wait(dt) }
-
- procedure wait(time: longint); { like CRT units delay routine }
- procedure delay(dt: longint); { like CRT units delay routine }
- procedure drum_pitch(i: word); { set initial pitch }
-
- procedure down(snd,step: byte;pitch: word);
- procedure up(snd,step: byte;pitch: word);
-
- procedure noise(ch: char;sr,amp,duration: word);
-
- procedure dwn(reps,tone,dur: integer);
-
- procedure snare(reps,dur: byte); { snare drum }
- procedure tom(reps,dur: byte); { Tom drum }
- procedure lowtom(reps,dur: byte); { Floor Tom }
- procedure bass(reps,dur: byte); { Bass drums }
- procedure bass2(reps,dur: byte); { tricky double bass }
- procedure roto1(reps,dur: byte); { roto-Tom #1 }
- procedure roto2(reps,dur: byte); { roto-Tom #2 }
- procedure roto5(reps,tone,dur: integer); { Oddball/experimental roto-tom }
- procedure sims(reps,dur: byte); { "Simmons" electronic drum - low }
- procedure sims1(reps,dur: byte); { "Simmons" electronic drum - medium }
- procedure sims2(reps,dur: byte); { "Simmons" electronic drum - high }
- procedure sims3(reps,dur: byte); { "Simmons" electronic drum - higher }
- procedure crash(reps,dur: integer);
-
- procedure roll(reps,dur,crashdur: integer);
- { does a cool roll
- reps = how many times to do it
- dur = play it slowly or quickly
- crashdur = how long for the crash cymbal }
-
- procedure lick(reps: byte);
- { a nifty little drum "lick"
- reps = how many times to do this "lick" }
-
- procedure echo(del: word;es: echo_style);
- { does a cool echo sound
- del = delay time, time between repeats
- es = either, long, or short }
-
- procedure quiet;
- { turns all 3 voices and normal PC sound off. Also, turns noise off }
-
- function fkey: char;
- { like CRT's ReadKey, but if its a function key add 128 to the value of fkey
- NOTE: #187 = F1
- #196 = F10
- Syntax:
- ch:=upcase(fkey);
- case ch of
- '1':;
- #187: writeln('F1 hit');
- #196: halt;
- end; }
-
- function keyhit: boolean;
- { like CRT's KeyPressed }
-
- implementation
-