Picmixer created the .fcs, and Lyx helped him to do the smart "walker" trick, The original .fcs could be found here: foo_ui_columns configurations, official thread
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.
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.
////////////////////// ///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)))) |
||
// NEW FIELD TO ADD $if(%FIELD TO ADD%,$select($sub(%tracknumber%,$get(walker)), %FIELD TO ADD%) $puts(walker,$add($get(walker),1))) |
||
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.
$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()))) |
||
Another nice thing about colors. (I simplified it a bit to make things more clear.)
%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%) |
||
There it only gets the variable "artist" created in the Global tab.
$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)) |
||
$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)))) |
||
July 14 2008 15:32:23.