Help - Search - Members - Calendar
Full Version: My Album List Hierarchy
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
j-bo
$caps( $if2( $trim( $if2(%album artist% , %artist%)) , unknown artist ))|$if2( $trim( %album% ) , non-album ) $if( %albumsubtitle% , - %albumsubtitle% ,)|$if2($num(%tracknumber%,2),00) $if2($trim(%title%),untitled ) $if( %album artist% , $if( $stricmp( $trim( %album artist% ) , $trim(%artist%) ) , , - $trim(%artist%) ) , )

Not perfect, but this is as good as I can get without source-diving!

Is it possible to organise the files into folders according to the AlbumList tree? This would be a great feature, and would allow organising of music all over the hard drive into customisable folders.

If the any developers are reading, there are a few anoying limitations in the scripting. Like I can't access multiple instances of a field seperately. If a track has multiple artists and albumArtist defined I'd like to be able to display "with FOO" where foo is the artist != albumArtrist.
j-bo
Ah, well - I guess no1s trying this out then? Do most foobar users use the album list much? I found the default settings pretty strange (but then I do have quite a bit of music on my PC)

Anyway, I fixed a few bugs and wrote a custom sort, so that names like "The Foo" are sorted as "Foo", but still listed as "The Foo" - like in media player. Before I had too many artists starting with 'the' all bunched together.

FooBar warns that custom sorts are slow, but I've noticed no difference. Copy/Paste these into Components/AlbumList in preferences.

hierarchy:
$caps( $if2( $trim( $if2(%album artist% , %artist%)) , unknown artist ))|$if2( $trim( %album% ) , non-album ) $if( %albumsubtitle% , - %albumsubtitle% ,)|$if(%cdno%,CD%cdno%,) $if2($num(%tracknumber%,2), - ) $if2($trim(%title%),untitled %_filename_ext%) $if( %album artist% , $if( $stricmp( $trim( %album artist% ) , $trim(%artist%) ) , , - $trim(%artist%) ) , ) $if(%title%,$char(0040)$ext(%_path%)$char(0041),)

sort:
$if($stricmp($left($trim($if2(%album artist%,%artist%)),4),the ),$right($trim($if2(%album artist%,%artist%)),$sub($len($trim($if2(%album artist%,%artist%))),4)),$trim($if2(%album artist%,%artist%)))|$if(%album%,$if($stricmp($left(%album%,4),the ),$right(%album%,$sub($len(%album%),4)),%album%),zzzzz)|[$num(%cdno%,2)]$num(%tracknumber%,3)[%title%]$if(%artist%,%artist%,zzzzzzz)%_filename_ext%
sld
No, I don't use the album list at all.
But I'll add my post to help bump the thread so others can see it. smile.gif
spase
QUOTE(j-bo @ Oct 25 2003, 11:37 AM)
Ah, well - I guess no1s trying this out then? Do most foobar users use the album list much? I found the default settings pretty strange (but then I do have quite a bit of music on my PC)

Anyway, I fixed a few bugs and wrote a custom sort, so that names like "The Foo" are sorted as "Foo", but still listed as "The Foo" - like in media player. Before I had too many artists starting with 'the' all bunched together.

FooBar warns that custom sorts are slow, but I've noticed no difference. Copy/Paste these into Components/AlbumList in preferences.

hierarchy:
$caps( $if2( $trim( $if2(%album artist% , %artist%)) , unknown artist ))|$if2( $trim( %album% ) , non-album ) $if( %albumsubtitle% , - %albumsubtitle% ,)|$if(%cdno%,CD%cdno%,) $if2($num(%tracknumber%,2),  - ) $if2($trim(%title%),untitled %_filename_ext%) $if( %album artist% , $if( $stricmp( $trim( %album artist% ) , $trim(%artist%) ) , , - $trim(%artist%) ) , ) $if(%title%,$char(0040)$ext(%_path%)$char(0041),)

