Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>tone()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
TONE()


Syntax:     TONE(<expN1>, <expN2>)

Purpose:    To sound a speaker tone for a specified frequency and
            duration.

Arguments:  <expN1> is the frequency of the tone to sound.

            <expN2> is the duration of the tone measured in
            increments of 1/18 of a second; one second, therefore, is
            18.

            Note that for both arguments, non-integer digits are
            truncated.

Returns:    There is no return value.

Usage:      TONE() sounds the speaker at the specified frequency for the
            specified duration.  The duration is measured in increments
            of 1/18 of a second.  The frequency is measured in hertz
            (cycles per second).  Frequencies less than 20 are
            inaudible.  The following are the frequencies of standard
            musical notes:


            Table: Table of Musical Notes
            ------------------------------------------------
            Pitch    Frequency       Pitch      Frequency
            ------------------------------------------------
               C     130.80          mid C      261.70
               C#    138.60            C#       277.20
               D     146.80            D        293.70
               D#    155.60            D#       311.10
               E     164.80            E        329.60
               F     174.60            F        349.20
               F#    185.00            F#       370.00
               G     196.00            G        392.00
               G#    207.70            G#       415.30
               A     220.00            A        440.00
               A#    233.10            A#       466.20
               B     246.90            B        493.90
                                       C        523.30
            ------------------------------------------------

            Note that TONE() only works on IBM-PC and 100% compatible
            computers.

Library:    EXTEND.LIB

Source:     EXAMPLEA.ASM


----------------------------------- Examples -------------------------------

   The following example is a beep procedure that sounds a tone sequence
   indicating a batch operation has completed:

   PROCEDURE DoneBeep

   TONE(150, 8)
   TONE(130, 10)

   RETURN

   This example is a tone sequence you can use to indicate invalid
   keystrokes or boundary conditions:

   PROCEDURE ErrorBeep

   TONE(300, 1)
   TONE(499, 5)
   TONE(700, 5)

   RETURN


See Also: SET BELL

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson