Paraslash network audio streaming tools




para_mixer - alarm clock and volume-fader for OSS and ALSA


para_mixer [<options>] -- [<subcommand>] [<subcommand_options>]


para_mixer adjusts the settings of an audio mixing device. It can set the level of a mixer channel, or fade the level from one value to another in a given time period. The sleep and snooze subcommands contact para_server to start or stop streaming.


Common options
The following options are implemented generically and are available for many of the commands.
, --help

print help and exit


print help, including all details, and exit

-V, --version

print version and exit

-c, --config-file=<filename>

path to alternative config file

default: ~/.paraslash/mixer.conf

para_mixer reads its config file right after parsing the options that were given at the command line. If an option is given both at the command line and in the config file, the value that was specified at the command line takes precedence.

-l, --loglevel=<severity>

control amount of logging

values: debug, info, notice, warning, error, crit, emerg

Log only messages with severity greater or equal than the given value. Possible values:

debug: Produces really noisy output. info: Still noisy, but won’t fill up the disk quickly. notice: Indicates normal, but significant event. warning: Unexpected events that can be handled. error: Unhandled error condition. crit: System might be unreliable. emerg: Last message before exit.

Options for para_mixer
These options apply to several subcommands.
, --mixer-api=<api>

select alternative mixer API

ALSA is preferred over OSS if both APIs are supported and this option is not given. To see the supported mixer APIs, use this option with an invalid string as the mixer API, e.g. --mixer-api help.

-m, --mixer-device=<device>

set mixer device

The default device (used if this option is not given) depends on the selected mixer API. For ALSA, the default is ’hw:0’ which corresponds to the first sound device. For OSS, ’/dev/mixer’ is used as the default.

-C, --mixer-channel=<channel>

select a mixer channel

For the ALSA mixer API, the possible values are determined at runtime depending on the hardware and can be printed by specifying an invalid mixer channel, for example --mixer-channel help. The default channel is ’Master’.

For OSS the possible values are invariably ’volume’, ’bass’, ’treble’, ’synth’, ’pcm’, ’speaker’, ’line’, ’mic’, ’cd’, ’imix’, ’altpcm’, ’reclev’, ’igain’, ’ogain’. However, not all listed channels might be supported on any particular hardware. The default channel is ’volume’.


set non-linear time scale for fading

default: 0

This option affects the fade, snooze and sleep subcommands. It is ignored in set mode.

The argument must be a number between 0 and 100. The default value 0 corresponds to linear scaling. That is, the value of the mixer channel is increased or decreased in fixed time intervals until the destination value is reached. Exponents between 1 and 99 cause low channel values to be increased more quickly than high channel values. Large exponents cause greater differences. The special value 100 sets the destination value immediately. The command then sleeps for the configured fade time.


help - print subcommand help
Usage: help [--long] [--] [<subcommand>]
, --long

print the long help text

set - set a channel to the given value and exit
Usage: set [--val=<value>]

mixer channel value to set

default: 10

fade - fade a channel to the given value in the given time
Usage: fade [--fade-vol=<volume>] [--fade-time=<seconds>]
, --fade-vol=<volume>

destination volume for fading

default: 50

-t, --fade-time=<seconds>

duration of fade period

default: 5

snooze - fade out, pause, sleep, play, fade in
Usage: snooze [--so-time=<seconds>] [--so-vol=<volume>] [--snooze-time=<seconds>] [--si-time=<seconds>] [--si-vol=<volume>]

duration of fade-out period

default: 30


destination volume for fade-out

default: 20


delay between end of fade-out and begin of fade-in

default: 600


duration of fade-in period

default: 180


destination volume for fade-in

default: 80

sleep - stream, fade out, sleep, fade in
Usage: sleep [--ivol=<[channel:]volume>] [--fo-mood=<mood_spec>] [--fo-time=<seconds>] [--fo-vol=<volume>] [--sleep-mood=<mood_spec>] [--wake-time=<[+][HH][:MM]>] [--fi-mood=<mood_spec>] [--fi-time=<seconds>] [--fi-vol=<volume>]

Change to the initial volume and select the initial mood/playlist. Fade out to the given fade-out volume in the specified time. Switch to the sleep mood/playlist and wait until wake time minus fade-in time. Finally, switch to the wake mood/playlist and fade in to the fade-in volume.

set initial volume

default: 60

Used as the start volume, before fading out to the fade-out volume. The channel part may be omitted, in which case the default channel is used. This option may be given multiple times.


mood or playlist for fade-out

This mood (or playlist) is selected right after setting the initial volume.


duration of fade-out period

default: 1800

No fading if this is set to 0.


destination volume for fade-out

default: 20


mood/playlist between fade-out and fade-in

Select the given mood or playlist after the fade-out. If unset, playback is stopped until fade-in starts.

-w, --wake-time=<[+][HH][:MM]>

when to start fade in

default: +9:00

If the optional plus character is given, the wake time is computed as now + HH hours + MM minutes. Otherwise the HH:MM argument is considered an absolute time (referring to either the current or the next day).


mood or playlist for fade-in

This mood or playlist is selected right before fade-in begins.


duration of fade-in period

default: 1200

No fading if this is set to 0.


destination volume for fade-in

default: 80


Written by Andre Noll
Copyright (C) 2021 Andre Noll
License: GNU GPL version 2
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Report bugs to Andre Noll