m4_define(PROGRAM, para_fade) m4_define(DEFAULT_CONFIG_FILE, ~/.paraslash/fade.conf) [suite fade] version-string = GIT_VERSION() [supercommand para_fade] purpose = alarm clock and volume-fader for OSS and ALSA [description] para_fade is a simple program which 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. In sleep and snooze mode, it contacts para_server to start or stop streaming. [/description] m4_include(common-option-section.m4) m4_include(help.m4) m4_include(detailed-help.m4) m4_include(version.m4) m4_include(config-file.m4) m4_include(loglevel.m4) m4_include(per-command-options-section.m4) [option mode] short_opt = o summary = select mode of operation (sleep, fade, set or snooze) arg_info = required_arg arg_type = string default_val = sleep typestr = mode [help] sleep: Change to the initial volume and select the initial afs mood/playlist. Then fade out until the fade-out volume is reached. Switch to the sleep mood/playlist until wake time minus fade-in time. Finally switch to the wake mood/playlist and fade to the fade-in volume. fade: Fade the volume to the given value in the given time. set: Just set the value and exit. snooze: Fade out, sleep a bit, and fade in. [/help] [option mixer-api] short_opt = a summary = select alternative mixer API arg_info = required_arg arg_type = string typestr = api [help] 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. [/help] [option mixer-device] short_opt = m summary = set mixer device arg_info = required_arg arg_type = string typestr = device [help] 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. [/help] [option mixer-channel] short_opt = C summary = select the analog mixer channel arg_info = required_arg arg_type = string typestr = channel [help] 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'. [/help] [option ignored] summary = Options for sleep mode flag ignored [option ivol] summary = set initial volume arg_info = required_arg arg_type = string default_val = 60 flag multiple typestr = [channel:]volume [help] 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. [/help] [option fo-mood] summary = mood or playlist for fade-out arg_info = required_arg arg_type = string typestr = mood_spec default_val = m/fade [help] This mood (or playlist) is selected right after setting the initial volume. [/help] [option fo-time] summary = duration of fade-out period arg_info = required_arg arg_type = uint32 typestr = seconds default_val = 1800 [help] No fading if this is set to 0. [/help] [option fo-vol] summary = destination volume for fade-out arg_info = required_arg arg_type = uint32 typestr = volume default_val = 20 [option sleep-mood] summary = mood/playlist between fade-out and fade-in arg_info = required_arg arg_type = string typestr = mood_spec default_val = m/sleep [help] Select the given mood or playlist after the fade-out. If unset, playback is stopped until fade-in starts. [/help] [option wake-hour] short_opt = H summary = A number between 0 and 23 arg_info = required_arg arg_type = uint32 typestr = hour [help] If this is not given, the default is computed as now + 9 hours. [/help] [option wake-min] short_opt = M summary = A number between 0 and 59 arg_info = required_arg arg_type = uint32 typestr = minutes [option fi-mood] summary = mood or playlist for fade-in arg_info = required_arg arg_type = string typestr = mood_spec default_val = m/wake [help] This mood or playlist is selected right before fade-in begins. [/help] [option fi-time] summary = duration of fade-in period arg_info = required_arg arg_type = uint32 typestr = seconds default_val = 1200 [help] No fading if this is set to 0. [/help] [option fi-vol] summary = destination volume for fade-in arg_info = required_arg arg_type = uint32 typestr = volume default_val = 80 [option ignored] summary = Options for snooze mode flag ignored [option so-time] summary = duration of fade-out period arg_info = required_arg arg_type = uint32 typestr = seconds default_val = 30 [option so-vol] summary = destination volume for fade-out arg_info = required_arg arg_type = uint32 typestr = volume default_val = 20 [option snooze-time] summary = delay between end of fade-out and begin of fade-in arg_info = required_arg arg_type = uint32 typestr = seconds default_val = 600 [option si-time] summary = duration of fade-in period arg_info = required_arg arg_type = uint32 typestr = seconds default_val = 180 [option si-vol] summary = destination volume for fade-in arg_info = required_arg arg_type = uint32 typestr = volume default_val = 80 [option ignored] summary = Options for fade mode flag ignored [option fade-vol] short_opt = f summary = destination volume for fading arg_info = required_arg arg_type = uint32 typestr = volume default_val = 50 [option fade-time] short_opt = t summary = duration of fade period arg_info = required_arg arg_type = uint32 typestr = seconds default_val = 5 [option ignored] summary = Options for set mode flag ignored [option val] summary = mixer channel value to set arg_info = required_arg arg_type = uint32 typestr = value default_val = 10