sort:
$if($stricmp($left($trim($if2(%album artist%,%artist%)),4),the ),$right($trim($if2(%album artist%,%artist%)),$sub($len($trim($if2(%album artist%,%artist%))),4)),$trim($if2(%album artist%,%artist%)))|$if(%album%,$if($stricmp($left(%album%,4),the ),$right(%album%,$sub($len(%album%),4)),%album%),zzzzz)|[$num(%cdno%,2)]$num(%tracknumber%,3)[%title%]$if(%artist%,%artist%,zzzzzzz)%_filename_ext%

i like the string... here is mine...

it is specially made to sort out the CDs with Various Artist rather than just one artist:

CODE
$if($stricmp($left(%_directoryname%,15),Various Artists),Various Artists,$if($stricmp($left(%_directoryname%,3),VA-),Various Artists,$if($stricmp($left(%_directoryname%,3),VA ),Various Artists,Single Artist)))|[$if($stricmp($left(%_directoryname%,15),Various Artists),%album%,$if($stricmp($left(%_directoryname%,3),VA-),%album%,$if($stricmp($left(%_directoryname%,3),VA ),%album%,%artist%)))]|[$if($stricmp($left(%_directoryname%,15),Various Artists),[$num(%tracknumber%,2). %title%],$if($stricmp($left(%_directoryname%,3),VA-),[$num(%tracknumber%,2). %title%],$if($stricmp($left(%_directoryname%,3),VA ),[$num(%tracknumber%,2). %title%],%album%)))]|$if($stricmp($left(%_directoryname%,15),Various Artists),,$if($stricmp($left(%_directoryname%,3),VA-),,$if($stricmp($left(%_directoryname%,3),VA ),,[$num(%tracknumber%,2). %title%])))


It detectes if a CD is various artists from the directory name (if it begins with VA, Various Artists, VA-, or Various Artists-).

You can use this without a sort string pretty much.

I do like the idea of sorting "The..." artists as if they did not have the "The" in front, but still displaying them with the "The"
ndrake
I love the string, ipod sorting (display, but don't take into account "the") is a very useful addition. However, it doesn't handle multiple disc albums very well.

Rather than the typical:
CODE

+--Artist
  +--Album
     +--Disc 1
         +--Track 01
         +--Track 02
      +--Disc 2
         +--Track 01
         +--Track 02
...

Your string displays:
CODE

+--Artist
  +--Album
      +--Track 01
      +--Track 01
      +--Track 02
      +--Track 02
...


Any chance you might fix that?
j-bo
Yeah, I tend to use the album artist tag (if present) to sort into albums so that all my Various Artist albums are listed together, but the artist of the individual track is still shown if AlbumArtist != Artist

For albums on multiple CDs I don't like to seperate out the disks, instead I sort on the CDNO field and then the track number to keep it in order. The way I see it, the CD# a track is on is just an artifact of the physical storage limitations I am trying to get away from by using foobar. A lot of my music is from vinyl, but I don't display sideA/B of the record as seperate albums, I think it's the same for mulidisc CDs.
ndrake
Ok, thats fine, it is your string smile.gif

In all honesty, though, I don't see A/B sides as physical limitations of the medium. While that might be a proper description, sides A and B can often have an important role in the "flow" (for lack of a concrete word) of an album, just as track numbers do. They are akin to "Chapter," "Part," etc. in literature, and the printing of books doesn't (realistically) have any physical limitations. But all of this is neither here nor there...

edit: pointless post; it is still a very good album list string.
Moneo
Mine is quite simple:

[$if2(%album artist%,%artist%)]|['['%date%']' ][%album%] '('$if2(%__cue_audiotype%,%__codec%)')'|[[%disc%.][$num(%tracknumber%,2).] ][%title%]

The album list ends up looking like this.
anza
Use %va% tag to indicate various artist's albums.

Tree hierarchy:
CODE
$if(%va%,'Various Artists',$replace($left(%artist%,4),'The ',)$right(%artist%,$sub($len(%artist%),4)))|$if(%album%,%album%[' (CD'%disc%[ - %discname%]')'][' ('$if3(%albumdate%,%year%,%date%)')'],'---')|[$num(%tracknumber%,2)'. ']$if(%va%,$replace($left(%artist%,4),'The ',)$right(%artist%,$sub($len(%artist%),4))' - ')%title% '['%_length%']'


Sorting:
CODE
$if(%va%,'Various Artists',$replace($left(%artist%,4),'The ',)$right(%artist%,$sub($len(%artist%),4)))|[%bootleg%] $if(%album%,$if3(%albumdate%,%year%,%date%,%album%),'---') [%disc%]|$if(%tracknumber%,$num(%tracknumber%,2) $if(%va%,$replace($left(%artist%,4),'The ',)$right(%artist%,$sub($len(%artist%),4))' - '%title%,%title%))


Also removes "the" from the beginning and also sorts if there was no "the" in front of the band's name (this is also what my formatting string does wink.gif)
Oedipax
I would use the Album List all the time except my Foobar database is simply too large and it takes forever to open up the list (a couple minutes). I could reduce the size of the database, but then it wouldn't be a true album list (in that it's a list of every album on my computer). Maybe if there was a way to have it just remember directory names instead of every track within the directory, it would be more manageable...
Freaky
I use %album artist% for VA albums. It can then be set to "Various", or anything else you fancy.

