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 a9fc4552 2022-02-17 op built-in, on the contrary: it's quite minimal (a fancy word to say
5 a9fc4552 2022-02-17 op that does very little.) It composes well, or aims to do so, with
6 da045d77 2022-02-17 op other tools 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 bbf64a33 2022-02-17 op OpenBSD only: it relies its make infrastructure to build, uses
11 bbf64a33 2022-02-17 op various cool stuff from its libc and can output only to sndio.
12 a9fc4552 2022-02-17 op
13 a9fc4552 2022-02-17 op (I *think* it's possible to compile it on other UNIX-like systems
14 a9fc4552 2022-02-17 op too by providing shims for some non-portable functions -- hello
15 a9fc4552 2022-02-17 op libbsd -- and assuming that sndio is available. Oh, and that you
16 a9fc4552 2022-02-17 op bundle a copy of imsg.c too)
17 a9fc4552 2022-02-17 op
18 a9fc4552 2022-02-17 op
19 a9fc4552 2022-02-17 op ## building
20 a9fc4552 2022-02-17 op
21 59b6f826 2022-02-17 op $ make
22 a9fc4552 2022-02-17 op
23 a9fc4552 2022-02-17 op it needs the following packages from ports:
24 a9fc4552 2022-02-17 op
25 a9fc4552 2022-02-17 op - flac
26 a9fc4552 2022-02-17 op - libmad
27 a9fc4552 2022-02-17 op - libvorbis
28 a9fc4552 2022-02-17 op - opusfile
29 a9fc4552 2022-02-17 op
30 a9fc4552 2022-02-17 op Release tarballs installs into `/usr/local/`, git checkouts installs
31 a9fc4552 2022-02-17 op into `~/bin` (idea and implementation stolen from got, thanks stsp!)
32 a9fc4552 2022-02-17 op
33 a9fc4552 2022-02-17 op
34 a9fc4552 2022-02-17 op ## usage
35 a9fc4552 2022-02-17 op
36 a9fc4552 2022-02-17 op The fine man page has all nitty gritty details, but the TL;DR is
37 a9fc4552 2022-02-17 op
38 a9fc4552 2022-02-17 op - enqueue music with `amused add files...`
39 a9fc4552 2022-02-17 op - control the playback with `amused play|pause|toggle|stop` etc
40 a9fc4552 2022-02-17 op
41 da045d77 2022-02-17 op amused tries to be usable in composition with other more familiar
42 da045d77 2022-02-17 op tools instead of providing everything itself. For instance, there
43 da045d77 2022-02-17 op isn't a command to remove an item from the playlist, or shuffle it;
44 da045d77 2022-02-17 op instead, standard UNIX tools can be used:
45 a9fc4552 2022-02-17 op
46 da045d77 2022-02-17 op $ amused show | grep -vi kobayashi | amused load
47 da045d77 2022-02-17 op $ amused show | sort -R | amused load
48 da045d77 2022-02-17 op $ amused show | sort | uniq | amused load
49 da045d77 2022-02-17 op
50 da045d77 2022-02-17 op It also doesn't provide any means to manage a music collection. It
51 da045d77 2022-02-17 op plays nice with find(1) however:
52 da045d77 2022-02-17 op
53 a9fc4552 2022-02-17 op find . -type f -iname \*.opus -exec amused add {} +
54 a9fc4552 2022-02-17 op
55 ee6b8af7 2022-02-17 op Well, for these kinds of things I wrote a wrapper around find called
56 da045d77 2022-02-17 op walk that provides 80% of what I do with find in 20% of the characters:
57 a9fc4552 2022-02-17 op
58 da045d77 2022-02-17 op walk \*.opus amused add
59 a9fc4552 2022-02-17 op
60 a9fc4552 2022-02-17 op (walk lives in my [dotfiles](//git.omarpolo.com/dotsnew))