# The &juk; Handbook

&Lauri.Watts; &Lauri.Watts.mail;
Michael Pyne

    michael.pyne@kdemail.net

Scott Wheeler

    wheeler@kde.org

2001 2002 2004 Scott Wheeler
&FDLNotice;
2004-05-06
2.1

&juk; is a jukebox, tagger and music collection manager.

KDE kdemultimedia audio tagger player jukebox JuK

## Introduction

&juk; is, well, a jukebox. As is typical with many jukebox applications, &juk; allows you to edit the tags of your audio files, and manage your collection and playlists.

## Using &juk;

Here's a screenshot of &juk;

Screenshot of &juk; in action.

&juk; maintains a list of all files that it knows about. This is called the Collection List. The collection list is specific to &juk; and is not shared with other applications.

Independent of the Collection List, are playlists. You can have as many playlists as you want. You can use &juk; created playlists with other media players (such as &noatun; or xmms) and you can manage playlists created in those applications from within &juk;.

You can add files to the Collection List individually, using File Open File... and selecting them from a standard &kde; file dialog. You can add entire folders using File Open Folder.... Folders added this way will be rescanned every time you start &juk; . You can force the folders to be rescanned by right-clicking on the Collection List icon, and selecting Reload.

Adding a song to a playlist will automatically add its file to the Collection List, but adding a file to the Collection List won't automatically add the song to any playlists.

You can quickly create a playlist from your entire Collection List, by &RMB; clicking on the Collection List icon, and choosing Duplicate. The resulting playlist is a normal playlist, and editing it will not affect the Collection List.

You can add playlist files created outside &juk; individually by selecting them with File Open File.... Any playlist files found in folders you add with File Open Folder... will also be added automatically.

You can create a new playlist by choosing File New or the New icon on the toolbar. You will be prompted for a name, and then an icon for that playlist will appear in the playlist pane. You can now drag and drop files from the Collection List, or from other playlists, to your playlist. Use the Save icon or File Save to save the playlist at any time.

### The Song List

When you are viewing the Collection List, the main pane contains all the files that &juk; knows about. When you are viewing a playlist, only the songs that are in that playlist are shown. In either case, the appearance and behavior of the list is the same.

Each song takes one row in the display. There is a column for each metadata field that &juk; tracks. These columns correspond to the fields available to edit in the tag editor.

You can reorder the list at any time by &LMB; clicking on the column header. This will first sort the files in ascending order based on the contents of that column. If you &LMB; click again on the same header, the files will be re-sorted in descending order.

The columns are initially sized wide enough to show the longest entry available. You can resize the columns by placing your mouse cursor on the divider between two columns. When the cursor changes from a pointer, &LMB; click and drag in the direction you want to resize the columns.

You can reorder the columns by &LMB; clicking on a header and dragging the header to the left or right. You can't drag past the edge of the window when doing this however, so you may need to scroll a little to the left or right, and repeat dragging the header, until you have placed it in your preferred position.

You can hide or unhide columns by &RMB; clicking on a column header, and clicking on the name of the column to change.

&LMB; double clicking on a file will play it with the built-in player. If another song was already playing, it will stop, and the new song will play.

&RMB; clicking on a file offers you several options:

Play Next

  This will start playing the file as soon as the current song is over. If no song is playing, the file will be played when you next hit the Play button. If you have already chosen the Play Next option on a different file, then this file will override that selection.

Cut
Copy
Paste

  ...

Clear

  If you are viewing the Collection List, choosing Clear will remove the file from the list, and will also remove all corresponding entries for this song from all playlists. You should note that if this file is in a folder that &juk; scans on startup, it will be readded to the Collection List the next time you start up &juk; but it won't be automatically added to any playlists.

  If you are viewing a playlist, Clear will simply remove the song from the playlist.

Edit

  Will allow you to edit the currently highlighted song, in the column you clicked in. For example, if you do not have the tag editor visible, and you are busy creating a playlist, but you notice a mis-spelling in an artist name, you can edit it directly with this menu item.

  Changes made in this manner are always saved immediately as soon as you click elsewhere and are finished editing.

  This menu item will be disabled if &juk; detects that the track you have selected is read-only.

