Codebase list gom / 19c20ff3-6ebe-432a-90b8-7d22f973734d/main src / gom.1.in
19c20ff3-6ebe-432a-90b8-7d22f973734d/main

Tree @19c20ff3-6ebe-432a-90b8-7d22f973734d/main (Download .tar.gz)

gom.1.in @19c20ff3-6ebe-432a-90b8-7d22f973734d/mainraw · history · blame

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
.\"
.\" @GOM_COPYRIGHT@
.\"
.TH GOM 1 "@DATE@" "3rd party" "Contributed tool"

.SH NAME
gom \- a generic audio mixer (supports: OSS and derivatives)

.SH SYNOPSIS
.BI "gom {OPTION}"

.SH VERSION
.BR "" "This manual page was distributed with " "@PACKAGE@ @VERSION@" " (@DATE@)."

.SH DESCRIPTION
.LP
.BR "gom" " is a command line mixer manipulation program including a
minimal, yet fully functional internal ineractive text based interface.

Currently, there is also an internal X (xview) interface, but it's not
well maintained and will eventually be removed when a proper alternative
is available.

At the moment, gom only supports the Open Sound System (OSS) and
its derivatives (OSS/Lite, OSS/Free (these two are obviously obsolete),
the new Linux Sounddriver, ...).

.BR "gom" " tries to provide a complete and convenient interface for all"
kind of audio mixer manipulation.  gom's facilities include sound
driver (compile time) and sound card (run time) independence,
arbitrary mixer selection, loading and saving of mixer settings,
volume fading, verbosity-level driven output, "Un*x-like scripting
support", etc.

Apart from the exhaustive command line interface described here, gom
has a built-in interactive terminal interface (that I call
gomii, gom interactive interface) using ncurses. It supports adjustable
(this includes disabling) real time updating. The gomii is not
explained in this manual page; please refer to the specific online
help when using it. However, the gomii's handling
should be obvious, and actually it "tries to resemble" the command
line options.

There is also one more gomii for X using the xview toolkit. However,
gom needs to be especially compiled to include this, and it is intended
to be replaced eventually by some frontend for X using the gom binary.

And remember: gom is spelled g-o-m, but pronounced backwards for
compatibility reasons. Its real, actual and recursive title is
.B gom, GOM is nOt yet another Mixer
(for reasons beyond the scope of this manual).

.SH CONFIGURING GOM

There is
.B no mandatory configuration
for gom; it runs fine just as it is, without any configuration. I.e.,
for senseful use without configuration, one always needs to (at least)
specify the mixer to use.  For example:

gom --device=/dev/mixer2 --mute-all

However, you
.I can
configure gom a) for the system and b) for an
individual user; each user configuration is preferred in favor of
the corresponding system configuration. In fact, the routine for
loading _any_ option file is to 1st try the user file, then the
system file, and else fail.

To configure, you should use the script
.IR "gomconfig" "(8)"
(or most likely 
.B gomconfig --force
) that comes with the distribution -- using it as root will change
the system configuration, normal users will change their own
configuration. You may well skip the rest of this chapter if you do
so.

All configuration files for gom are simply gatherings of command
line options to gom (where some files are restricted to certain
options). Please see "--get-options" below.

The configuration files are (replace the "~/.gom" with "/etc/gom" for the
system configuration):
.TP
.B ~/.gom/conf.default_mixer
Loaded on every startup of gom. Restricted to: "-d". Provides implicit
opening of a mixer device.
.TP
.B ~/.gom/conf.initialize
Loaded with the option '-O, --originate, --initialize'. Unrestricted. 
Provides creation of an initialization routine, even for multiple mixers.
.TP
.B ~/.gom/conf.gom
Loaded on every startup of gom. Restricted to '-v, -q, -F, -U'.
Provides implicit creation of certain bevaviours. Discouraged.
.TP
.B ~/.gom/<mixer-device>.<name>
These file are accessed simply by their <name> when <mixer-device>
is opened. See --get-options below.

