~ubuntu-branches/ubuntu/raring/siggen/raring

« back to all changes in this revision

Viewing changes to .pc/spelling.patch/sgen.1

  • Committer: Package Import Robot
  • Author(s): Thorsten Alteholz
  • Date: 2012-03-13 18:51:09 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20120313185109-0zkxvq2vpwbjbkf2
Tags: 2.3.10-5
* new maintainer (closes: #628941)
* debian/rules: remove explicit patch targets
* debian/rules: replace dh_clean -k by dh_prep
* debian/rules: build-arch and build-indep introduced
* debian/rules: standard moved to 3.9.3 (no changes)
* debian/watch: added, but not working with upstreams website
* debian/control: dependency on quilt removed
* debian/control: no public vcs available
* debian/control: moved to dh 9
* debian/patches: add header
* debian/source/format: 3.0 (quilt) introduced

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH sgen 1 "20 Feb 1998" "Release 2.3" "Linux System Manual"
 
2
.SH NAME
 
3
.I sgen \- a simple signal generator program
 
4
.SH SYNOPSIS
 
5
.IP sgen\ [flags]\ waveform\ freq
 
6
waveform is sine, cosine, square, triangle, sawtooth, noise
 
7
.IP sgen\ [flags]\ pulse\ freq\ [Mark/Space]
 
8
pulse has extra param Mark/Space % - def. is 10 (%)
 
9
.SH DESCRIPTION
 
10
.I sgen
 
11
is a simple signal generator program, that can digitally generate standard
 
12
waveforms on the LINUX /dev/dsp device. 8 or 16 bit samples can be generated, 
 
13
in mono or stereo. In stereo the two signals can be in phase or in anti-phase
 
14
(180 degrees). The frequency is specified as an integer number of Hertz.
 
15
Fractional Hertz frequencies are not supported. Of course, only frequencies 
 
16
less than half the samplerate (number of samples/sec) can be generated.
 
17
.PP 
 
18
The waveforms that can be generated are:
 
19
.IP sine
 
20
A standard sine wave
 
21
.IP cosine
 
22
a sine wave with a 90 degree phase shift
 
23
.IP square
 
24
a standard square wave with a 50% mark space ratio
 
25
.IP sawtooth
 
26
a ramp waveform with 'infinately' fast flyback (:-) An ideal oscilloscope
 
27
timebase signal.
 
28
.IP triangle
 
29
shaped like equally spaced teeth on a saw (:-)
 
30
.IP noise
 
31
This is weak. All it consists of is one second of pseudo-randomly generated
 
32
samples, played repeatedly. I'd love to do proper white/pink noise,
 
33
but I don't know enough, and I don't think the structure of the program
 
34
is conducive to accurate noise generation.
 
35
.IP pulse
 
36
A square waveform where the mark/space ratio (as a percentage) can be 
 
37
specified. The default value is 10% (mark/space ratio of 1:9).
 
38
.PP
 
39
.I sgen
 
40
creates one second's worth of generated output in a buffer and plays the
 
41
buffer repeatedly, until it is terminated.
 
42
.PP
 
43
A lot of thought has gone into the algorithms for generating the waveforms.
 
44
I believe the sin/cos wave to be very pure (modulo your sound card :-), but
 
45
I don't have access to a THD meter to measure it. For best signal accuracy
 
46
.I NEVER
 
47
use the gain factor option (-A). The generator will then make the wave's
 
48
peak value fit the maximum digital values allowed. Use a mixer program to
 
49
control the output volume, or an external attenuator.
 
50
.PP
 
51
The gain factor option can be useful for simulating a signal that has been
 
52
subject to clipping. Specify a gain of > 100%. In fact a trapezoid signal
 
53
can be made by generating a clipped triangular wave. The greater the gain,
 
54
the closer the signal approaches a square wave (the rise and fall times
 
55
decrease).
 
56
.IP Defaults
 
57
output to /dev/dsp, 22050 samples/sec, mono, 16 bit
 
58
samples if possible, else 8 bit. 
 
59
.SH OPTIONS
 
60
.IP -h
 
61
display usage and help info
 
62
.IP -v
 
63
be verbose
 
64
.IP -o\ file
 
65
write digital sample to file ('-' is stdout)
 
66
.IP -w\ file
 
67
as '-o' but written as a WAVE format file. -a (append) is not valid
 
68
with this option.
 
69
.IP -f,-a
 
70
force overwrite/append of/to file.
 
71
.IP -C\ file
 
72
use "file" as the local configuration file (see below).
 
73
.IP -s\ samples
 
74
generate with samplerate of samples/sec
 
75
.IP -8/-16\ or\ -b\ 8|16
 
76
force 8 bit or 16 bit mode.
 
77
.IP -1,-2,-2a
 
78
mono (def), stereo or stereo in antiphase
 
79
.IP -A\ n
 
80
scale samples by n/100, def. n is 100 (i.e. percentage of full scale output)
 
81
.IP -t\ N|Nm
 
82
generate output for either N secs or Nm millisecs only.
 
83
.IP -x10\ or\ -x100
 
84
Scale frequencies down by a factor of 10 or 100. This allows fractional
 
85
Hz values to be generated. See EXAMPLES below for its use. It is
 
86
a Kludge.
 
87
 
 
88
.SH EXAMPLES
 
89
.IP sgen\ -v\ sin\ 440
 
90
generate a sin wave of 440Hz at 22050 samples/sec, 16bit samples on 16 bit
 
91
card, 8 bit samples on an 8 bit card.
 
92
.IP sgen\ -v\ -s\ 44100\ -w\ sin444.wav\ sin\ 440
 
93
as above but at a samplerate or 44100/sec and save a one second of samples 
 
94
as a WAVE file in sin440.wav
 
95
.IP sgen\ -v\ -A\ 500\ saw\ 1000
 
96
generate a 1000Hz sawtooth wave severely clipped. The waveform will look like 
 
97
a square wave with a rise and fall time of one tenth of the wave period. (I
 
98
think that's what the scribbled calculation on the back of this envelope
 
99
gives :-)
 
100
.IP sgen\ -v\ -2a\ sin\ 1000
 
101
generate 2 1000Hz sine waves out of phase by 180 degrees, one on each 
 
102
stereo channel.
 
103
.IP sgen\ -v\ pulse\ 1000\ 95
 
104
generate a 1000Hz pulse wave with the 'on' period being 95% of the
 
105
waveform period, i.e. a mark/space ratio of 19:1.
 
106
.IP sgen\ -v\ -x10\ sin\ 2616
 
107
generate middle C 261.6Hz (2616/10) from the equally tempered scale. Yes
 
108
it's a royal pain remembering to scale all freqs. by a factor of 10, but
 
109
I needed it in a hurry and didn't have time to do it better.
 
110
 
 
111
.SH CONFIGURATION\ FILES
 
112
.PP
 
113
Three possible configuration files can be used: a LOCAL config file (usually
 
114
in current directory), a HOME config file in user's $HOME directory and a
 
115
GLOBAL config file.
 
116
.PP
 
117
All the siggen suite of programs are compiled with the names of the config
 
118
files built in. By default the configuration files are:
 
119
.IP ./.siggen.conf
 
120
is the LOCAL config file.
 
121
.IP $HOME/.siggen.conf
 
122
is the HOME config file.
 
123
.IP /etc/siggen.conf
 
124
is the GLOBAL config file.
 
125
.IP sgen\ -h
 
126
will indicate which config files will be searched for.
 
127
.PP
 
128
The config files do not have to exist. If they exist and are readable by the
 
129
program they are used, otherwise they are simply ignored.
 
130
.PP
 
131
The config files are always searched for configuration values in the order
 
132
LOCAL, HOME, GLOBAL. This allows a scheme where the sysadmin sets up default
 
133
config values in the GLOBAL config file, but allows a user to set some or
 
134
all different values in their own HOME config file, and to set yet more
 
135
specific values when run from a particular directory.
 
136
.PP
 
137
If no configuration files exist, the program provides builtin
 
138
default values, and most of these values can be set
 
139
by appropriate command line switches and flags.
 
140
.PP
 
141
See siggen.conf(5) for details of the configuration files.
 
142
.PP
 
143
.I sgen
 
144
looks for configuration values CHANNELS, DACFILE, SAMPLERATE,
 
145
SAMPLESIZE, VERBOSE.
 
146
.IP CHANNELS
 
147
sets either mono or stereo mode like the '-1|-2' options.
 
148
.IP DACFILE
 
149
allows the name of the DAC/DSP/PCM device to be changed from /dev/dsp
 
150
.IP SAMPLERATE
 
151
sets the number of samples/sec for the DAC device
 
152
.IP SAMPLESIZE
 
153
sets whether 8 or 16 bit samples to be generated
 
154
.IP VERBOSE
 
155
sets whether or not to run in verbose mode.
 
156
 
 
157
.SH
 
158
.SH SEE ALSO
 
159
.IP siggen.conf(5)
 
160
.SH
 
161
.SH BUGS
 
162
.SH
 
163
.SH COPYING
 
164
.I Copyright\ 1995-2008\ Jim\ Jackson
 
165
.PP
 
166
The software described by this manual is covered by the GNU General
 
167
Public License, Version 2, June 1991, issued by :
 
168
.IP
 
169
Free Software Foundation, Inc.,
 
170
.br
 
171
675 Mass Ave,
 
172
.br
 
173
Cambridge, MA 02139, USA
 
174
.PP
 
175
Permission is granted to make and distribute verbatim copies of
 
176
this manual provided the copyright notice and this permission notice
 
177
are preserved on all copies.
 
178
.PP
 
179
Permission is granted to copy and distribute modified versions of this
 
180
manual under the conditions for verbatim copying, provided that the
 
181
entire resulting derived work is distributed under the terms of a
 
182
permission notice identical to this one.
 
183
.PP
 
184
Permission is granted to copy and distribute translations of this
 
185
manual into another language, under the above conditions for modified
 
186
versions, except that this permission notice may be included in
 
187
translation instead of in the original English.
 
188
.SH AUTHOR
 
189
.I Jim Jackson
 
190
.br
 
191
.sp
 
192
.I Email: jj@franjam.org.uk
 
193
.br