DPRG
DPRG List  



DPRG: Re: R2D2 sound effects

Subject: DPRG: Re: R2D2 sound effects
From: David M. ElectroTX at webtv.net
Date: Wed Sep 8 07:28:09 CDT 1999

- --WebTV-Mail-5627-2
Content-Type: Text/Plain; Charset=US-ASCII
Content-Transfer-Encoding: 7Bit

Hi,

I like your concept, but I found that the following program works much
better on a PC using QBASIC:

(line numbers are optional)

R2D2.BAS

FOR x = 1 TO 10
RANDOMIZE TIMER
D = INT(RND * 5)
T = INT(RND * 8000)
SOUND T, D
NEXT x
END

Explanations:  R2D2.BAS is name of program; For-Next loop short so it
doesn't go on forever; TIMER is seed value for random number generator,
based on number of seconds after midnight on your machine; variable D is
duration of tone, based on clock ticks, (18.2 per second, usually), kept
short to sound like r2d2; variable T is the frequency in hertz of the
tone, varied each repetition to sound more like r2d2; I/O function SOUND
outputs it to your computer's internal speaker.

That's it! Have Fun! And don't be afraid to mess with the duration
constant and the frequency constant :-)

- --Electro-- 

====================================
"Are you telling me, you built a Time
 Machine...out of a _DeLorean_?!?!"
- -Marty McFly, Back To The Future, 1985
====================================


- --WebTV-Mail-5627-2
Content-Disposition: Inline
Content-Type: Message/RFC822
Content-Transfer-Encoding: 7Bit

More information about the DPRG mailing list