Foobar Code Release Pack Version 0.2
Tuesday, February 20, 2007

Many have asked for this, rather than rush out the first release I spent a while refining the code and commenting the various sections. Hopefully everything will be relatively understandable. All image sources are defined in variables at the top of the code, as are font sizes, colours and alignment variables. Please look at the readme.txt file which contains links and information about the required components, fonts and images. The code is in the new standard .pui format which should be placed in your " C:\Documents and Settings\USER\Application Data\foobar2000\PanelsUI" folder and loaded through Foobar2000's PanelsUI preferences dialogue.

The code has been released under the Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license which allows derivative works. Please do not remove the link back to this website or the copyright information.

Download Version 0.2

I am now openly accepting feature requests and answering questions. NOTE: For Single Column Playlist, Row Height: 17, Group Rows: 5 My Windows Visual Style is Inverso Reborn Balanced and a discussion and link can be found here. A good resource for downloading artist images is http://artists.trivialbeing.org

Components Required

Fonts
  • Bebas
  • Calibri - Comes with Windows Vista and cannot be redistributed (but you may find a site that has it)
  • BigNoodleTitling

Labels:

Posted by FofR | Permalink | Comments (5) |

PanelsUI - The next step in Foobar aesthetics
Wednesday, February 14, 2007
Terrestrial has done it again, this time it is his third component, PanelsUI . Until now, all foobar menus, toolbars and panels were arranged using ColumnsUI in any desired grid format - these panels were distinguished by irremovable borders that were defined by Window's visual style, much to the distate of budding user interface designers everywhere. PanelsUI offers a clean new approach - using scripts (in the familiar trackinfo mod format) panels themselves can be absolutely positioned and played with. New "persisting variables" or PVARS allow these scripts to store and edit variables in memory using buttons (see function: $button). In combination a slew of exciting new opportunities are possible; tabbed panels without the need for tabs_ui, clickable pop-ups, scripted interaction between trackinfo's, SCPL and PanelsUI, amongst others. To explain in words the potential is proving difficult, so I will show you some early design animations:

Tabbed panels, changed by clicking the buttons on the bottom menu
The image

Pop-up playlist, this appears beneath when thin (as below) and to the side when wide.
The image

A pop-up menu, buttons and control panel
The image

Im sure I will think of some much more advanced uses of this integration in the near future. But for now I think this is exciting enough. For those interested, to get going, the code for tabbed panels in PanelsUI is:

$select($add($getpvar(display.mode),1),
$panel(Option1,Track Display,0,20,%_width%,140,)
,
$panel(Option2,Album list,0,20,%_width%,140,)
,
$panel(Option3,Console,0,20,%_width%,140,)
)
$button2(0,160,0,0,14,14,button text,button text,'PVAR:SET:display.mode:0',)
$button2(14,160,0,0,14,14,button text, button text,'PVAR:SET:display.mode:1',)
$button2(28,160,0,0,14,14, button text,button text ,'PVAR:SET:display.mode:2',)


This simple example (that needs the button text replaced with a $font()text code) is the basis for tabs, clicking the first button shows the track display, the second an album list, third a console.

Labels: ,

Posted by FofR | Permalink | Comments (5) |
Artist Image Downloader, Service, Script etc.
Wednesday, January 10, 2007
A big feature I wanted to include in my foobar2000 music player was artist images, i.e. pictures of the performers. If I had the images this would be possible using either the track info mod (which I now favour) or the album art panel. The trouble was, unlike album art, there was no service that offered image downloads and the only website that offered a comprehensive artist image database was last.fm. My first approach to this problem was to create a local C script that would, in a very roundabout manner, obtain the artist image url from last.fm and then download it. This proved rather slow and buggy due to various artist names, timeout problems and image creation, yet it sufficed for the majority, leading me to a collection of 2000 artist images which I posted earlier.

Still not happy, I looked into creating a web service, based on hydrogenaudio forums member Chronial's efforts and ultimately we developed an online resource for downloading artist images. I do not plan to make the code public, mainly at Chronial's request. I have created this service here: http://artists.trivialbeing.org/?a=ARTIST where ARTIST is the performer's image you are looking for, for instance:

http://artists.trivialbeing.org/?a=the microphones
http://artists.trivialbeing.org/?a=blondie
http://artists.trivialbeing.org/?a=radiohead

Images are first sourced from Last.fm before being cached so as not to cause any undue strain on last.fm's servers.

To make things more useful you can append the URL with &outputmode=img,
e.g. http://artists.trivialbeing.org/?a=blondie&outputmode=img
and a wrapper of sorts is available via http://artists.trivialbeing.org/pic/ARTIST.jpg
e.g. http://artists.trivialbeing.org/pic/blondie.jpg
which can be used on forums:
http://artists.trivialbeing.org/index.php?a=blondie&outputmode=img

or in an artist download script. I use the URL2File command line application with this command:

