nopenopenope.net failure is imminent

Last updated: 2021-04-13

play(1) ought to be enough for everyone

See also: audio post.

play(1) can easily be used to play large collections of audio files.

It is an all purpose decoder, and can fetch http links. It can in fact be used as a wrapper for the decoders to retrieve raw PCM audio regardless of format.

The artwork actually fucking sucks

In an age before most of the players and other software now available, play(1) stood as a bastion of hope in the miserable wasteland of juke(7). Compared to that hulking mass of bitrotten bullshit, it's a simple script that just works and does everything you might need.

It can play a list of files, and, by controlling subprocesses, you can provide a simple mechanism for pause/unpause/skip track. Shuffle/repeat etc can be handled via wrapper scripts by acting on the list of files. The script echo's what it is playing, which can be enough information depending on what you need. The other scripts implementing the controls are little more than simple one-liners.

One obvious advantage of using scripts to do this is interfacing with the plumber(4), working from within sam(1), and so on.

The drawback is that you can't seek within tracks, you can't move backwards through the list of files, and you can't view the playlist and jump anywhere.

An implementation of the idea exists in the scripts repo.

All of these just output commands, rather than execute them.

Then the wrappers:

Street unix audio

In practice, I don't care about track metadata, and am quite content with just throwing the script at a directory or a bunch of files and playing them in random order forever, or until I change my mind.

My music is split between a dozen of flat directories by general genre, and I sanitize filenames before any inclusion, removing any awkward characters including whitespace, and abbreviating as much as possible:

$genre/$artist^$album^.^$name^.^$ext

Therefore to play everything from an artist, or from a single album, and so on, I can just do:

; shp mmpr/gojira*

Legacy

I've heard of one or two people actually using juke(7), but I don't condone self-harm, so I won't comment.

Few ended up storing like me their music on Plan 9, until Sigrid brought zuke from the heavens. umbraticus recently even made his own zuke analogue in rc.

Thanks to Sigrid, most decoders now have seeking, and the other features this approach lacks can be addressed, but the implementation would be more complicated. Since the other players already deal with all of this, attempting to extend it is also of little use.

As of revision 758a3c22372f dating 20210413, juke(7) has finally been excised and replaced by zuke.

I still feel play(1) is an elegant way to handle the problem, even though I don't use shp as much anymore. Figuring out and writing these little scripts were some of the first things I ever did on 9front, and I soon switched to 9front full-time thanks to them.