1 .\" Copyright (c) 2022 Omar Polo <op@openbsd.org>
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
31 is a music player daemon and command-line utility to play music.
32 The server is started automatically in the background on demand.
34 The following options are available:
39 will run in the foreground and log to standard error.
40 It's ignored if any commands are given on the command line or if the
41 server is already running.
43 Produce more verbose output.
47 instead of the default
49 to communicate with the daemon.
50 .It Ar command Op Ar argument ...
51 Specify the command to run.
52 If no commands are specified,
57 The following commands are available:
60 Enqueue the given files.
62 When consume mode is enabled the tracks are removed from the playlist
63 once played til the end.
66 .It Cm jump Ar pattern
67 Play the first song in the playing queue that matches
69 .Pq a basic case-insensitive regexp .
70 .It Cm load Op Ar file
74 A playlist is a list of paths to music files given one per line
75 and optionally prefixed by
78 If the list was generated by
81 restore also the position in the playlist.
82 Otherwise, if already playing something, try to match the currently
84 Failing that, the playlist will be played from the first track
86 .It Cm monitor Op Ar events
87 Stop indefinitely and print when an event in the comma-separated list
90 happened, or all if not given.
95 .Bl -tag -compact -width unknown
97 Playing or resuming a song.
103 Advanced to next song.
105 Gone back to previous song.
107 Jumped to a different song in the playlist.
109 Added a song to the playlist.
111 Loaded a new playlist.
114 .Pq repeat or consume .
116 Seeked in the current track.
125 Start or resume the playback.
127 Play the previous song.
128 .It Cm repeat one|all on|off
129 Enable or disable the automatic repetition of the current track
131 or of the whole playing queue
134 Rewind the current song to the beginning.
139 .It Cm seek Oo Oo Ar hours : Oc Ns Ar minutes : Oc Ns Ar seconds | Ar percentage Ns %
140 Seek by the specified amount of time into the current song.
141 If the argument is prefixed by either
145 then the seek is relative to the current position.
152 list with the current playing song prefixed by
154 .It Cm status Op Fl f Ar format
155 Print playback status and current song.
158 is a comma-separated list of words that select the information to
161 .Ev AMUSED_STATUS_FORMAT
163 .Dq status,time,repeat
165 The format available are:
167 .Bl -tag -compact -width time:percentage
169 Path of the current song
171 Repeat status in a single line.
173 Repeat all and repeat one status, one per line.
175 Playback status by the path to the current song.
177 Position and duration in a single line.
179 Percentage of the current position.
181 Current position and duration in seconds.
183 Current position and duration in a human-readable format.
186 Stop the music player.
188 Play/pause the playback.
191 Commands can be abbreviated to a unique prefix, for example
193 can be given instead of
197 automatically skips and removes from the playlist non-regular files by
199 Files with non recognized audio format are skippend and removed from
202 .Bl -tag -width AMUSED_STATUS_FORMAT
203 .It Ev AMUSED_STATUS_FORMAT
204 The default format used by
209 .Bl -tag -width "/tmp/amused-$UID" -compact
210 .It Pa /tmp/amused-$UID
212 socket used for communication with the daemon.
215 Enqueue all mp3 files in the current directory:
216 .Bd -literal -offset indent
220 Recursively add all opus files:
221 .Bd -literal -offset indent
222 $ find . -type f -iname \\*.opus -exec amused add {} +
225 Load every file under the current directory recursively:
226 .Bd -literal -offset indent
227 $ find . | amused load
230 Save the state of the player to the file
232 .Bd -literal -offset indent
233 $ amused show -p > state
236 Load a previous state:
237 .Bd -literal -offset indent
238 $ amused load < state
241 Shuffle the playlist:
242 .Bd -literal -offset indent
243 $ amused show | sort -R | amused load
247 .Bd -literal -offset indent
248 $ amused show | sort | uniq | amused load
253 .Bd -literal -offset indent
254 $ amused jump "$(amused show | fzf +s)"
260 utility was written by
261 .An Omar Polo Aq Mt op@openbsd.org .