1
.TH sweepgen 1 "20 Feb 1998" "Release 2" "Linux System Manual"
3
.I sweepgen \- an Ncurses based sweep generator program
5
.IP sweepgen\ [options]
8
is a simple sweep signal generator program, with an Ncurses based user
9
interface, that can digitally generate waveforms on the LINUX
12
8 or 16 bit samples can be generated depending on the hardware.
17
mode outputs the generated swept waveform. In
19
mode the swept waveform is output on one channel, and the sweeping waveform
20
is output on the second channel.
22
The sweeping frequency is by default
23
specified as an integer number of Hertz. Fractional Hertz frequencies,
24
specifiable to 0.1Hz or 0.01Hz resolution, are
25
supported by use of the
27
command line option, or the
29
parameter in the configuration file(s). However
31
at 0.1Hz resolution the basic waveform sample buffers generated
33
(and at 0.01Hz resolution 100 times) as big as the samplerate. It typically
34
requires 5.5Mbytes of memory to run at 0.1Hz resolution, 16bit 32000
35
samples/sec. and 55Mbytes of memory to run at 0.01Hz resolution. Because of the
36
large buffer sizes, the initial waveform calculation time can also be lengthy.
37
Remember also that the waveforms are re-calculated whenever the playing
38
parameters, 8/16bit, mono/stereo, samplerate are changed.
41
The swept waveform frequencies are specified either as a lower and upper
42
frequency, or as a centre frequency with a frequency variation.
44
would signify a range of 1000-500 Hz to 1000+500 Hz, i.e. 500 to 1500 Hz
46
Of course, only frequencies less than half the samplerate
47
(number of samples/sec) can be generated. Although this is not checked.
49
The waveforms that can be used as either the sweeping or swept signals are:
53
a standard square wave with a 50% mark space ratio
55
a linear rise from 0 to peak, thru' 0 to negative peak, and back to 0
57
a ramp waveform with 'infinitely' fast flyback (:-) An ideal oscilloscope
60
This is weak. All it consists of is one second of pseudo-randomly generated
61
samples, played repeatedly. I'd love to do proper white/pink noise,
62
but I don't know enough, and I don't think the structure of the program
63
is conducive to accurate noise generation.
65
A square waveform where the mark/space ratio (as a percentage)
66
is 10% (mark/space ratio of 1:9).
68
A lot of thought has gone into the algorithms for generating the waveforms.
69
I believe the sin/cos wave to be very pure (modulo your sound card :-), but
70
I don't have access to a THD meter to measure it.
74
generates one seconds worth of 1 Hz samples at the specified samplerate, for
75
each waveform, and generates sweeping frequency F by circularly sampling
76
every Fth sample. These samples are scaled to fit the swept frequency range
77
and are used to sample the swept waveform to generate the swept signal.
78
Each buffer fragment is generated for the parameter(s)
79
set at that moment. By default, buffer fragment sizes are set so that aprox. 10
80
fragments/sec are generated. Changing a generation parameter, e.g. waveform,
81
frequency, will impact the next buffer fragment generated, and hence
82
changes appear to be almost immediate.
84
If your sounds periodically 'breaks' up with clicks or breaks,
86
that siggen is not being scheduled sufficiently often. Either up the
89
et al.), kill off other processes, get a faster processor, or increase the
90
number of audio buffer fragments that siggen uses. This last will make
91
siggen respond more sluggishly to changes in generation parameters.
95
are two processes that I've found useful to kill off - YMMV.
97
output to /dev/dsp, 22050 samples/sec, stereo if stereo card else mono,
98
16 bit samples if possible, else 8 bit.
99
.SH CONFIGURATION\ FILES
101
Three possible configuration files can be used: a LOCAL config file (usually
102
in current directory), a HOME config file in user's $HOME directory and a
105
All the siggen suite of programs are compiled with the names of the config
106
files built in. By default the configuration files are:
108
is the LOCAL config file.
109
.IP $HOME/.siggen.conf
110
is the HOME config file.
112
is the GLOBAL config file.
114
will indicate which config files will be searched for.
116
The config files do not have to exist. If they exist and are readable by the
117
program they are used, otherwise they are simply ignored.
119
The config files are always searched for configuration values in the order
120
LOCAL, HOME, GLOBAL. This allows a scheme where the sysadmin sets up default
121
config values in the GLOBAL config file, but allows a user to set some or
122
all different values in their own HOME config file, and to set yet more
123
specific values when run from a particular directory.
125
If no configuration files exist, the program provides builtin
126
default values, and most of these values can be set
127
by appropriate command line switches and flags.
129
See siggen.conf(5) for details of the configuration files.
132
looks for configuration values BUFFERSPERSEC, CHANNELS, DACFILE, FRAGMENTS,
133
RESOLUTION, SAMPLERATE, SAMPLESIZE, VERBOSE, VI_KEYS.
135
The aprox. number of sound buffer fragments to play every second
136
(Sound buffersize is always a power of 2).
138
sets the number of channels, mono or stereo.
140
allows the name of the DAC/DSP/PCM device to be changed from /dev/dsp
142
The number of Audio Buffers to configure in the driver.
144
The minimum change possible to the frequency setting. Only 3 values allowed:
145
1Hz , 0.1Hz or 0.01Hz
147
sets the number of samples/sec for the DAC device
149
sets whether 8 or 16 bit samples to be generated
151
sets whether or not to run in verbose mode.
153
if set then the VI cursor moving keys "HJKL" are enabled
157
display usage and help info
161
generate with samplerate of samples/sec
162
.IP -8|-16\ or\ -b\ 8|16
163
force 8 bit or 16 bit mode.
167
set resolution of frequency generation. Valid values are: 1Hz, 0.l1Hz or 0.01Hz
173
swgen, sgen, siggen, tones
177
.I Copyright\ 1995-2008\ Jim\ Jackson
179
The software described by this manual is covered by the GNU General
180
Public License, Version 2, June 1991, issued by :
182
Free Software Foundation, Inc.,
186
Cambridge, MA 02139, USA
188
Permission is granted to make and distribute verbatim copies of
189
this manual provided the copyright notice and this permission notice
190
are preserved on all copies.
192
Permission is granted to copy and distribute modified versions of this
193
manual under the conditions for verbatim copying, provided that the
194
entire resulting derived work is distributed under the terms of a
195
permission notice identical to this one.
197
Permission is granted to copy and distribute translations of this
198
manual into another language, under the above conditions for modified
199
versions, except that this permission notice may be included in
200
translation instead of in the original English.
205
.I Email: jj@franjam.org.uk