foobar2000:Components/Facets (foo_facets)

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
Facets
Foobar2000-Facets-Preferences.png
Facets preferences page.
Developer(s) Frank Bicking
Repository {{{repository}}}
Release information
Initial release October 20, 2007[1]
Stable release 1.0 (August 18, 2011)
Preview release N/A
foobar2000 compatibility
Architecture {{{foobar2000_architecture}}}
Minimum version 1.1
Maximum version {{{foobar2000_maximum}}}
UI module(s) Default UI
Additional information
Use TBC
License {{{license}}}
Discussion thread {{{discussion_thread}}}
View all components

Facets is a media library viewer with multiple columns, album art, statistics, and search functions.

Usage

Integrate into the user interface

Enable the layout editing mode at "View", "Layout" to manually add Facets as a UI element.

Popup window

Choose "Facets" from the "Library" menu to open it in a new window. If a Facets UI element has already been integrated into the user interface, this will focus the existing instance. Hold Shift when selecting the menu item to force open a new window. Note that in order to edit the layout, Facets' own layout editing mode toolbar will have to be enabled.

Layout

Panes

Panes layout editing

By default, Facets is split into three panes. By enabling the layout editing mode and right-clicking on one of them, panes can be removed, and new panes can be inserted before or appended after the selected one. The cut, copy, and paste commands can be used to reorder panes, or to transfer them between different Facets UI elements.

Panes can be arranged next or below each other. To toggle the orientation, right-click on one of the splitters between two panes while in layout editing mode, and select "horizontal" or "vertical".

Toolbar

Toolbar layout editing
Facets toolbar

To control the toolbar, enable the layout editing mode, and right-click on it.

  • "Bottom-dock toolbar" moves the toolbar below the panes. Repeating this action will move it back to the top.
  • Unchecking "Show the toolbar" disables the toolbar entirely.
  • To restore the toolbar, right-click on one of the splitters between two panes, and re-enable "Show the toolbar".
Filters preferences
Toolbar Remarks
Source Toggles between browsing the media library and the current playlist. Can be set to "automatic" to display the playlist by default, and to switch to the library if the library selection playlist is active.
Filter Filters panes according to one or multiple predefined filters. Once a filter has been selected, the button can be clicked to quickly disable or re-enable it. Some predefined filters require the playback statistics component.
Search Filters panes based on a query. To focus the search box, press F3 from a Facets pane, or assign a keyboard shortcut (e.g. Ctrl+F) to [main] / Library / Facets.
Search results Displays a menu for filter or search results. When browsing the library, clicking the button has the same effect as the double-click action defined at Preferences, Media Library, Facets. For playlists, it plays the first track in the search results.
Search help Opens query syntax reference in the browser.
Layout editing mode Activates the integrated layout editing mode. Only available for the standalone window opened from the Library menu, and the autoplaylist editor dialog.

Display

Columns

By default, panes display their contents in a table-like view.

Album art

Additionally, one of three different views with album art can be selected:

Display Comment
right labels Best used with three or more columns.
bottom labels Best used with one or two columns. Requiring less space for labels, it is better suited for larger images.
no labels Can be used if all albums have album art and if they can be identified without any additional text.
  • Album art is loaded from the file sources defined at Preferences: Display and embedded images.
  • Images can be resized/zoomed by holding the Ctrl key and rotating the mouse wheel.
  • To change the order of displayed lines, reorder the columns in the header. The first line displays the first column, and so on.
  • Text in the first line is always displayed in bold, which makes it an ideal choice for the column that best distinguishes individual items.
  • The third and following lines are dimmed automatically. Use them for less important columns, such as dates or statistics.
  • For a pane that lists albums, a recommended order would be album, album artist, and date.

Columns

Each pane can display one or multiple columns. To change them, right-click on one of the column headers.

Example

Set the first pane to genre, the second to artist, and the third to album. In the third one, enable multiple columns and add the date column. Resize and reorder them to your liking.

Column patterns

Columns preferences

Columns are based on title formatting. Their patterns can be edited at Preferences, Media Library, Facets.

Missing fields

Depending on the pattern, missing fields are treated in different ways:

Syntax Tracks without the specified field Summary item
%field% Listed under "?". Contains all tracks.
[%field%] Not listed at all, because the result is empty. Only contains tracks where the field exists. 1
$if2(%field%,Unknown) Listed under "Unknown". Contains all tracks.
  1. The rationale for ignoring empty results in the summary item is that, for example, selecting "All (# albums)" should only select actual albums, and not unsorted tracks without an album field. To display all items in the next pane, including those without the field, unselect the summary item with Ctrl-click if necessary.

Multivalue fields

Some fields like genre typically have multiple values. Facets makes some additions which allow values to be split into individual items:

Syntax Description
%<field>% Checks one or more metadata fields according to the title formatting definition of the specified field. For the first field that is found, multiple values are split into separate items.
$meta_branch(field) Splits multiple values of specified field into separate items.
$meta_branch_stripprefix(field) Same as above, additionally removes leading "The" or "A" from each value.
$meta_branch_swapprefix(field) Same as above, additionally moves leading “The” or “A” to the end.
$meta_branch_remap(field) Same as %<field>%.
$meta_branch_remap_stripprefix(field) Additionally removes leading "The" or "A". For use instead of nonworking $stripprefix(%<artist>%).
$meta_branch_remap_swapprefix(field) Additionally moves leading "The" or "A" to the end. For use instead of nonworking $swapprefix(%<artist>%).

