paraslash

Paraslash network audio streaming tools


About
News
Download
Documentation
Development

para_mixer

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
LIST OF SUBCOMMANDS
COPYRIGHT
NAME

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

SYNOPSIS

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

DESCRIPTION

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.

OPTIONS

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

print help and exit

--detailed-help

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.
-a
, --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’.

--fade-exponent=<value>

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.

LIST OF SUBCOMMANDS

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

print the long help text

set - set a channel to the given value and exit
Usage: set [--val=<value>]
--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>]
-f
, --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>]
--so-time
=<seconds>

duration of fade-out period

default: 30

--so-vol=<volume>

destination volume for fade-out

default: 20

--snooze-time=<seconds>

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

default: 600

--si-time=<seconds>

duration of fade-in period

default: 180

--si-vol=<volume>

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.
--ivol
=<[channel:]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.

--fo-mood=<mood_spec>

mood or playlist for fade-out

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

--fo-time=<seconds>

duration of fade-out period

default: 1800

No fading if this is set to 0.

--fo-vol=<volume>

destination volume for fade-out

default: 20

--sleep-mood=<mood_spec>

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).

--fi-mood=<mood_spec>

mood or playlist for fade-in

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

--fi-time=<seconds>

duration of fade-in period

default: 1200

No fading if this is set to 0.

--fi-vol=<volume>

destination volume for fade-in

default: 80

COPYRIGHT

Written by Andre Noll
Copyright (C) 2019 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