juke – music jukebox|
juke [ –t ] [ –w ] [ –h srvhost ] [ –s srvname ]|
games/jukebox [ –t ] [ –w ]
games/jukefs [ –m mountpoint ] [ –s srvname ] [ mapfile ]
Jukebox controls a playlist server (see playlistfs(7)) through
a graphical user interface. It connects to a music database server
which reads a set of map files that describe recordings and their
location. Currently, there is one set of maps, mostly for classical
music, with some jazz and other stuff thrown in. These are
served by jukefs, which presents a file system conventionally
mounted at /mnt/juke. The playlist, explained below, is managed
by a file system implemented by playlistfs(7) and normally mounted
on /mnt. |
Jukebox is most easily started through the juke shell script.
Jukebox has four windows, which can be selected by clicking the appropriate tab at the top of the window.
Above the tab are nine buttons and a volume slider. The buttons, shown below, are named, from left to right, Exit, Pause, Play, Halt, Back, Forward, Root, Delete, and Help. The buttons are active when they are displayed in dark green (or red). When they are pale blue they are inactive. The Exit button is always active; it exits the program (but leaves the playlist and music database servers running).
The browse window is for browsing through the music and selecting music to play. Browsing down in the music hierarchy is done by clicking button one on an item. Clicking button three goes back up. Clicking button two recursively adds all files below the selected item to the play list.
The selected music is displayed in the playlist window. The track currently playing is shown in the playing window.
The Root button browses back to the root.
The Delete button empties the playlist.
The Help displays a minimal on–line manual.
Play starts playing at the beginning of the play list, or at the selected track in the play list.
During play, Pause, Stop, Back, and Forward are active. Back and Forward go back or forward a track at a time. The other buttons do the obvious thing.
The –t flag chooses a tiny font, useful for handhelds.
The –w flag creates the jukebox in a new window. Normally, the jukebox takes over the window in which it is invoked.
The –s flag specifies the name under which the file descriptors
of the playlist and databse servers are posted in /srv. This allows
two or more play list servers to exist on one platform, e.g.,
when there are several audio devices. The default value of the
flag is $user for a playlist server at /srv/playlistfs.$user
and a database server at /srv/jukefs.$user.
Jukefs reads a set of maps describing the music data, builds an
in–memory database, and provides lookup service to jukebox. The
default map is /sys/lib/music/map. It consists of a hierarchical
set of objects. Each object has a type, a value, zero or more
attribute–value pairs and zero or more subobjects.
An object consists of the type, followed by its contents between
curly brackets. Attribute value pairs consist of a single line
containing an attribute name, an equals sign, and a value. The
value of an object is any text not containing curly brackets or
equals signs. Here is an example:
This example shows a category object for the composer Gustav Mahler (the value consists of the two lines `Gustav Mahler' and `(1860 — 1911)') with one subobject, a work object whose value is `Symphony Nº 5 in c♯ (RFO, Vienna)'. The work object contains six subobjects: one performance object and five track objects.
Category objects must contain exactly one attribute–value pair. The attribute names a subobject of the root under which this category object will be placed. Gustav Mahler, thus, will be placed in Root→composer. Work, Recording, Part, and Track, objects all describe named containers for subunits. A Lyrics, Performance, or Soloists object adds information to a Work, Recording, Part, or Track, object. It should only contain text. The same is true for a Time object; however, it should only be used adjacent to File objects and it should contain the running time of that file (this is for future use).
A File object specifies a file to be played. When the Select button is pressed, all file objects contained hierarchically in the selected object are added to the playlist.
There are a number of pseudo objects: Command may contain either sort or number. The sort command sorts the subobjects of the object it appears in by key or textual content. The number commands prepends numbers to the texts of its subobjects (e.g., for the parts in a symphony)
An Include object is replaced by the contents of the named file.
A Key object specifies a key for sorting subobjects.
Finally, a Path object specifies a path to be prepended to the files named in hierarchically contained File objects.
The attribute–value value pairs arrange for entries to be made
of the current object in a Category object named by the attribute
directly under the root.
The interface to the browsing database is through a file system
implemented by jukefs. The file system synthesises a directory
per object. Each directory contains a set of files describing
the object's attributes:
typeis the type of the object
/sys/lib/music/map: Default map file /mnt/juke: Default mount
point for the music database.|