Note that some title formatting functions are incompatible with fields that have been split this way. This applies to string comparison and measuring functions, such as $strcmp and $strstr, as well as any string manipulation function that removes a part of a string or inserts a substring by position, such as $left, $right, $cut, and $pad. Due to popular demand, compatible versions of $stripprefix and $swapprefix have been implemented as shown in the above table. It should be safe to use any function that replaces characters or sequences of characters, including $lower, $upper, $caps, $caps2, and $ansi.

Multiple patterns

Multiple patterns can be combined with | to display values from different fields in the same column. For example, %<artist>%|%<composer>% lists both artists and composers, which might be useful to create a list of persons regardless of their actual role.

Colors

Use < and > characters to dim or apply the highlight color to individual parts, with up to three levels, for example: <dimmed>, >highlight<, >>more highlight<<. Note that text in parentheses "(...)", brackets "[...]", and braces "{...}" is dimmed automatically. Color functions including $rgb, $hsl, $blend, and $transition are not supported.

To display the < and > characters, use $char(60) and $char(62).

Ignore leading "The" when sorting

Sorts items such as "The Beatles" among other entries starting with "B", while still displaying "The Beatles". Alternatively, columns can be changed to display "Beatles, The" or just "Beatles" by setting the pattern to, for example: $swapprefix(%artist%) or $stripprefix(%artist%), respectively.

Summary item of date columns

For columns containing "date" or "year" in their name, instead of the number of different dates, the summary item displays the number of years from the first to the last year (e.g. 5 years if the displayed dates range from 2007 to 2011; yes, five and not four). To be read as how many years an artist has been active or similar.

Folder columns

Folder columns are not based on title formatting. They display folders relative to the music folders set up at Preferences, Media Library, or, when browsing the current playlist, the full file path including the drive letter at the first level. Folder columns can be added to multiple panes to display several levels of subfolders. To mimic the typical appearance of some file managers, symbols at the right indicate the presence of subitems in the next pane.

Automatic column resizing

Multiple columns are automatically resized to use the full width. To avoid frequent readjustments, the size of statistics and columns named *date*, *year*, *number*, or codec remains the same if another column can be resized.

Statistics

Statistics are columns that display aggregated information for the tracks contained in each item.

Statistic Description
Bitrate Average bitrate.
Duration Total length.
First release First date or release date tag.
Index Position in the list, always ranges from 1 to the number of displayed items, regardless of how items are sorted. Useful to quickly see the top or bottom N elements. The summary item displays the total number of items.
Items Number of tracks.
Last modified Last time a track has been modified.
Last release Latest date or release date tag.
Lossless ratio Number of lossless files, in percent.
Rating Average rating from metadata, displayed as stars. The text color is dimmed according to the number of files that are rated, which indicates the reliability of the displayed value. This is also taken into account when sorting by rating.
Subitems Number of subitems in the next pane.
Total peak Highest peak of ReplayGain-scanned tracks.
Total size Sum of file sizes.

Playback statistics

The following statistics require the additional playback statistics component.

Statistic Description
First added First time a track has been added.
First played First time a track has been played.
Last added Last time a track has been added.
Last played Last time a track has been played.
Played Number of times a track has been played.
Played duration Sum over products of duration and play count. Note that while playback statistics counts tracks as played after one minute, this counts tracks as fully played each time, even if playback was stopped before the track finished playing.
Rating Average rating, displayed as stars. Checks playback statistics %rating% first, then metadata field rating. The text color is dimmed according to the number of files that are rated, which indicates the reliability of the displayed value. This is also taken into account when sorting by rating.

Playlist interaction

Library selection playlist

In media library mode, Facets sends the current selection to foobar2000's library selection playlist. By default, to prevent selection changes from interrupting playback, this playlist is preserved if the playing track is no longer selected, and the selection is sent to a new playlist instead. Note: Settings at Preferences: Media Library are ignored.

Double-click action

The double-click action is automatically locked if the library selection playlist is used. It is only configurable when the selection action is set to "None".

Middle-click action

By default, middle-clicking is used for scrolling, but can be assigned to other actions.

Creating autoplaylists

To create an autoplaylist, right-click on a list selection, or, if available, open the search results toolbar menu, and choose "Create autoplaylist". Autoplaylists are automatically updated to include tracks that match the search results or selected items. Note that their sort order is fixed to the "Default sort order" option, unless the filter or search query includes a SORT BY or SORT DESCENDING BY statement.

Editing created autoplaylists

To change the settings of a created autoplaylist, right-click on its playlist tab or playlist manager entry, and choose "Autoplaylist (Facets)". This will open the Facets view with the settings and selection used to create the autoplaylist. Note that in order to change the layout of panes, Facets' own layout editing mode toolbar has to be activated. When closing the window, a dialog asks if the changes should be saved.

Displaying contents of the current playlist

Instead of the media library, Facets can also be set to watch the active playlist via the source toolbar. Selection and focus changes are applied to the current playlist.

Selection logic

Holding the Shift key when right-clicking on column headers reveals the selection logic option. It controls how tracks of multiple selected items are combined. The default behaviour "OR" selects all tracks that can be found in any of the selected items, while "AND" only selects tracks that can be found in all selected items. For example, in a genre pane, AND selection logic can be used to obtain tracks that have all selected genres.

See also

References

  1. Original Facets changelog via archive.org

External links