Blame


1 a9fc4552 2022-02-17 op # amused
2 a9fc4552 2022-02-17 op
3 a9fc4552 2022-02-17 op amused is a music player. It doesn't have any amazing functionalities
4 213aea73 2022-02-17 op built-in, on the contrary: it's quite minimal (a fancy word to say that
5 213aea73 2022-02-17 op does very little.) It composes well, or aims to do so, with other tools
6 213aea73 2022-02-17 op thought.
7 a9fc4552 2022-02-17 op
8 bbf64a33 2022-02-17 op The main feature is that audio decoding runs in a sandboxed process
9 bbf64a33 2022-02-17 op under `pledge("stdio recvfd audio")`. Oh, by the way, amused targets
10 213aea73 2022-02-17 op OpenBSD only: it relies its make infrastructure to build, uses various
11 213aea73 2022-02-17 op cool stuff from its libc and can output only to sndio.
12 a9fc4552 2022-02-17 op
13 213aea73 2022-02-17 op (I *think* it's possible to compile it on other UNIX-like systems too by
14 213aea73 2022-02-17 op providing shims for some non-portable functions -- hello libbsd -- and
15 950a8581 2022-03-25 op assuming that sndio is available. And bundling a copy of imsg.c too)
16 a9fc4552 2022-02-17 op
17 a9fc4552 2022-02-17 op
18 a9fc4552 2022-02-17 op ## building
19 a9fc4552 2022-02-17 op
20 59b6f826 2022-02-17 op $ make
21 a9fc4552 2022-02-17 op
22 a9fc4552 2022-02-17 op it needs the following packages from ports:
23 a9fc4552 2022-02-17 op
24 a9fc4552 2022-02-17 op - flac
25 0ea0da1e 2022-02-23 op - libmpg123
26 a9fc4552 2022-02-17 op - libvorbis
27 a9fc4552 2022-02-17 op - opusfile
28 a9fc4552 2022-02-17 op
29 a9fc4552 2022-02-17 op Release tarballs installs into `/usr/local/`, git checkouts installs
30 a9fc4552 2022-02-17 op into `~/bin` (idea and implementation stolen from got, thanks stsp!)
31 a9fc4552 2022-02-17 op
32 3c18f438 2022-03-13 op It'll be available on OpenBSD starting with 7.1
33 a9fc4552 2022-02-17 op
34 3c18f438 2022-03-13 op
35 a9fc4552 2022-02-17 op ## usage
36 a9fc4552 2022-02-17 op
37 a9fc4552 2022-02-17 op The fine man page has all nitty gritty details, but the TL;DR is
38 a9fc4552 2022-02-17 op
39 a9fc4552 2022-02-17 op - enqueue music with `amused add files...`
40 a9fc4552 2022-02-17 op - control the playback with `amused play|pause|toggle|stop` etc
41 a9fc4552 2022-02-17 op
42 213aea73 2022-02-17 op amused tries to be usable in composition with other more familiar tools
43 213aea73 2022-02-17 op instead of providing everything itself. For instance, there isn't a
44 213aea73 2022-02-17 op command to remove an item from the playlist, or shuffle it; instead,
45 213aea73 2022-02-17 op standard UNIX tools can be used:
46 a9fc4552 2022-02-17 op
47 da045d77 2022-02-17 op $ amused show | grep -vi kobayashi | amused load
48 da045d77 2022-02-17 op $ amused show | sort -R | amused load
49 da045d77 2022-02-17 op $ amused show | sort | uniq | amused load
50 da045d77 2022-02-17 op
51 da045d77 2022-02-17 op It also doesn't provide any means to manage a music collection. It
52 da045d77 2022-02-17 op plays nice with find(1) however:
53 da045d77 2022-02-17 op
54 a9fc4552 2022-02-17 op find . -type f -iname \*.opus -exec amused add {} +
55 a9fc4552 2022-02-17 op
56 a1e58086 2022-03-12 op I wrote a bit more about the background of amused [in a blog
57 a1e58086 2022-03-12 op post](https://www.omarpolo.com/post/amused.html).