Album mode/Single mode/Hybrid

Even with a beautiful album mode, things could get complicated with "single tracks" A beautiful color scheme could turn into a real disaster, relevant information could be obmitted or irrelevant. That's why a Single mode or Hybrid could be created.

Just an example:

picture
picture

Album mode

We will set it as if no Hybrid mode exists. Just enter the code of your columns, with your usual color scheme for album and usual information that you want (Typically with $select functions etc..). We Just have to hide columns displayed in the album mode when the single mode is used. Playlist filtering now enters in action. Use Hide on playlists and with Filter, something like *-s-*;*Singles* or whatever you choose for playlists with single tracks ("*" stands for any playlist with anything before or after -s- as text) .

As this system works with your playlist names, you must use a standard for your playlist names: all playlists with single tracks will have to contain Singles or -s- in their names. (or anything else indicated in the filter)

Single mode

Typically on the picture showed above, the album column is irrelevant for single tracks. As an example, I will create another column called album-s- with something more interesting for single tracks.

As we want to display this column only in playlists with *-s-*;*Singles* we will use the filter: Show only on playlists for this column (with *-s-*;*Singles* as filter).

picture

You can improve the system for several columns, color schemes etc.. But here is the main idea. You can see that the information given is now more relevant. And the visual style is not messed up.

Hybrid mode

Well now, for playlist with both albums and single tracks, it becomes more tricky as both Single mode and Album mode are not nice. That's why there is interest for an hybrid mode. As there are two manners to display information depending on their type, it means two codes interlocked for several columns. Actually, Hybrid mode is an enhanced Album mode.

Creating an Hybrid mode is one of the most difficult thing to do, so don't start with that. Create first an Album mode, then a Single mode, and finally, mix it up in an Hybrid mode when both Album mode and Single mode are finished.

First we have to guess which files are singles and which one are albums. And here come the bigger difficulty. A special tag? a missing field? special replaygain? I will give the code for things quite simple and efficient (70% of single files are recognized, but you can go up to 100% using one of the things declaring the file as single for all your single files).

Global/variables tab

// ===================================
//Declaring Single files
// ===================================

//If %tracknumber% or %album% or %artist% are missing
//or %singletrack% field created or track gain but not album gain
//the file is declared single

$set_global(is_single, $if($or($not(%tracknumber%), $not(%artist%), $not(%album%), %singletrack%,
$and( $not(%__replaygain_album_gain%), %__replaygain_track_gain%)),1))

Columns

Now we know which files are single and which are not. In your columns, you can use something like:
$ifequal($get_global(is_single),1,action to perform for single files,action to perform for album files).

Juste an example with the column shown above. (I modified the color scheme also to get something nicer)

$ifequal($get_global(is_single),1,
//Action to perform for single files
$if2(%artist%, $rgb(255,0,0)MISSING) $tab() $if2(%album%, $rgb(255,0,0)MISSING)$tab(),
//Action for album files
$select(%tracknumber%, %album%$tab()[%genre%], $if(%track artist%, Various artists
,%artist%)$tab()[%__replaygain_album_gain%], %codec%','%bitrate%',' %channels%$tab() [%date%],[%comment%]))
picture

Related pages

 

July 14 2008 15:32:12.    

Creative Commons LicenseLicensed under
CC A-NC-SA 3.0.