Refresh Items

  This will reload the tag information of the selected files, in case the files have been changed while &juk; was running.

Remove From Disk

  This will remove the file from the Collection List, remove all entries for the song in all playlists, and delete the file from your disk. You cannot undo this, although you will be asked to confirm your choice. Use this with caution.

Guess Tag Information

  This will make &juk; try to guess information such as the Artist and Title of a song. &juk; employs different methods of guessing:

  From File Name

    &juk; will try to guess the tags of the song based on its filename. For example, a song name such as `Roxette - You've Got the Look.mp3` would guess Roxette for the artist and You've Got the Look as the title. You can adjust the way &juk; guesses for tags by selecting Settings Tag Guesser..., which will open the Tag Guesser dialog. &juk; will not replace tags that it did not guess from the file name.

  From Internet

    &juk; will try to guess the tags of the song by using the MusicBrainz program. You must have MusicBrainz installed for this command to work.

Rename File

  This will rename the selected files to conform to a given format. You must choose the way you want the files renamed first by selecting Settings File Renamer.... The resulting name of each file is based on its metadata tags. For example, the Ogg Vorbis song The Theme (Metroid) by Stemage could result in `/usr/share/music/Stemage/The Theme (Metroid).ogg`.

Create Playlist From Selected Items

  This allows you to quickly create a playlist from songs in your Collection List. This function will prompt you for a name for the new playlist, and will then insert all of the songs that are selected into the new playlist.

Add Selected Items to K3b Project

  This allows you to quickly create a K3b CD-burning project from your selected songs. &juk; will ask you if you would like an Audio CD project or a Data CD project, unless K3b already has a project open.

  If K3b is not already running, &juk; will start it up for you. After that, &juk; will add your selected files to the current K3b project. You can then save the project in K3b for burning later, or burn the CD right away.

### &juk; Playlists

A playlist is simply a collection of songs grouped by some category. For example, you may have a playlist of songs that you listen to while coding, while trying to sleep, or even when you need a laugh. &juk; supports several different types of playlists.

Normal playlists

  This is the most common kind of playlist. It is a playlist composed of files, just like the Collection List.

