Using the PC Speaker Sound Driver (Win3.1x)

I have a script (OK, I have a freelance deadline that is worrying me) that used to work given WFW3.11. It was stolen from an Asymetrix script to create computer clicks (as opposed to sound card clicks).

to handle Click
        system sPlaySound
        sC = sysCursor
        if sPlaySound
                get Sound_SetVoiceNote(1,62,511,1)
                get Sound_StartSound()
                send cbtPause 200
                get Sound_SetVoiceNote(1,63,511,1)
                get Sound_StartSound()
        else
                send cbtPause 200
        end end to handle ClickDown
        system sPlaySound
        if sPlaySound
                get Sound_SetVoiceNote(1,62,511,1)
                syscursor = cursor "c2"
                get Sound_StartSound()
        else
                syscursor = 1
        end end to handle ClickUp
        system sPlaySound
        if sPlaySound
                get Sound_SetVoiceNote(1,63,511,1)
                syscursor = 1
                get Sound_StartSound()
        else
                syscursor = 1
        end end
This script used to create simulated clicks. Now it does nothing under WIN95. Any suggestions?

John Hall
jhall@biocom.arizona.edu

Subject: Re: beep tones with No Sound Card

> >The thread about "no sound card" reminds me of how much I miss one >feature of the authoring program I used to use. With it, I could give >the beep command with a parameter that controlled the pitch of the beep. >This is really helpful for "right" vs. "wrong" feedback, for example. But >MTB seems to be stuck on one pitch -- rather like my singing! > >Hopefully, I am missing something. How can I control the tone of the >beeps coming through a "no sound card" machine, without getting into >extra software I mean. > >Roy A. > This is a copy of my old mail, so try to understand the text.

Syntax for MMSOUND.DRV
In SetVoiceSound() the parameters seems to be (1,frequency,duration).
In the first script the frequency was in HEXADECIMAL.
It seems also to be that the last SetVoiceSound() statement should be Zero Sound = SetVoiceSound(1, 0 * 2 ^ 16, 0). BTW the last sound is not audible.

to handle buttonClick
        syscursor = 4
        get OpenSound()
        get SetVoiceSound(1, 1000 * 2 ^ 16, 400)
        get SetVoiceSound(1, 0 * 2 ^ 16, 0) --Null sound
        get StartSound()
        while WaitSoundState(1) <> 0
        end while
        get CloseSound()
        syscursor = 1
end
Here a script for siren:
--Modified from Visual Basic quide to handle voice system freq,tme local frequen frequen = freq * 2 ^ 16 get OpenSound() get SetVoiceSound(1,frequen,tme) get StartSound() while WaitSoundState(1) <> 0 end while end to handle buttonClick system freq,tme syscursor = 4 step i from 440 to 1000 by 5 freq = i tme = i/100 send voice end step step i from 1000 to 440 by -5 freq = i tme = i/100 send voice end step get SetVoiceSound(1, 0 * 2 ^ 16, 0) get CloseSound() syscursor = 1 end Regards

Rauno Vauramo   rvo@nmoy.nmp.nokia.com
RF Designer
Nokia Mobile Phones
Salo
FINLAND
Brian Parkhurst
University of Washington
Box 357260
Seattle, WA 98195-7260
206/543-9175