Hydrogen audio fcs

Picmixer created the .fcs, and Lyx helped him to do the smart "walker" trick, The original .fcs could be found here: Related topic foo_ui_columns configurations, official thread picture

It is essentially an album mode, (but hybrid in fact). What is really interesting is that depending on the existing tag fields, the length of the information given about an album changes (See above). Quite simple idea, but really nice feature. The idea came from picmixer and was modded to be smarter by Lyx.

Global tab/Variables

Let's see how picmixer (and Lyx) did that trick. For the definition of colours, it's quite common, I let you discover it by yourself. Then, for the Artist column it creates a variable that will be shown in the album column..

It uses a new additional variable: "walker" to display the fields only if they exists, as a consequence, it doesn't waste any line. It is what we could call a recursive process. It does exactly the same thing for each field but the line where the field is displayed depends on what did the script before.

picture

Image //////////////////////
///Artist Column///
//////////////////////

$set_global(artist,
$select(%tracknumber%,%album artist%,%album%)
$puts(walker,2)
// GENRE
$if(%genre%,$select($sub(%tracknumber%,$get(walker)),%genre%)
$puts(walker,$add($get(walker),1)))
// DISC
$if(%disc%,$select($sub(%tracknumber%,$get(walker)),Disc %disc%)
$puts(walker,$add($get(walker),1)))
// LABEL
$if(%label%,$select($sub(%tracknumber%,$get(walker)),%label%)
$puts(walker,$add($get(walker),1)))
// PERFORMER
$if(%performer%,$select($sub(%tracknumber%,$get(walker)),%performer%)
$puts(walker,$add($get(walker),1)))
// COMPOSER
$if(%composer%,$select($sub(%tracknumber%,$get(walker)),
%composer%)
$puts(walker,$add($get(walker),1)))
// DATE
$if(%date%,$select($sub(%tracknumber%,$get(walker)),
%date%)
$puts(walker,$add($get(walker),1)))
// CODEC
$if($codec(),$select($sub(%tracknumber%,$get(walker)),
$codec()$char(9)$if2(%__replaygain_album_gain%,X.XX dB))
$set_global(walker,$add($get(walker),1))))
Image
Image Image

You can improve the code for your needs

Tracknumber column

Another interesting trick about colors. It just hides padding "0" before the tracknumber for tracknumber before 10 giving them the background color. And by the way it makes something nice for first tracks.

Image $if(%isplaying%,
//Color transition for the playing file
$transition(<><>,$get_global(background),$get_global(isplaying_2)),
$ifgreater(%track%,9,
//for tracks greater than 9, he does nothing
%track%,
//else it uses the function replace to give the background color to padding "0"
$replace(%track%,0,$get_global(background)0$hsl())))
Image
Image Image

Title column

Another nice thing about colors. (I simplified it a bit to make things more clear.)

Image %title%
//If for example if it is a Various artist album.
//The artist of the track is added but with another color to make it more visible

$if(%track artist%,$get_global(text_faint_2)- %track artist%)
Image
Image Image

Artist column

There it only gets the variable "artist" created in the Global tab.

Image $if($get_global(is_single),
//if the file is a single track, it displays only the album artist
[%album artist%],
//else it gets the artist variable created in Global/variable
$get_global(artist))
Image
Image Image

And for colors. the "walker" variable is quite interesting

Image $set_style(back,$ifequal(%track%,1,
//Background color for the first line
$get_global(background_darkest),
$ifgreater(%track%,
//here it checks if the tracknumber is greater than walker
$get_global(walker),
//if it's greater a color
$get_global(background),
//if not, another one
$get_global(background_dark))))
Image
Image Image


Previous page

 

July 14 2008 15:32:23.    

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