Getting Started with Foobar2000
This guide shall hopefully educate you in the ways of components and code syntax that Foobar2000 uses. It is a basic introduction to what makes fb2k popular, the features that are not instantly apparent and how to begin the customisation process. Future tutorials will discuss formatting techniques in more depth.
Loading up the bare bones foobar application, the customisation process looks daunting. Step by step I shall attempt to talk you through it.
To begin with we need to get your music into foobar2000, ideally as a library. To do this goto File > Preferences > Media Library. Here you can select the folders containing your music and the filetypes you want fb2k to index. Once you have added your folders select “scan” and wait til it finishes.
The unofficial fb2k manual has some other steps that may prove useful concerning playback, output and DSP options that are built into fb2k.
Before we begin playing I feel you should understand how formatting in fb2k works; it uses it’s own library of functions and fields collectively called “titleformatting”. Some examples of what this looks like are %album%, %tracknumber%, $add(a,b), $or(…), “$ifequal(a,b,run if equal,run if not)”. This formatting is used wherever information display can be customised, from the title bar to display panels and tool tips.
To explain, from the HA wiki, “A field reference is a field name enclosed in percent signs, for example %artist%. [This will show the artist as determined by the mp3 meta tag]. A function call starts with a dollar sign, followed by the function name and the parameter list. A parameter list can either be empty – denoted as () – or contain one or more parameters separated by commas, for example $abbr(%artist%) [This abbreviates an artist name]. Note that there must be no whitespace between the dollar sign and the function name, or the function name and the opening parenthesis of the parameter list.”
The Hydrogen Audio wiki provides a short but very useful introduction to this syntax here.
A complete list of the default functions and fields in fb2k is available here. A number of components add fields and functions to this list, for example cwb_hooks and PanelsUI add features such as $imageabs() which can draw images in track display and playlist panels and $eval() that makes math functions much easier to implement.
If this all seems a little complicated don’t worry, it quickly becomes second nature. Just be sure to play around lots and try new things.
The next thing you will want to do is install some components. Components offer 3rd party extensibility to fb2k and contain all the functions, tags, features and goodies needed to make your audio player fully functional. As of writing the latest foobar version is 0.9.x, it is essential that you are using the latest foobar player and have v0.9 compatible components. The old version 0.8 components have mostly been ported to the latest SDK however some are still floating about so beware and check before you install. The Hydrogen Audio Wiki (the definitive source for fb2k along with the forums) maintains a list of all version 0.9 compatible components here.
A component is typically a single .dll file, normally packaged in a zip file along with a change log and maybe a license.
Installation of components couldn’t be simpler, once downloaded browse to your foobar2000 application directory, typically:
From here enter the “components” directory, making sure that fb2k is closed, paste the newly downloaded component .dll file here. Close the folder and open up fb2k again – to check the component has installed go to File > Preferences (CTRL+P) > Component. This page lists all the installed plugins, their titles and their version numbers. Double clicking the component will bring up some basic information about it, for instance its purpose and the author.
Each component will have a different method of configuration but ultimately these options will appear in the preferences panel under the associated section, e.g. Display, Tools, Library, etc.
You’ll see that there is a lot of components to choose from and it may not be instantly apparent where to start, whilst this list is subjective and my personal preference it should help you get started. Here I’ll present a brief list and explanation before going into some in-depth discussion later.
The latest user interface component for fb2k replacing the former king of the hill, ColumnsUI, although still dependent on cUIs installation in order to run. PanelsUI is a relatively recent component that has revolutionised foobar aesthetics. Essentially it allows you to place display panels (e.g. the powerful track display panel that typically shows the now playing track or equally important ‘Single Column Playlist’ panel which shows a formatted playlist) where-ever you want in the fb2k window. Buttons and functions in combination with variables allow you to implement tabs, pop-ups, minimising panels and much more (this uses Foobar’s Titleformat referencing which shall be explained more later). Track Display and Single Column Playlist (or SCPL) come bundled in this one .dll.
Once installed, to begin using pUI head to File > Preferences > Display; where it states “User Interface Module” select PanelsUI. To edit the layout either right click the pUI window and select settings, right click the title bar or go to File > Preferences > Display > Panels UI.
When using this component you should ensure that you have the latest ColumnsUI component installed and a version of fb2k greater than 0.9.4. Panels UI is compatible with the majority of user interface components that were originally created for ColumnsUI; for instance these components here, which include music browsers, playlist trees and lyrics panels.
Ideally you will want to browse your music collection and select music to listen to, you will want to maintain playlists and switch between them, search your library and maybe have a fancy visualiser.
There are a range of browsing components out there, I personally use the Album list panel and the Explorer tree panel for my browsing but others include the Music Browser which has an iTunes like interface and the Playlist Tree. Each have their pros and cons, I’ll leave it to you to work out which you prefer. For search Quick Search toolbar is essential, presenting results in a new playlist (that can be defined). Playlist management could use the bundled Playlist Switcher panel that comes with ColumnsUI or alternatively you could use the Playlist Dropdown panel. A good spectrum replacement is the Egoh spectrum analyser.
Beauty is only skin deep, away from aesthetics you may want to add a little kick to the already impressive fb2k feature list. To this end there are 24 digital signal processing (DSP) components that manipulate and evolve your audio output, many specifically catered to audiophile needs. Whilst often specialist components there are some great general use functions for improving headphone audio output, removing silence and true gapless playback. These components illustrate the true power of fb2k.
I suggest you browse the component list and pick out the components that look interesting to you from hereon; categories include audio codecs; general usage (iPod support, alarm and scheduling); library tools for playlist management, playcounts; lyrics; notifiers; Last.fm support; remote control and tagging.
I personally recommend Custom info which lets me store information about songs in a custom database, for instance an artist url, a rating or even lyrics. Custom info allows you to define custom strings for displaying database entries within your layout. I also use CWB Hooks which adds a number of functions and strings not present in the default fb2k titleformat reference including playlist information, playback order, volume levels and other nifty little add-ons. For downloading album art and artist images it’s necessary to run external apps, this can be achieved using Foo Run.
New components are always being developed and upgraded so keep an eye on the forums. Though I hope this blog will help make keeping up a little simpler and easier.