.SH TERMINOLOGY, PHILOSOPHY

A mixer is a set of channels (e.g. vol, line, cd). Each channel has
a set of volume channels (e.g. left, right), and optionally a
recording source flag.

The evaluation which channels are available, and, for an available channel,
which volume channels and which flags are available on that specific
channel, is being done at runtime; this is sound card, and possibly
sound driver dependent.

Thus, there are sound driver supported channels and specific
sound card supported channels.
.B gom --info-all
shows all sound driver supported channels, plus indicating
their specific availability.

Up to the time of this writing, the only sound driver supported
is OSS (Open Sound System) and its derivatives. This driver exists
for a variety of platforms and in various flavours (especially, the
new Sounddriver of Linux is a derivative of OSS).
(Remark: Gom's point of view on how a
"generic" mixer should look like may be strongly influenced by
the OSS API; however, the author feels that this view might not
(yet) be absolutely generic). At the time of this writing,
OSS supports 17 channels, and a maximum of two volume channels
per channel (i.e., only "mono" or "stereo").

Of course, as gom depends on the sound driver installed on the system,
its proper installation (which is naturally not covered here) is
mandatory for gom (as for any other sound-using program).

.SH OPTIONS

Options can be given in arbitrary order or amount; they are computed
in sequence from left to right. Default values (if any), are 
given in [].
For boolean arguments, "1" means on, "0" means off.

Note that for options with _optional_ arguments, these must be gi
ven like "gom -G<file>" (or "gom --get-settings=<file>" resp.) ra
ther than "gom -G <file>" (or "gom --get-settings <file>" resp.).
Otherwise, they will be ignored (or, at least with my implementat
ion of getopt;).