Here's my hierachy, which I find works well for my setup:

CODE
$if($or($not(%album%),$and($not(%artist%),$not(%album artist%)),%singletrack%),'Single Tracks',$if(%album artist%,%album artist%,%artist%))|[%album%]|[[%disc%.][$num(%tracknumber%,2).] ][%title%]


Oedipax, how many items are in your database? I have about 2,500 and my album list still takes well under a second to open.
anza
I have ~4300 files on my database and Album list takes about a second to open.. Oedipax has to have a HUGE database or something wrong to get it to take a few minutes to open up..
hermit22
I'm with you Oedipax. I have somewhere in the area of 25k files on my computer, which makes album list basically pointless since it takes so long to load (about 25-30 seconds sometimes). Now I just use the db search plugin.
kode54
Lots of files + complex hierarchy/sorting scripts = slow loading.
Oedipax
The "few minutes" thing was actually overstating it, it's more like 15-20 seconds (sorry). As for the size of the database, I don't know where I can find how many individual tracks are stored, but in terms of albums it's 2502 currently.

My tree hierarchy:
CODE
$directory(%_path%,2) - $directory(%_path%,1) | %_filename%


One idea is to restrict the database to m3u files and then create a playlist for each album. I'd go from 2502x10 items (roughly) to just 2502, correct? I think it would feasibly reduce loading times a great deal. But I'm not sure if I really want to do that either... Maybe if there's an automated way to make a playlist for each directory (seems like there would be).
kode54
It would still be one item per track.
kljs
I tried out J-bo's string, and my album list turn from mess to systematic...

Well, it put the songs neatly.....

Keep up the good work. laugh.gif

wub.gif
Moneo
QUOTE(Oedipax @ Oct 27 2003, 08:38 AM)
My tree hierarchy:
CODE
$directory(%_path%,2) - $directory(%_path%,1) | %_filename%

Try
CODE
$directory(%_path%,2)|$directory(%_path%,1)


You won't be able to go down to individual tracks, but the performance should improve greatly.
j-bo
Hmm... I've just tried sorting the albums by the year they were made. It looks really good for artists with 5+ albums, not all files have that tag filled in so it is sometimes out of order. Also, foobar gets confused when the year tag is different for two tracks in the same album, like in a best of B)

Windows tells me my music folder has 4999 tracks! (naturally I'm off to make a pointless download as soon as I've typed this) I have about 3500 mp3 and 1500 ogg, the album list still opens very quickly - less than a second with my complex heierarchy and custom sort. My computer is quite fast, but nothing all that special - AthlonXP 2100, 512meg 7200drive etc.

What I really want now is to be able to order the actual folder hierarchy like in album list. Most of my files are all over the place in a single folder and really need organising!

