Tone()
Sound a tone with a specified frequency and duration.
Syntax
Tone( <nFrequency>, <nDuration> ) --> NIL
Arguments
<nFrequency> A non-negative numeric value that specifies the frequency of the tone in hertz.
<nDuration> A positive numeric value which specifies the duration of the tone in 1/18 of a second units.
Returns
Tone() always returns NIL.
Description
Tone() is a sound function that could be used to irritate the end user, his or her dog, and the surrounding neighborhood. The frequency is limited to the range 0 to 32767 Hz.
Examples
IF lOk // Good Sound Tone( 500, 1 ) Tone( 4000, 1 ) Tone( 2500, 1 ) ELSE // Bad Sound Tone( 300, 1 ) Tone( 499, 5 ) Tone( 700, 5 ) ENDIF // Tone( 800, 1 ) // same as ? Chr( 7 ) Tone( 32000, 200 ) // any dogs around yet? Tone( 130.80, 1 ) // musical note - C Tone( 400, 0 ) // short beep Tone( 700 ) // short beep Tone( 10, 18.2 ) // 1 second delay Tone( -1 ) // 1/18.2 second delay Tone() // 1/18.2 second delay
Compliance
Clipper
Platforms
All
Files
Library is core
Seealso
Chr(), SET BELL
Pingback: Harbour All Functions – T | Viva Clipper !
Pingback: Harbour Misc Functions | Viva Clipper !
Pingback: Harbour RG Summary | Viva Clipper !