foobar2000 tutorial

« Back: Creating an iTunes style layout

5.3 ColumnsUI tutorial: Code-based tweaking (advanced)

This section involves the use of in-program code to make tweaks to the appearance and functionality of your foobar.

To do this section you will need to be familiar with foobar's code syntax. If you aren't then take a look at part 6 first, then come back here.

Editing the title bar

We'll start off nice and easy. Under the "main" tab of ColumnUI's preferences, at the bottom of the window, you'll find a box entitled "Main window title format script". You can freely edit what it says at the top of your foobar using titleformatting, instead of having just the default "foobar2000". I like to have it display the song title, artist name and the playback time and length, so the script will look like this:

foobar 2000 - %artist%: %title% '('%playback_time%/%length%')'

This gives a title bar that looks like this:

titlebar

The title bar format area will read everything you put in, including spaces, and doesn't require quotes for words and most letters. Certain letters such as $ and ( or ) need to be enclosed in apostrophes to show.

At one point I made a little progress bar that appeared in the title bar, and though it can look a bit naff the code would be something like this:

|$progress(%_time_elapsed_seconds%,%_time_total_seconds%,100,#,-)|


progress bar

Lovely, no? You can change the length of the bar by changing "100" to whatever number you like, and can change the characters that make up the bar.

Would love to hear if you come up with anything inventive and attractive to put in the title bar!

Global variables

An important concept in ColumnsUI is the global variable. This works by setting a variable that can be called upon anywhere within the columnsUI appearance preferences. They are set in the globals window, under "playlist view", and in the variables tab:

global variables

Global variables follow the same structure as normal variables, i.e.:

$set_global(myvariable,something)

In this case, "something" is put into "myvariable". They can then be called by using:

$get_global(myvariable)

This is very useful for defining a set of colours that you will use regularly, particularly when it comes to using the "Columns" tab (top of the window, I'll go through that soon). For instance,

$set_global(mycolour1,$rgb(233,0,20))

sets a reddish colour as a global variable "mycolour1" that I can call upon any time.

Columns editing

This is where columnsUI gets really good. You see all those columns in the columns playlist on your foobar? You can edit all sorts of things about them, such as what they display, their visual style and the way they sort (though I won't touch on that, I think they sort fine). On the "playlist view" page in preferences head to the "columns" tab at the top of the window, and you'll see something like this:

columns tab

Yours, however, will look different as I have a silly number of columns, for different occasions.

More coming soon...hopefully.

6. Code syntax »

Comments on the columnsUI tutorial

Jon

Posted on the 1st Mar 2009 at 23:28

Hi Speed,

One of the major features of foobar2000 is the components, which means that people can extend the functionality of their player to suit what they need. The stand-alone player is as light-weight as possible, and updates serve to make it more stable, even more light-weight and more compatible with components.

This means that it will never have as many features as ColumnsUI, but that's not a problem because you can use Columns to your heart's content! Hope that makes sense.

speed

Posted on the 1st Mar 2009 at 15:18

Hi, nice tutorial ColumnsUI is very useful especially when need to hide column captions (in my case :))). But this is only a little bit of its features. Regarding to the latest foobar2k version i'm really confused due its feeble features, none of ColumnsUI ones has been imported directly to the F2k. It might greatly improve foobar's functionality, but i hope this will change for the better.

Post a comment

Name:
Sex (for display picture): Male
Female
Email (won't be displayed):
Message:
Prove to me that you aren't a robot:

Comments may take a while to filter through, as I check them all before letting them go live.

Hi, I'm Jon Cairns

I'm a web designer and graphic designer who likes to create good-looking, accessible websites with XHTML, CSS, AJAX and PHP. I'm also a musician, photographer and student, and I live in Durham, up north in the UK. Use the links at the top of the page or just above to navigate my site, or read my blog to find out what's going on in my life.

Updates

  • 22nd Aug Added a new blog, "The Great Synchronisation". It seems that all of my updates are blogs these days!
  • 21st July Added a new blog entry, the first in two and a half months! Join me in the celebration of this momentous occasion by reading it.

From the blog

28th Aug 09

The Great Synchronisation

A few minutes ago I was sitting on a sofa with nothing to do, thinking, "maybe it's time for my annual blog entry". You may be wondering whether you should bother reading something that's been created simply because I had nothing better to do, but I submit to you that all good things are created that way. Think about it.

Read it all »