ndrake - I agree that sometimes the CDNO can have significence, that's why I maintain the CDNO ape tag. But I don't think 160mins of music would be on two CDs if one CD could hold that much, so it is also an artifact of the format's limitations. Besides, if I want to play cd1, I'll almost always want to hear cd2 next so it makes sense to have it as one album. Doesn't really matter of course!
Oedipax
QUOTE(Moneo @ Oct 27 2003, 08:42 AM)
QUOTE(Oedipax @ Oct 27 2003, 08:38 AM)
My tree hierarchy:
CODE
$directory(%_path%,2) - $directory(%_path%,1) | %_filename%

Try
CODE
$directory(%_path%,2)|$directory(%_path%,1)


You won't be able to go down to individual tracks, but the performance should improve greatly.

Awesome, thanks a ton, this helped a lot. Now it opens in a couple seconds. B)
Poese
QUOTE(spase @ Oct 25 2003, 10:15 AM)
i like the string... here is mine...

it is specially made to sort out the CDs with Various Artist rather than just one artist:

CODE
$if($stricmp($left(%_directoryname%,15),Various Artists),Various Artists,$if($stricmp($left(%_directoryname%,3),VA-),Various Artists,$if($stricmp($left(%_directoryname%,3),VA ),Various Artists,Single Artist)))|[$if($stricmp($left(%_directoryname%,15),Various Artists),%album%,$if($stricmp($left(%_directoryname%,3),VA-),%album%,$if($stricmp($left(%_directoryname%,3),VA ),%album%,%artist%)))]|[$if($stricmp($left(%_directoryname%,15),Various Artists),[$num(%tracknumber%,2). %title%],$if($stricmp($left(%_directoryname%,3),VA-),[$num(%tracknumber%,2). %title%],$if($stricmp($left(%_directoryname%,3),VA ),[$num(%tracknumber%,2). %title%],%album%)))]|$if($stricmp($left(%_directoryname%,15),Various Artists),,$if($stricmp($left(%_directoryname%,3),VA-),,$if($stricmp($left(%_directoryname%,3),VA ),,[$num(%tracknumber%,2). %title%])))


It detectes if a CD is various artists from the directory name (if it begins with VA, Various Artists, VA-, or Various Artists-).


For folks that have their music files structured like this:

F:\Tunes\Compressed (FLAC)\<leading letter of artist name>\%artist%\%album%\

where the Various Artist albums are tucked into a directory at the leading letter level:

F:\Tunes\Compressed (FLAC)\Various Artists\%album%\

spase's string works better using the $directory command like this:

CODE
$if($stricmp($directory(%_path%,2),Various Artists),Various Artists,$if($stricmp($directory(%_path%,2),VA-),Various Artists,$if($stricmp($directory(%_path%,2),VA ),Various Artists,Single Artist)))|[$if($stricmp($directory(%_path%,2),Various Artists),%album%,$if($stricmp($directory(%_path%,2),VA-),%album%,$if($stricmp($directory(%_path%,2),VA ),%album%,%artist%)))]|[$if($stricmp($directory(%_path%,2),Various Artists),[$num(%tracknumber%,2). %title%],$if($stricmp($directory(%_path%,2),VA-),[$num(%tracknumber%,2). %title%],$if($stricmp($directory(%_path%,2),VA ),[$num(%tracknumber%,2). %title%],%album%)))]|[$if($stricmp($directory(%_path%,2),Various Artists),,$if($stricmp($directory(%_path%,2),VA-),,$if($stricmp($directory(%_path%,2),VA ),,[$num(%tracknumber%,2). %title%])))]


Thanks for getting this thread started (j-bo) and for providing your string (spase) that I could modify. I've wanted the Album List to be organized like this since I started with FB2K!
12zmcnvow1277
Nice script!
Walterrrr
I added the %Album Artist% tag to a compilation album but it doesn't sort properly with my current sorting tag:

CODE
$if($strcmp($left(%artist%,4),The ),$right(%artist%,$sub($len(%artist%),4))', 'The,%artist%)

user posted image

unchecking the custom sorting tag sorts it in with the Cs as it should be, but then artists beginning with 'The ' are sorted under T:

user posted image

any ideas?

additionally, where can I read up on how to write the codes such as $if $strcmp, etc. ?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.