


tones(1)               Linux System Manual               tones(1)


NAME
       tones - a sequential tone generator program

SYNOPSIS
       tones  [-8|-16]  [-s  samplerate]  [-loop]  [-w wavfile|-o
       file] [waveform] T freq(s)

DESCRIPTION
       tones generates one or more tones of similar  type  (wave-
       form) and duration (T millisecs) of the specified frequen-
       cies, or mixtures of frequencies.  Possible waveforms are,
       sine (default), cosine, square, pulse, triangle, sawtooth.
       T is the number of millisecs that each tone is played for.
       Frequencies  (freq(s)) are specified in Hertz as integers.
       A frequency of 0 causes  T  millisecs  of  silence  to  be
       played.

       Several  frequencies  can be played at once, by specifying
       the frequencies required joined by a punctuation character
       (but no spaces!).

       e.g.   1000,1500,2000 specifies that the three frequencies
       are played together.

       The digital samples (either 8 or 16 bits)  are  played  by
       default  to  the  Linux /dev/dsp device at a samplerate of
       22050 samples per second, in mono mode.

       Fractional Hertz frequencies are not supported. Of course,
       only  frequencies less than half the samplerate (number of
       samples/sec) can be generated.

       Instead of playing the output to /dev/dsp the samples  can
       be  written  to a file as raw samples (-o file) or written
       in WAV format (-w wavfile). These data files can  then  be
       played  back  quickly  with  a raw data or WAV file player
       (e.g. vplay) without the overhead of  actually  generating
       the samples.

OPTIONS
       -8 | -b 8
              set 8 bit unsigned data samples

       -16 | -b 16
              set 16 bit signed little-endian data samples.

       -a     when  used  in conjunction with the -o option, data
              is appended to the file.

       -f     when used in conjunction with the -o or -w options,
              any existing file is silently overwritten.

       -h     display usage and help info




Release 1                    15Mar97                            1





tones(1)               Linux System Manual               tones(1)


       -loop  play  the tone sequence repetitively. Forced off if
              writing samples  to  a  file  with  the  -o  or  -w
              options.

       -o file
              write out samples to a raw data file. You will have
              to remember the data format,  e.g.  samplerate  and
              8/16 bit.

       -s samplerate
              set the number of samples per second to samplerate.
              For many simple uses a samplerate of 8000 is suffi-
              cient, making any saved data files smaller.

       -w wavfile
              write samples out in WAV format to wavfile. The WAV
              header contains details of whether the data is 8 or
              16  bits  and the sampling rate. You cannot use the
              append (-a) option with WAV files.

       -v     be verbose

EXAMPLES
       tones 50 1000 700+1200 800,1100,1300
              generates 3 50 millisecs sine tones, the first con-
              sisting  of  only  1000Hz,  the second of 700Hz and
              1200Hz and the third of 800Hz, 1100Hz and 1300Hz

       tones -loop square 200 700 900 400 500
              generates a sequence of 4 200 millisecs square wave
              tones  which  is  repeated  until  the  program  is
              interupted.

       tones -w seq.wav 70 1016 1200 1080 1150 1016
              generates a sequence of 5 70 millisecs sine  tones,
              and  instead of playing them the samples are stored
              in WAV format in seq.wav which can be played by any
              WAV file player.

FILES
SEE ALSO
       sgen(1)

BUGS
COPYING
       Copyright 1995, 1996, 1997 the author (see below)

       The  software  described  by this manual is covered by the
       GNU General Public License, Version 2, June  1991,  issued
       by :

              Free Software Foundation, Inc.,
              675 Mass Ave,
              Cambridge, MA 02139, USA



Release 1                    15Mar97                            2





tones(1)               Linux System Manual               tones(1)


       Permission  is  granted  to  make  and distribute verbatim
       copies of this manual provided the  copyright  notice  and
       this permission notice are preserved on all copies.

       Permission is granted to copy and distribute modified ver-
       sions of this manual under  the  conditions  for  verbatim
       copying,  provided  that the entire resulting derived work
       is distributed under the  terms  of  a  permission  notice
       identical to this one.

       Permission  is granted to copy and distribute translations
       of this manual into another language, under the above con-
       ditions for modified versions, except that this permission
       notice may be included in translation instead  of  in  the
       original English.

AUTHOR
       Jim Jackson
       School of Computer Studies
       University of Leeds The University of Leeds
       Leeds, LS2 9JT
       UK

       Email: jj@scs.leeds.ac.uk

































Release 1                    15Mar97                            3