The history playlist

  If you enable this playlist (by enabling View Show History, this playlist will record every song that &juk; plays. The playlist will have an extra column, Time, which records the exact time and date the song played. The playlist doesn't start tracking the history until it is enabled, however.

Search playlists

  This is a playlist which is based off of a search. You can create a playlist like this by clicking File New Search Playlist, or by clicking on the Advanced Search button on the Search Bar.

  After creating this playlist, it will keep track of which songs in the Collection List match your criteria, and automatically update itself accordingly whenever the Collection List changes.

Playlists are organized in the Playlist pane, which is the vertical bar at the left. In this pane is an icon for every playlist you have. There are different view mode for this pane, which can be selected from the View View Modes menu.

Default View mode

  This is the default view mode. In this mode, all the playlists are shown as large icons, one above the other in the view mode.

Compact View mode

  This mode is similar to the Normal Viewmode, with the exception that the playlists are represented with horizontal bars with small icons instead of with square boxes.

Tree View mode

  This mode is the most powerful. This mode is just like the Compact viewmode, except that the Collection List is now the root of a tree of virtual playlists. The Collection List has three children nodes, Artist, Album, and Genre. Each of these node has children representing all of the entries from that specific category. For example, if your Collection List contains music from 4 different artists, you would have 4 entries under the artist node.

  One nifty feature of the tree view mode is something called drag-and-drop retagging. Simply select some files in the track list, and drag them onto one of the artist, album, or genre nodes under Collection List. The songs will automatically be retagged to match the item you dropped the tracks on. For example, if you drag a group of tracks onto a Genre called "Rock", all of the tracks will be retagged will a Genre tag of Rock.

### The &juk; Tag Editor

For many file formats, it is practical to use the filename to describe the contents of the file: `Report for the board - June 2003.doc` for example, may be all the information you need in order to find that file again. Trying to capture all the useful information about a particular song however, could lead to filenames like this: `Type O Negative - The Glorious Liberation Of The Peoples Technocratic Republic Of Vinnland By The Combined Forces Of The United Territories Of Europa.mp3` or `Various Artists_15_The Smithsonian Collection of Classic Jazz Volume II_Jimmie Lunceford & His Orchestra - Organ Grinder's Swing.mp3`. These are neither very practical to use, nor do they contain all of the useful information that you might have collected about the song. Adding the album, and track number, for example, to the first would make it even longer and more unmanageable, while still not telling you at a glance the year it was released, or what style of music it is, if you're not familiar with the artist.

The solution then, is to store this kind of metadata inside the files themselves. Mp3 and ogg files can also contain small snippets of text which you can use to describe the content of the file. There are several formats, but &juk; hides the details of the differences between them, and provides a standard way to edit a standard subset of well known tags for all your audio files.

&juk;'s full featured tag editor allows you to edit the tags in both mp3 and ogg files. You can edit single files or multiple files, and you can select a mix of mp3 and ogg files to edit. The only requirement is that you have write access to the files themselves; you cannot edit the tags of a file that is mounted from a &CD-ROM; for example.

#### Editing the Tags in a Single File

To edit the tag in a single file, select it in either the collection list or any entries it has in any playlist. If the tag editor is not visible, enable it by choosing View Show Tag Editor. The tag editor displays in the bottom of the list view.

Simply type into any of the editable fields to change the information. When you are done, &LMB; click back in the list, and you will be prompted to save your changes.

You may find that the tag editor remains disabled when you've clicked on a file. This happens when &juk; has detected that the track is read-only.

Tag Editor Fields

Artist Name:

  The name of the Artist(s) who released the song.

Track name:

  The name of the song.

Album name:

  The name of the album the song was released on.

Genre:

  The Style of the music. &juk; provides a list corresponding roughly to the informal id3 standard, but you are free to type your own entries in this list.

File name:

  The file name of the actual file on disk. You can edit this directly, and when you save, the file will be renamed.

Track:

  The position of the track on the original recording.

Year:

  The year the song was released.

Length:

  This is not editable, it is simply shown for information.

Bitrate:

  This is not editable, it is simply shown for information.

Comment:

  You can add your own free text comment here, with additional notes &etc;

You can explicitly and immediately save your changes at any time using the Tagger Save menu entry or by pressing &Ctrl;T.

#### Editing the Tags in Multiple Files

You can select multiple files in the list view, and edit one or more fields in the tags for all files at once.

Use Shift and the &LMB; to select a contiguous list of files, and &Ctrl; and &LMB; to select individual non-contiguous files.

If the tag editor is not visible, you can enable it by choosing View Show Tag Editor. The tag editor displays in the bottom of the list view.

The tag editor behaves slightly differently when you have selected multiple files.

Each field in the tag editor will now show an Enable checkbox next to it. Any field that has exactly the same contents for all the files you selected, displays that content, and is enabled for editing, with the Enable checkbox checked.

Any field that does not have matching contents in all selected files is not initially editable, and does not display any contents at all.

To change the content of any field, check the Enable checkbox if it is not already checked, and edit the field as you normally would.

When you are done, &LMB; click back in the list view and you will be prompted to save your changes. The prompt dialog will show you a list of the affected files, so you have a chance to check that you are indeed altering the files you intended to.

You can explicitly and immediately save your changes at any time using the Tagger Save menu entry or by pressing &Ctrl;T.

### The Rename File dialog

The Rename File dialog

Screenshot of the Rename File dialog.

The File Renamer Configuration dialog box is used to configure the Rename File action, which renames a song's based on the information contained within its metadata tags. First the tags are altered according to the different tokens you can alter, and then the tokens are used to generate the filename according to the Filename scheme.

The most important part of the dialog is the Filename scheme section. You can type a file name scheme here which &juk; will use to rename the files. The way it works is that some characters are special.

%t

  This will be replaced with the Title token upon evaluation.

%a

  This will be replaced with the Artist token upon evaluation.

%A

  This will be replaced with the Album token upon evaluation.

%T

  This will be replaced with the Track token upon evaluation.

%c

  This will be replaced with the Comment token upon evaluation.

Every token can contain %s, which is replaced with the actual tag, and any text you want, including slashes (/). If a token has a slash, then that will indicate a directory separator. Of course, it would be possible to simply type directory separators in the Filename scheme line.

Using the tokens, however, allows us to completely ignore tags that are empty. If you check the Need value checkbox, then the token will be ignored if the corresponding tag is empty. For example, you could use this to separate files with comments from those without by placing something such as has-comment/%s in the Comment token editor.

You can test your filename scheme by using the Current filename editor at the bottom of the dialog. Type in a filename of a music file, and the New filename area will display would &juk; would rename the file as given the current settings.

### The Tag Guesser Configuration dialog

The Tag Guesser Configuration dialog

Screenshot of the Tag Guesser Configuration dialog.

The Tag Guesser Configuration dialog is used to configure the Guess from Filename command.

In the dialog you will see a list on the left of different filename scheme patterns. &juk; includes an extensive set of defaults patterns to match most common filenaming styles. If you'd like to add a new scheme, click on the Add button, and type in your scheme and click on OK. You may use the same percent tokens as defined in the Rename Dialog Configuration.

&juk; will try the schemes you have listed one at a time, starting at the top of the list. The first scheme which results in a match will be the scheme used to guess the song's tags. Some songs may match more than one scheme. You can make sure that the correct scheme matches first by selecting the scheme in the list box and then using the arrow buttons to move it to the top of the list.

You can also edit or remove a scheme from the list. Just select the scheme in the list, and use the Modify button to change the scheme, or the Remove button to remove the scheme from the list.

### The Advanced Search dialog

The Advanced Search dialog

Screenshot of the Advanced Search Dialog.

The Advanced Search dialog is used to create Search Playlists. It allows you create a fine-grained search among the different tags of your song collection.

At the top of the dialog, you can type in the name of your search playlist. Then, you can define your search criteria in the Search Criteria group.

The top of the Search Criteria group has two radio buttons, Match any of the following and Match all of the following. If you select Match any of the following, then a match by any of the conditions you define will include the song in the playlist. Otherwise, every condition you define must match in order to include the song in the playlist.

Below the radio buttons are the condition definitions. You can add more conditions by using the More button, and remove conditions by using the Fewer button. Any conditions you leave blank are ignored, so you do not have to use Fewer to eliminate empty conditions.

Every condition definition has three parts: The tag chooser list on the left, the matching style list on the right, and the search text in the middle. The tag chooser lets &juk; know what tag you want to search for the text in. If you choose the special tag "<All Visible>", then any tag that you can see in the Collection List listing is fair game to match the search text.

The match style list lets &juk; know which search method to use. The search methods you can use are as follows:

Normal Matching

  This is the default matching style. It searches for the given text anywhere in the chosen tag, ignoring case differences. For example a search for mode in the Artist tag would match Depeche Mode.

Case Sensitive

  This search is just like Normal Matching, except that the search must match the exact case of the text.

Pattern Matching

  This is the most powerful search method. The search text you type in will define a regular expression used to search within the tag. Regular expressions are beyond the scope of this documentation, but the application &kregexpeditor; can help you form a regular expression. &juk; uses the Qt regular expression style.

Simply choose the conditions you want to include in your search, and click OK to create your search playlist!

## The &juk; Toolbar

### The Main Toolbar

The &juk; toolbar.
The &juk; toolbar.

The &juk; toolbar.

From left to right in the screenshot above, the icons on the default toolbar are:

New

  Create a new playlist. If you hold down the button, a menu will pop up allowing you to select the different kinds of playlists to create.

  Empty Playlist...

    This prompts you for a playlist name, and then inserts it into the Playlist view. The playlist starts out completely empty.

  Playlist From Folder...

    This prompts you for a directory to open, and then creates a playlist containing the music within the folder and any sub-folders. The name of the created playlist is the same as the name of the selected folder.

  Search Playlist...

    This brings up the Advanced Search Dialog, allowing you to create a virtual playlist. Any songs in your Collection List that match the search criteria that you specify in the Advanced Search Dialog will be added to the new playlist. As your Collection List changes, the new playlist will as well. For example, if you create a playlist of all of your Depeche Mode songs, and then add another Depeche Mode song to your Collection List, it will show up in the Depeche Mode playlist with no special action required on your part.

Open

  Add a file to the collection list (if it's active) or to the currently selected playlist. Adding a file to a playlist will add it to the collection list automatically, but not vice versa.

Save

  Save the currently selected playlist. To save a tag you have edited, either select another item, or press &Ctrl;T instead.

Cut

  If a playlist or song is selected, cut (remove) it from the list. If the tag editor is active, this works like cut in any editor, removing the selected text, but keeping a copy on the clipboard.

Copy

  If the tag editor is active, this works like copy in any editor, placing a copy of the selected text on the clipboard.

  If you use copy on a song in the collection list, the url is placed on the clipboard, so you can paste it. For example, you could paste the url into a text editor, &konqueror;, or another playlist.

Paste

  If you previously either cut or copied a url from the collection list, you can paste the url back into a new playlist. You could also paste a url you have copied from &konqueror; or any other application. If you are operating in the tag editor, paste will paste any text currently on the clipboard into the selected field.

Show Search Bar

  Show or hide the search bar.

Show Tag Editor

  Show or hide the tag editor.

Play controls

  These work like any standard media player you may have come across. The controls are Play, Pause, Stop, Skip to the previous song and Skip to the next song.

  There is also a tracking bar, showing how far along (relatively) in the current song you are. You can drag this slider with the mouse in order to skip forwards or backwards within a track.

  Finally there is a volume slider. As you may expect, this raises and lowers the volume. Loud is on the right, and Quiet is on the left.

### The Search bar

The search bar allows you to quickly search for a song in the collection list or a playlist.

Simply typing text into the search bar will reduce the visible list of songs to those which contain that text in any visible column. Pressing Enter will start playing the top match in the playlist view.

Searching begins instantly when text is entered into the search field. Searching is incremental, that is, as you type each character into the text field, the search is narrowed further. This is useful to find a song where you only remember part of a name, for instance.

If you would like to make a more fine-grained search, you can click the Advanced Search button to the right of the search bar, which will allow you to create a virtual playlist. If you would like to cancel the search, you can simply click on the Clear button to the left of the search bar.

## Menu and Command Reference

### Menus

#### File Menu

&Ctrl;N File New Empty Playlist...

  Create a new playlist

&Ctrl;D File New Playlist From Folder...

  Creates a new playlist, containing all music files in a folder and any sub-folders. Any music within playlists files that &juk; recognizes will also be added.

&Ctrl;F File New Search Playlist...

  Creates a new search playlist.

&Ctrl;O File Open...

  Select a file (or files) to add to the collection list. If you select a playlist file, every file in the playlist will be added.

File Add Folder...

  Select a folder (or folders) to add to the collection list. These folders will also be rescanned whenever &juk; is started or File Reload is chosen.

File Rename...

  Rename a playlist.

File Duplicate...

  Create a duplicate of the selected playlist, and prompt for a new name.

File Reload

  Reloads the tag information on every file in the selected playlist.

File Remove

  Remove the selected playlist.

&Ctrl;S File Save

  Save the selected playlist.

File Save As...

  Save the selected playlist, with a different name.

#### Edit Menu

Edit Clear

  Removes the selected songs from the playlist.

#### View Menu

View Show Search Bar

  This is a toggle action that sets whether or not the Search Bar is shown.

View Show Tag Editor

  This is a toggle action that sets whether or not the Tag Editor is shown.

View Show History

  This is a toggle action that sets whether or not the History Playlist is shown.

View View Modes Default

  Switches to Default View mode.

View View Modes Compact

  Switches to Compact View mode.

View View Modes Tree

  Switches to Tree View mode.

#### Player Menu

Player Random Play

  This is a toggle option which controls the Random Play setting. If Random Play is enabled, then &juk; will randomly select a random song from the current playlist when the currently playing song is over.

Player Loop Playlist

  This is a toggle option which controls the Loop Playlist setting. If Loop Playlist is enabled, then &juk; will start playing from the beginning when it has finished playing every song in the current playlist.

Player Play

  This command starts playing the currently selected song, or resumes playback of the song if it was paused.

Player Pause

  This command pauses the currently playing song. Use the Play command to restart playback.

Player Stop

  This command stops the playback of the currently playing song. You cannot resume playback from its current position after that.

Player Previous Track

  This command plays the song that was playing before the currently playing song.

Player Next Track

  This command skips to the next song to play in the playlist.

#### Tagger Menu

Ctrl T Tagger Save

  This command saves any changes to the tags that you are editing. Normally, changes are not saved until you deselect the file you are editing.

Tagger Delete

  This command deletes the currently selected files from the Collection List and any playlists containing it, and then deletes the selected file from the disk.

Ctrl F Tagger Guess Tag Information From Filename

  This command tries to guess the tags of the selected files by scanning the filename. You can configure the patterns used for guessing by selecting Settings Tag Guesser..., which opens the Tag Guesser Configuration dialog.

Ctrl I Tagger Guess Tag Information From Internet

  This command tries to guess the tags of the selected files by using the trm provided with MusicBrainz.

#### Settings Menu

Settings Toolbars Show Main Toolbar

  This command shows or hide the Main Toolbar.

Settings Toolbars Show Play Toolbar

  This command shows or hide the Play Toolbar.

Settings Show Splash Screen on Startup

  This is a toggle option. If enabled, &juk; will display an informational screen upon startup as it loads your music collection.

Settings Dock in System Tray

  This is a toggle option. If enabled, &juk; will display an icon in your system tray. You can use the system tray icon to tell if &juk; is playing, and control playback.

Settings Stay in System Tray on Close

  This is a toggle option. If enabled, &juk; will remain running if you close the main window. The Dock in System Tray option must also be enabled. To quit &juk;, use the File Quit command from the main window, or the Quit command from the system tray's context menu.

Settings Popup Track Announcement

  This is a toggle option. If enabled, &juk; will display an indicator whenever a song starts playing, with information on the artist and title, and with buttons allowing you to quickly switch to a different song. The Dock in System Tray option must also be enabled.

Settings Tag Guesser...

  This command brings up the Tag Guesser Configuration dialog box, where you can alter the patterns used to guess tag information from filenames.

Settings File Renamer...

  This command brings up the File Renamer Configuration dialog box, where you can alter the way &juk; renames files for you.

Settings Configure Shortcuts...

  This brings up the standard KDE dialog box where you can configure keyboard shortcuts for &juk;. Some reasonable defaults are included as well, including Multimedia keys for people who have multimedia keyboards.

### Keybinding Reference

Key Combination | Action
--- | ---
&Ctrl;A | Select all
&Ctrl;C | Copy
&Ctrl;R | Rename file
&Ctrl;I | Guess tags from the Internet.
&Ctrl;G | Guess tags from the filename.
&Ctrl;F | New search playlist.
&Ctrl;G | Guess tag entries based on filename
&Ctrl;N | New empty Playlist
&Ctrl;D | New playlist from folder.
&Ctrl;T | Save changes to edited tags.

## Credits and Licenses

&juk; Copyright © 2002, 2003, 2004 Scott Wheeler.

&juk; is developed and maintained by Scott Wheeler wheeler@kde.org.

Many thanks to the following people who have contributed to &juk;:

- Daniel Molkentin molkentin@kde.org for system tray docking, inline tag editing, bug fixes, evangelism, moral support.

- Tim Jansen tim@tjansen.de for the GStreamer port

- Stefan Asserhäll stefan.asserhall@telia.com for global keybindings support.

- Stephen Douglas stephen_douglas@yahoo.com for track announcement popups.

- Frerich Raabe raabe@kde.org for automagical track data guessing, and bugfixes.

- Zack Rusin zack@kde.org for more automagical things, including MusicBrainz support.

- Adam Treat manyoso@yahoo.com for co-conspiring in MusicBrainz wizardry.

- Matthias Kretz kretz@kde.org for being the friendly neighborhood aRts guru.

- Maks Orlovich maksim@kde.org for making &juk; friendlier to people with terabytes of music.

- Antonio Larrosa Jimenez larrosa@kde.org for the DCOP interface.

Documentation Copyright © 2003, Lauri Watts, and copyright © 2004 Michael Pyne.

&underFDL; &underGPL;
&documentation.index;