siggen(1)
β¨ NAME β¨
siggen β an Ncurses based signal generator program π
okay so first things first bestie, this is a page from the Linux System Manual, section 1, and the program's name is siggen. she makes waveforms. she's iconic. let's go π
π SYNOPSIS π
siggen [options] [waveform [freq]]
π DESCRIPTION π
siggen is a simple signal generator program, with an Ncurses based user interface, that can digitally generate standard waveforms on the LINUX /dev/dsp device. Depending on your hardware, you can generate 8 or 16 bit samples. it's giving "I built this myself and I'm proud of it" β¨
siggen lets you generate two independent waveforms at once, no cap. In stereo the two signals show up on different channels. In mono the two signals get digitally mixed down onto the one mono channel. two besties, one channel, they're sharing π«Ά
The frequency is specified as an integer number of Hertz. Fractional Hertz frequencies are not supported. And like, of course, only frequencies less than half the samplerate (number of samples/sec) are accurately meaningful. You can specify higher frequencies, but don't expect to hear them! π
On screen, values for individual fields can be locked so you don't accidentally change them. The unlock facility unlocks all locked fields at once β mass liberation, slay π
Corresponding values for the 2 channels can be set to track β the values are made equal and a change to one causes a change to the other. e.g. making the frequency values track will make both channels the same frequency, and altering one freq. value alters both simultaneously. it's giving synchronized swimming π¦
The waveforms that can be generated are:
sineβ a standard sine wave πcosineβ a sine wave with a 90 degree phase shiftsquareβ a standard square wave with a 50% mark space ratiotriangleβ a linear rise from 0 to peak, thru' 0 to negative peak, and back to 0 πsawtoothβ a ramp waveform with 'infinitely' fast flyback (:-) An ideal oscilloscope timebase signal.noiseβ ngl this one is weak. All it consists of is one second of pseudo-randomly generated samples, played repeatedly. The author would love to do proper white/pink noise, but doesn't know enough, and doesn't think the structure of the program is conducive to accurate noise generation. we respect the honesty fr fr πpulseβ a square waveform where the mark/space ratio (as a percentage) can be specified. The default value is 10% (mark/space ratio of 1:9).
A lot of thought has gone into the algorithms for generating the waveforms. The author believes the sin/cos wave to be very pure (modulo your sound card :-), but doesn't have access to a THD meter to measure it. For best signal accuracy leave the gain setting at 100(%). The generator will then make the wave's peak value fit the maximum digital values allowed. Use a mixer program to control the output volume, or an external attenuator. π₯
The gain factor option can be useful for simulating a signal that has been subject to clipping, by specifying a gain of > 100%. In fact a trapezoid signal can be made by generating a clipped sawtooth wave. The greater the gain, the closer the signal approaches a square wave (the rise and fall times decrease). glow-up arc honestly β¨
siggen ordinarily generates one seconds worth of 1 Hz samples at the specified samplerate, for each waveform, and generates frequency F by circularly sampling every Fth sample. Each buffer fragment is generated for the parameter(s) set at that moment. Buffer fragment sizes are set so that aprox. 10 fragments/sec are generated. Changing a generation parameter, e.g. waveform, frequency, gain, will impact the next buffer fragment generated, and hence changes appear to be almost immediate. β‘
The -res option can be used to make siggen generate signals with 0.1Hz resolution, or 0.01Hz resolution. However be warned: at 0.1Hz resolution the basic waveform sample buffers generated are each 10 times (and at 0.01Hz resolution 100 times) as big as the samplerate. It typically requires 5.5Mbytes of memory to run at 0.1Hz resolution, 16bit 32000 samples/sec, and 55Mbytes of memory to run at 0.01Hz resolution. Because of the large buffer sizes, the initial waveform calculation time can also be lengthy. Remember also that the waveforms are re-calculated whenever the playing parameters β 8/16bit, mono/stereo, samplerate β are changed. π«
If your sounds periodically 'breaks' up with clicks or breaks, it is usually a sign thatsiggenis not being scheduled sufficiently often. Either increase the priority (seeniceet al.), kill off other processes, get a faster processor, or increase the number of audio buffer fragments thatsiggenuses. This last will makesiggenrespond more sluggishly to changes in generation parameters.syslogdandcrondare two processes that the author has found useful to kill off β YMMV.
πΈ Defaults πΈ
- output to
/dev/dsp - 22050 samples/sec
- stereo if stereo card else mono
- 16 bit samples if possible, else 8 bit
- 3 audio buffer fragments
π CONFIGURATION FILES π
Three possible configuration files can be used: a LOCAL config file (usually in current directory), a HOME config file in user's $HOME directory and a GLOBAL config file. three tiers of config, a whole hierarchy bestie π
All the siggen suite of programs are compiled with the names of the config files built in. By default the configuration files are:
./.siggen.confβ is the LOCAL config file.$HOME/.siggen.confβ is the HOME config file./etc/siggen.confβ is the GLOBAL config file.siggen -hβ will indicate which config files will be searched for. π
The config files do not have to exist. If they exist and are readable by the program they are used, otherwise they are simply ignored. no drama, no crash, we love a chill program π§
The config files are always searched for configuration values in the order LOCAL, HOME, GLOBAL. This allows a scheme where the sysadmin sets up default config values in the GLOBAL config file, but allows a user to set some or all different values in their own HOME config file, and to set yet more specific values when run from a particular directory. it's giving cascading stylesheets but for sound π
If no configuration files exist, the program provides builtin default values, and most of these values can be set by appropriate command line switches and flags.
See siggen.conf(5) for details of the configuration files.
siggen looks for configuration values BUFFERSPERSEC, CHANNELS, DACFILE, FRAGMENTS, RESOLUTION, SAMPLERATE, SAMPLESIZE, VERBOSE, VI_KEYS.
BUFFERSPERSECβ The aprox. number of sound buffer fragments to play every second (Sound buffersize is always a power of 2).CHANNELSβ sets the number of channels, see'-c'option.DACFILEβ allows the name of the DAC/DSP/PCM device to be changed from/dev/dspFRAGMENTSβ The number of Audio Buffers to configure in the driver.RESOLUTIONβ The minimum change possible to the frequency setting. Only 3 values allowed:1Hz,0.1Hzor0.01HzSAMPLERATEβ sets the number of samples/sec for the DAC deviceSAMPLESIZEβ sets whether 8 or 16 bit samples to be generatedVERBOSEβ sets whether or not to run in verbose mode.VI_KEYSβ if set then the VI cursor moving keys"HJKL"are enabled
π¦ OPTIONS π¦
-hβ display usage and help info π-BPS nβ configure to play aprox. n audio buffers per second.-C configfileβ Use configfile as the LOCAL configuration file.-NB nβ set number of audio buffers to n-vβ be verbose π£οΈ-s samplesβ generate with samplerate of samples/sec-8|-16or-b 8|16β force 8 bit or 16 bit mode.-1|-2β mono or stereo-res nβ set resolution of frequency generation. Valid values are:1Hz,0.l1Hzor0.01Hz
β EXAMPLES β
(empty bestie, the manpage left this one blank π)
π FILES π
(also empty, iconic of it honestly π)
π SEE ALSO π
signalgen, swgen, tones, sweepgen, siggen.conf
π BUGS π
(no bugs listed, we're choosing to believe it's perfect β¨)
π COPYING π
Copyright 1995-2008 Jim Jackson
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
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 versions 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 conditions for modified versions, except that this permission notice may be included in translation instead of in the original English.
π AUTHOR π
Jim Jackson
Email: jj@franjam.org.uk
okay that's the whole thing bestie, go make some waveforms πβ¨
and for the record, this was Release 2, dated 20 Aug 1999 β a certified vintage classic, and we're obsessed π«Άπ
π¦ where this page comes from
- debian bookworm: siggen 2.3.10-11
- ubuntu jammy: siggen 2.3.10-11
- ubuntu noble: siggen 2.3.10-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms