You need to play around with the following API calls located in the
SOUND.DRV file:
Declare Function OpenSound Lib "SOUND.DRV" () As Integer
Declare Sub CloseSound Lib "SOUND.DRV" ()
Declare Sub SetVoiceNote Lib "SOUND.DRV" (ByVal Voice%, ByVal Note%, ...
... ByVal Length%, ByVal Dots%)
Declare Sub StartSound Lib "SOUND.DRV" ()
... then try some of this code to make a noise:
Sub Annoying_Sounds ()
CloseSound
Voices = OpenSound()
For I = 1 to 10
SetVoiceNote 1, 40, 16, 0
SetVoiceNote 1, 91, 16, 0
SetVoiceNote 1, 140, 16, 0
SetVoiceNote 1, 237, 16, 0
Next
StartSound
End Sub
Play around with the numbers and see what you come up with.
(Hint: if you send a longer series of noisemaking commands, the CloseSound
call shuts your sound driver up)
There are a few more API calls to get the routines which let you pass
octaves, notes, pitches, etc which I can post if you need them. The demo
code will need to be a bit longer though.
--
____________________________________________________________
Duncan S. Smith I D M G I
"Bone Daddy At Work" I
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SOFTWARE ENGINEERING - ELECTRONIC COUNTERMEASURES R&D