.TP
Configuring options:
.TP
.B -d, --device, --mixer <argument>
[ **no mixer** ] Set mixer special device file to <argument>.  If the
new mixer is valid, the current mixer --if any-- will be closed and
the new mixer opened. Current channel, current channel volume, the
channel lock setting and the snapshot will be resetted to
defaults.
.TP
.B -c, --channel <argument>
[first available channel] Set current mixer channel to <argum
ent>. The channel may be given as number or as name.
.TP
.B -C, --volume-channel <argument>
[first available volume channel on current channel] Set volum
e channel on current mixer channel to <argument> (e.g., for s
tereo, 0 means left, 1 means right volume).
.TP
.B -k, --lock <argument>
.TP
.B -K, --lock-all <argument>
[1] Lock or unlock current or all channel(s). Locking means s
yncing of the stereo volumes (balance) for all volume setting
s gom might do -- this doesn't change any volume settings by 
itself (i.e., it doesn't auto-balance). Thus, a locked channe
l might have unbalanced volumes.
.TP
.B -F, --fade-interval <argument>
[5] Set fade interval to <argument> seconds. See --fade-to-lo
udness.
.TP
.B -U, --refresh-interval <argument>
[30] Set gomii refresh (update) interval to <argument> second
s (zero disables).
.TP
.B -W, --write-config, --save-config
This option is obsolete since version 0.29.10.

.TP
Setting mixer options:
.TP
.B -l, --loudness, --volume <argument>
Set current volume channel on current channel to <argument>. 
If the argument is being given with a leading "+" or "-", the
given value will be added or substracted, respectively, from 
the current value. The allowed range is from zero up to a sou
ndcard driver dependent maximum.
.TP
.B -r, --record <argument>
Set recording for current channel on or off.
.TP
.B -R, --record-single
Set recording for current channel on and disable all other re
cording sources.
.TP
.B -L, --fade-to-loudness, --fade-to-volume <argument>
Like --loudness, but fade to the new volume within a time giv
en with --fade-interval.
.TP
.B -m, --mute
.TP
.B -M, --mute-all
Mute current or all channels. Muting means setting all channe
l volumes to 0.

.TP
Mixer settings options:
.TP
.B -G, --get-options, --load-options, --get-settings, --load-setting
Get options from/to file <argument>. If no argument is given,
the default file (named "default") is used. Non-absolut given
filenames will be expanded to "<mixer-device>.<argument>", and
then first searched for in the user and -- if this fails --
in the system configuration directory. Any free-form files with
gom one-character command line options in any lines starting
with a dash (in column zero) will make sense to this option.
.TP
.B -S, --save-settings [<argument>]
Save mixer settings to a free-form option file; for the file 
name, the same rules as for loading option files apply, except
that only the user configuration dir will be used. Files with
thusly expanded filenames will be silently overwritten; other
files never. When saving, care is being taken that the "last
recording source error" can't occur when loading these options
(and maybe there are other reasonable side effects apart
from the pure mixer settings (e.g. channel locking, current
channel)). The bottom line to these load/save options is that
you can easily save new and load predefined mixer settings from
anywhere.
.TP
.B -z, --snapshot-settings
.TP
.B -Z, --unsnapshot-settings, --restore-settings
[mixer settings after opening a new mixer] Snap- or unsnapsho
t to/from current mixer settings.
.TP
.B -O, --originate, --initialize
Load the options file "initialize"; all options are allowed in 
this file. This is meant to initialize mixers. For example:
"-d/dev/mixer0 -G -d/dev/mixer1 -G". This would load the default
settings file for both the mixer0 and the mixer1 device.

.TP
Informational options:
.TP
.B -t, --info
Display current channel information.
.TP
.B -T, --info-all
Display overall information.
.TP
.B -V, --version
Display version information.
.TP
.B -w, --copyright, --copyleft, --license, --warranty
Display copyright/license/warranty information.
.TP
.B -h, --help
.TP
.B -H, --help-verbose
Display this help normally or verbose; both helps are still d
ependent on the current verbosity level (i.e., higher verbosi
ty levels might still show more; "gom -v0 -H" and "gom -h" pr
oduce the same output). For the normal verbosity level, these
are reasonable macros.

.TP
Special options:
.TP
.B -e, --execute <argument>
Execute the shell command <argument>.

.TP
Command line only options:
.TP
.B -Y, --ignore-config
Skip all automatically loaded configurations files; this must
be given before any other option (except q (quiet) or v (verbose)).
.TP
.B -i, --interface, --gomii <argument>
Explicitly start up a build-in gomii (<argument>=t: terminal 
gomii, <argument>=x: X gomii).
.TP
.B -v, --verbose [<argument>]
[NORMAL] Set output verbosity to <argument> (number, the high
er, the more verbose). If no argument is given, the level
will be increased by 1.
.TP
.B -q, --quiet, --silent
Set output verbosity to QUIET (only error / error help messag
es).
.TP
.B -p, --pure, --print <argument>
Pure-print the current channels value given by <argument> to 
stdout (<argument>=l|r, according to one character options). 
Useful for getting values "into" scripts together with the --
quiet option.
.TP
.B -x, --extract-settings
Extract all mixer settings as a gom option line to stdout (e.
g. for "setting=`gom --quiet --extract-settings`" and "gom --
quiet $settings" later in a bash script).
.TP
.B -I, --read-stdin
Read options from stdin (until EOF).

.SH ENVIRONMENT
.TP
.IR "HOME" " used as prefix for the configuration directory " ".gom/" " for a non-root user."
.BR

.SH FILES
.TP
.IR "/etc/gom/" " system configuration directory (user root)."
.TP
.IR "$HOME/.gom/" " user configuration dir (all non-root users)."

.TP
Files inside the configuration directory:
.TP
.IR "conf.default_mixer" " option file for default mixer (loaded on startup).
.TP
.IR "conf.gom" " option file (loaded on startup).
.TP
.IR "conf.initialize" " option file for initialization (loaded via --initialize).
.TP
.IR "<mixer-device>.default" " default options file for <mixer-device> (loaded with --get-options)."
.TP
.IR "<mixer-device>.<name>" " mixer settings that can be easily accessed just by <name>
with --get-options=<name> when <mixer-device> is open."

.SH DIAGNOSTICS
.BR
Exit status is 0 if no errors were detected while running gom; it is
greater than 0 if one or more errors were detected. This should be
interpreted as warning, not necessarily as failure.

(The amount of detected errors will be printed out if the verbosity level
is VERBOSE or higher; the warning exit status is currently always 2, but
this may change).

.SH EXAMPLES

(This section is incomplete and most likely confusing ;).

.TP
.B "1. gom as system startup"



.TP
.B "2. gom as user startup"



.TP
.B "3. gom in a running session"



.TP
.B "4. gom in scripts"



.TP
.B "5. Some more detailed examples"

.TP
.B gom --interface=t, gom -it
Interactively manipulate mixer settings with the terminal gomii.
.TP 
.B gom --get-settings, gom -G
(e.g. when you log in as user). Loads user's default options file.
.TP 
.B gom --get-settings=cd, gom -Gcd
Loads options file "cd" (most likely a setting for playing cds).
.TP 
.B gom -d/dev/mixer0 -M -d/dev/mixer1 -l100
First, mute mixer 0, then set the volume of the first channel on mixer 1 to 100.
.TP
.B gom -M -c vol -l 90 -c pcm -l 90 -e "bplay super.voc" -Z
Plays the sample
.IR "super.voc" " on channel 4=pcm with all other channels muted,"
restoring original mixer settings afterwards.
.TP 
.B gom -ix -e <any_sound_player> -Z
Plays any sound, interactively setting the mixer before with the
X gomii and restoring settings afterwards.

.SH AUTHOR

@GOM_COPYRIGHT@

The X gomii of the gom package is also Copyright (c) Hannu Savolainen
1993 (as it is originally based on "xvmixer" by Hannu Savolainen).

The gom package is licensed under the GPL (GNU General Public License).
The files "README" and "COPYING" in the original distribution contain
the exact terms.

.SH SEE ALSO

.IR "gomconfig" "(8)"

Information about OSS can currently (1999 August 18) be found at
"http://www.opensound.com/".

.SH KNOWN BUGS
Gom does not detect recursion in option files (e.g. by adding a "-Gcd"
to an options file named "cd").

There must always be at least one recording source, so when writing
option files for gom "by hand", first put all to-be-active recording sources
on, then all to-be-inactive recording sources off, else one recording source
might not become inactive in unfortunate circumstances. Mixer settings
automatically written by gom are saved in this manner.

The mixer settings files may be inconsistent between different
sound drivers (i.e., if the channel numbering is different).

Loading settings from a options file that was saved from a different
mixer may lead to errors (if some option is not available on the
current mixer), or to silently not-setting of newly available
options of the current mixer; saving mixer settings with the
mixer name as prefix since 0.29.99 avoids this at least for
not explicitly given mixer settings file names.

The "text blocking output" cuts words (true, too, for the OPTIONS
section of this manual page).

X gomii bugs:

The X gomii has some "bugs" due to xview and/or the lack of
documentation available for the author (all the rest of this
section):

The X gomii creates its display objects with xview, but doesn't
check for allocation errors. I guess xview somehow handles this ;).

The X gomii's scroll window displays in a non-fixed font.

Some placements in the X gomii are still static; it could imagine that
the display might look a little bit screwed up if you use a different
configuration than mine (e.g. a different font).

Xview, in general, "seems to be a little bit unstable" (the author
itself locked all his major input devices (i.e., mouse & keyboard (you
should be so clever to have some other means to access your computer
when programming xview ;)) several times by using xview applications
under X (not necessarily the X gomii) for whatever unknown reasons
(and without being able to reproduce the bug properly). (()())

.SH KNOWINGLY NO BUGS
If starting gom results in loading and initializing the kernel sound
driver (e.g. if the sound driver gets kerneld-autoloaded under Linux),
the sound card's settings are set to the driver's default by the driver
itself.
.B gom
has nothing to do with these defaults and doesn't change any settings --
any program using the sound driver in that situation would have the
same effect.