URL2File http://artists.trivialbeing.org/pic/%1.jpg  C:\artistimages\thumbnails\%1.jpg -o 60
Where %1 is the first parameter passed to the batch file and 60 is a one minute timeout.

Using a custom run component I can call this batch file using foobar and a keyboard shortcut or button; when passing the artist (%artist%) to the batch file you should take care to replace characters that cannot be used in creating windows filenames. Foreign characters work too, as do special characters such as the artist "Why?" or "Wham!".

When using image output, if no artist is found the script returns this image:
The image

With regards to copyright issues, Last.fm's uploading policy states:
Because copyrighted images tend to be very restrictive about where they can be used we ask that you only upload images which are public domain, or that are explicitly licensed for promotional use. There are a number of places you can find images open to public use. First, try to find out if the artist has any promotional pictures on their official homepage (they usually do).

For those without foobar2000, I give an example of an alternative use. I took the recently played tracks RSS feed, played with it a little using magpierss and create a page that shows recent tracks along side artist images, an example can be found here:
http://fofr.trivialbeing.net/page.php?p=nowplaying

Labels: , ,

Posted by FofR | Permalink | Comments (2) |
Artist Images
Thursday, December 14, 2006
Here's a collection of artist images collected from last.fm: Artist Images (1890)

Labels: ,

Posted by FofR | Permalink | Comments (0) |
A new Foobar design in the works
Thursday, December 14, 2006
Terrestrial has updated his track info mod component to allow quick and easy image rotations, upon my request and within an hour of making that request which is quite astonishing. Anyway, these new found super powers enable us to create sexy image reflections which fade out using a simple transparent to black (or whatever colour) PNG overlay. My latest design efforts see a scalable version of this with top left artist images. The artwork itself acts as a Play or Pause button, unless the cover art does not exist, in such a case the button action calls up a Custom Run script Cover Downloader which uses Amazon to find album art images and save them to the audio file directory. Similarly, when artist images do not exist a custom run GetArtistImg script that I created downloads the image and saves it as %artist%.jpg etc. I'm always adding functions and tweaking it so it's not quite done yet, but here are some screenshots:
http://host.trivialbeing.org/up/foobar-scale-play.jpg The image

Labels:

Posted by FofR | Permalink | Comments (0) |
Foobar Component Update
Wednesday, November 01, 2006
Terrestrial has made another great update to his single column playlist module for Foobar2000 v0.9. This latest change adds the following functionality:

+ some tweaks to multiple window / multiple playlists
+ added "Playing" playlist selection
+ $fileexists()
+ added NOKEEPASPECT option for images
+ added wildcard support for images
+ added alignment options for images VALIGN-T (vertical align-TOP), VALIGN-B, HALIGN-L, HALIGN-R

I have highlighted the key improvements that I am now making use of. With these new additions images can be stretched to fit a give frame, for example:

$imageabs2(100,100,,,100,100,5,,$replace(%path%,%filename_ext%,*.jpg),NOKEEPASPECT)

This will display an image (finds any .jpg in the song's directory thanks to the new wildcard function - * is the wildcard) and stretch it to fit a 100x100 frame. Expanding upon this using the new fileexists function:

$if($fileexists($replace(%path%,%filename_ext%,*.jpg)),
$puts(albumMarg,110)
$puts(datax,160)
$imageabs2(100,100,,,100,100,5,,$replace(%path%,%filename_ext%,*.jpg),NOKEEPASPECT)
$imageabs(5,,images/artoverlay-1.png ,)
$drawrect(5,0,100,100,brushcolor-null pencolor-0-0-0)
$drawrect(6,1,98,98,brushcolor-null pencolor-150-150-150)
,
$puts(albumMarg,10)
$puts(datax,60))

This checks that the images is there, if it is it defines a specific margin for later use in positioning of artist, album and trackinfo. It then draws the image, a PNG overlay and some surrounding borders. If the image doesn't exist it defines a different margin so that the song data does not surround an empty space and instead is closer to the left, for example:

http://up.trivialbeing.org/img/foobar_illust.jpg

Labels: ,

Posted by FofR | Permalink | Comments (0) |
The New Foobar
Monday, August 21, 2006
So I have spent some time working with the latest trackinfo_mod beta panel that is available for the latest version of foobar2000 (0.9.3.1). It has the great ability to support PNGs which can be absolutely positioned. I decided to opt for a clear and non-invasive design that can be read at a distance (I hate having to get up from bed to see what song is playing). So I made the artist and title large, the album name a little bigger and then of course a huge album art cover. Of course this makes browsing for songs to play a little difficult so under the browse tab at the bottom there is an auto-hide columns UI playlist and album list panel, as shown in the handy (yet miniaturised for this blog) GIF. To see a full version of my setup click this link: Screenshot

The image

Labels: ,

Posted by FofR | Permalink | Comments (1) |





Design and content © 2008 Trivial Being, unless stated otherwise. All rights reserved.
Contact: fofr -at- trivialbeing.net