Help - Search - Members - Calendar
Full Version: Foobar2000 format strings
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25
hanser
Hrm.

I'm having a bit of a problem with hybrid. ( http://pelit.koillismaa.fi/fb2k/strings.php?f=16 )

I didn't modify the code at all from what upNorth has there. My colors are way off, though. I don't really dislike the coloration, though. My only problem is that I can't read the song info when it's pseudo-selected:

user posted image

It's all white like the background. How do I fix this? I looked at the format strings for a little while, and changed a few things: none of which worked.
hanser
Well, I fixed it, but I'm not sure I did it the cleanest possible way.

I changed all the FFFFFF to 000000 in the set color section:

CODE
//**************************************
// set colors
//**************************************
$puts(c_lightorange,$if(%_isplaying%,000000|000000,2299CC|7EBABE))
$puts(c_brightorange,0080FF|0080FF)
$puts(c_orange,$if(%_isplaying%,7EBABE|000000,0055DD|7EBABE))
$puts(c_lightbrown,7EBABE|7EBABE)
$puts(c_lightbrown2,$if(%_isplaying%,000000|000000,7EBABE|7EBABE))
$puts(c_blue,CC9922|7EBABE)
$puts(c_blue2,$if(%_isplaying%,000000|000000,CC9922|7EBABE))
$puts(c_darkblue,996600|7EBABE)
$puts(c_darkblue2,$if(%_isplaying%,000000|000000,996600|7EBABE))
$puts(c_lightgreen,99FF55|7EBABE)
$puts(c_lightgreen2,$if(%_isplaying%,000000|000000,99FF55|7EBABE))
$puts(c_green,55DD00|7EBABE)
$puts(c_lightgray,$if(%_isplaying%,0000FF|000000,CCCCCC|000000))
$puts(c_gray,808080|808080)
$puts(c_gray2,$if(%_isplaying%,0000FF|000000,808080|808080))
$puts(c_darkgray,505050|505050)
$puts(c_black,000000|000000)
$puts(c_white,000000|000000)
sld
Aren't the background and selection colours independent from the display code? At least, that's how I got UpNorth's code to look as intended.
billcow
I think he means that he wants to change the code to work with the color scheme he has (for background and selection). In which case hanser's answer (hee hee) is right on the dot.
hanser
QUOTE
I think he means that he wants to change the code to work with the color scheme he has (for background and selection). In which case hanser's answer (hee hee) is right on the dot.

At first it took me a second to figure out what was amusing... Back on Ars, a lot of my friends call me hanswer heh. Anyway, if you pronounce it properly it should be said haan-zer. tongue.gif
DotNoir
hmmm... now call me stupid and all, but I can't seem to get sorting right with UpNorth's playlist... I mean, I've tagged my Various artists again, but putting the artist as the real artist and not Various Artists as I had earlier I can't seem to sort properly... I can't think of how I might get sorting right... sorry for being such a dumbass...

edit. I've been using this : %ARTIST% - %ALBUM% - $num(%TRACKNUMBER%,3) - %TITLE%
but maybe I should kick my ass to see how I can do that in UpNorths playlist...
hanser
QUOTE(DotNoir @ Aug 5 2003, 06:30 AM)
hmmm... now call me stupid and all, but I can't seem to get sorting right with UpNorth's playlist... I mean, I've tagged my Various artists again, but putting the artist as the real artist and not Various Artists as I had earlier I can't seem to sort properly... I can't think of how I might get sorting right... sorry for being such a dumbass...

I've had the same problem; I have a bunch of compilation CDs that screw things up. I don't want to order by album, I want to order by artist... irksome to say the least.
Polymorph
The way I found to order the tracks correctly for the hybrid layout is go to "Sort By...." and use:

CODE
%ALBUM% - $num(%TRACKNUMBER%,3)


This just sorts the list by album title, and sorts by track number within the album.

I am guessing that if you have albums with multiple artists (as I have), sorting by artist AND album will be pretty difficult. One way to do it would be to have 2 tags for Artist, "Track Artist" and "Album Artist" (I.E. Various for compilations), then sorting on Album Artist rather than track artist. But this would mean having to re-tag all your tunes again.
DotNoir
after browsing a bit in the format string page I found out this useful piece of code by anza which works like a charm after inserting %va% - tag in the various artists files... So, thanks, anza smile.gif Have to modify it a bit in the future for my own use, but that's a good base to start...

CODE
$if(%singletrack%,%singletrack% - $replace($left(%artist%,4),'The ',)$right(%artist%,$sub($len(%artist%),4))) - $if(%album%,$if2(%va%,$replace($left(%artist%,4),'The ',)$right(%artist%,$sub($len(%artist%),4))) - $if(%va%,%singletrack% - %album%,%cds% - %bootleg% - $num($if2(%albumdate%,%date%),4)) - %album% - %disc% - $num(%tracknumber%,2) - $if(%va%,$replace($left(%artist%,4),'The ',)$right(%artist%,$sub($len(%artist%),4)) - %title%,%title%),$replace($left(%artist%,4),'The ',)$right(%artist%,$sub($len(%artist%),4) - %title%))
sld
QUOTE(Polymorph @ Aug 5 2003, 09:07 PM)
CODE
%ALBUM% - $num(%TRACKNUMBER%,3)

Shoot, that did the trick!
Did you figure it out yourself, or did you get it off a website? If the former, you're good! If the latter, can you post the link?
Would there be a way to sort them such that all the single songs get pushed to the bottom (or top), and the albums grouped together?
upNorth
My contribution smile.gif
CODE
$puts(is_single,$if($or(%singletrack%,$stricmp($substr(%_directoryname%,0,9),'=SINGLES=')),1,0))$puts(is_various,$if($or($or($if3(%various%,%performer%,%album artist%),$stricmp($substr(%_directoryname%,0,5),'VA - ')),$stricmp($substr($directory(%_path%,2),0,5),'VA - ')),1,0))$get(is_single) - $get(is_various) - $if($strcmp(1,$get(is_various)),%ALBUM%[ - %date%],%ARTIST%[ - %date%] - %ALBUM%) - %_path% - $num(%tracknumber%,3) - %TITLE%
Sort strings can be pretty individual though...

Btw: Because of the use of $if3 this string works only with foobar2000 v.0.7

Sorry if this makes the page wide and hard to read sad.gif
DotNoir
Thanks a lot upNorth... hmmm... just a suggestion... Like anza has, could you also add this to your playlist code page in the format string page?
upNorth
@DotNoir
Good idea, I've added it now. Included the strings I use with foo_dbsearch and foo_history by foosion too (don't know if anyone else has any use of them though...). I may remove them later, because it got a little too cluttered. dry.gif
mmartinx
Er, n00b question, but where can I find a list of all variables? It seems like only a few are included in the help file.
picmixer
QUOTE(mmartinx @ Aug 8 2003, 12:21 AM)
Er, n00b question, but where can I find a list of all variables? It seems like only a few are included in the help file.

Hmh, what exactly do you mean by variables? Do you mean tag fields, like %artist%?

If thats the case it basically handles everything your imagination can come up with and that you throw at it.

Furthermore it supports different techinfo fields. You can find these in the technical info field when you right click "show file info" in Foobar. They tend to differ somewhat from codec to codec. The only important thing is that they have to be %__techinfo% in the formatting. Finding that one out definately cost me a few wasted hours. biggrin.gif

All the special field like %_isplaying%, etc. should be mentioned in the help file.
musicmusic
QUOTE(mmartinx @ Aug 7 2003, 11:21 PM)
Er, n00b question, but where can I find a list of all variables? It seems like only a few are included in the help file.

Erm, like what? It is all explained in the help ( it aint in the current 0.7 beta, theres a version at http://foobar2000.org/titleformat_help.html )

%...% fields are from metadata, shown in file info screen
%_...% are special fields, a complete list is in the tf help
%__...% are tech infos, viewable on the file info screen

$abc(...) are functions, of which a list is in tf help.

What else are you looking for ??
mmartinx
Ah, thanks. For some reason I thought there were more that weren't in the help file.
picmixer
Anyone ever experienced any strange glitches when cutting strings ($cut), that contain different colours.

I kind of have this problem that when I cut certain lines in my string beyond any color values it contains, I will get the actual values displayed on the screen and the line will not be cut to the desired length.

Have done a little test setup with

$cut(000000|000000%artist%FFFFFF|FFFFFF%title%,40)

but that seems to work fine. So I guess the problem must be somewhere in my string. Have been soig my head in, since it' s about one of the last glitches I want to get rid of in my new string, but I simply can't seem to figure it out.

Just wondered wether anyone else ever experienced this before and actually hass figured it out.

Been trying to sort this out since this morning headbang.gif
musicmusic
Colour codes are counted in $cut() / $len() etc.

Best to :

1) Keep them out side of functions that will be messed up .
2) Account for them, using an $if() statement if nessessary . But I dont this one will always be appropriate, cant be bothered to think .

edit:

For something like what you posted, if you had ~31 char artist it would mess up.

I suggest you try and separate them up.

Heres a simple trimming script which adds a "..." if your interested.

$puts(tartist,33)
$ifgreater($len(%artist%),$get(tartist),$trim($cut(%artist%,$sub($get(tartist),2)))…,%artist%)

So something like

000000|000000
$cut(%artist%,15)
FFFFFF|FFFFFF
$cut(%title%,25)

Or $padcut() etc.

Or you could use my trimming script instead :

000000|000000
$puts(tartist,15)
$ifgreater($len(%artist%),$get(tartist),$trim($cut(%artist%,$sub($get(tartist),2)))…,%artist%)
FFFFFF|FFFFFF
$puts(ttitle,25)
$ifgreater($len(%title%),$get(ttitle),$trim($cut(%title%,$sub($get(ttitle),2)))…,%title%)
upNorth
IIRC, you should not use colors inside a $pad() and such. Maybe this applies to $cut() too, as I guess they are related?
Personally I try to do things step by step to avoid problems, but it sure makes the formatting longer than necessary.
picmixer
QUOTE(musicmusic @ Aug 9 2003, 12:08 AM)
Colour codes are counted in $cut() / $len() etc.

Hmh, I was already afraid of that. Thanks for the quick reply.

The problem is that exactly that part of the string uses a lot of different colorings for different options. So going the $if way is going to be very hard. Already did that in some simpler part of the string for other reasons, so it would probably work, but be a rather astronomical undertaking in this case.

Guess I'll have to look into your first sollution. Although that will probably equally hard for the same reasons. Otherwise I'll just have to live with it, it's only for a few rare cases anyway and can be avoided by setting the column width wider.

Guess I'll have a look if I can sort this out once more know.

QUOTE
Personally I try to do things step by step to avoid problems, but it sure makes the formatting longer than necessary.


Well maybe there is some hope after all. I'll have a look into that.

Thanks
musicmusic
QUOTE(picmixer @ Aug 8 2003, 11:21 PM)
Hmh, I was already afraid of that.  Thanks for the quick reply.

The problem is that exactly that part of the string uses a lot of different colorings for different options.  So going the $if way is going to be very hard.  Already did that in some simpler part of the string for other reasons, so it would probably work, but be a rather astronomical undertaking in this case.

Guess I'll have to look into your first sollution.  Although that will probably equally hard for the same reasons.  Otherwise I'll just have to live with it, it's only for a few rare cases anyway and can be avoided by setting the column width wider.

Guess I'll have a look if I can sort this out once more know.

Yeah $if() / accountting for it is usually a bad idea . It would only really work if the colour code was at the beginning of the string, or there where no variables/non-fixed length strings before the last colour code.

Maybe you could post your string ?

Like in your above example, you wouldnt really want a 31 char artist or otherwise long field messing it up, so I would think separating it up and then keeping colour codes outside of/before the function is the best thing.

Or you could try making a script to insert the colour code after cutting if that would work. It would probably use $substr() with the %fields% , and $insert if it does what i think .
picmixer
Well here it is. Only posted the what i think is the relevant part, since the whole thing is quite long. To much bait for the long post bug wink.gif

The code isn't entirely cleaned up yet, but does the job, except for this nifty littte problem.

It occours at the end of the posted code in the //title section, athough all of the above should have quite some influence on it.

Can post the whole thing if needed. Thanks for time and help.
picmixer
CODE

////////////////////
////   Config   ////
////////////////////

//column widths
$puts(column_1,60)
$puts(column_2,45)

//Colors
$puts(black,000000|000000)
$puts(background_color,6B3518|6B3518)
$puts(plnum_color,FFFFFF|FFFFFF)
$puts(artist_color,B39D80|B39D80)
$puts(album_color,$if(%fullalbum%,9B8A74|9B8A74,000000|000000))
$puts(trackartist_color,$if(%_isplaying%,9B8A74|9B8A74,000000|000000))
$puts(title_color,$if(%_isplaying%,9B8A74|9B8A74,FFFFFF|FFFFFF))
$puts(date_color,$if(%_isplaying%,11118E|11118E,000000|000000))
$puts(codec_color,81715C|81715C)
$puts(track_color,$if(%_isplaying%,9B8A74|9B8A74,9B8A74|9B8A74))
$puts(spacer_color,$if($stricmp(cdda,$cut(%_path_raw%,4)),11118E|11118E,$if(%__replaygain_album_gain%,13139C|13139C,08FF48|08FF48)))
$puts(trans1_color,B39D80|B39D80)
$puts(trans2_color,9B8A74|9B8A74)

// Spacers
$puts(album_spacer,•)
$puts(track_spacer,*)
$puts(tag_spacer,*)

// Additional options
// 1 = true, 0 = false
$puts(display_date,0)
$puts(display_file_info,0)
$puts(display_time,1)
$puts(display_graphic,1)


/////////////////////////
////   End config   ////
/////////////////////////



//////////////////
////   Tagz   ////
//////////////////

//Playlist Number
$puts(playlist_number,$if(%_isplaying%,9B8A74|000000>>>>,$ifgreater(%_playlist_number%,999,$get(plnum_color)$num(%_playlist_number%,4),$ifgreater(%_playlist_number%,99,$get(plnum_color)$pad_right($num(%_playlist_number%,3),4),$ifgreater(%_playlist_number%,9,$get(plnum_color)$pad_right($num(%_playlist_number,2),4),$get(plnum_color)$pad_right($num(%_playlist_number%,1),4))))))

// Artist
$if(%artist%,
$puts(artist,$get(artist_color)%artist%),
$puts A$puts(tag_spacer,*)

// Additional options
// 1 = true, 0 = false
$puts(display_date,0)
$puts(display_file_info,0)
$puts(display_time,1)
$puts(display_graphic,1)


/////////////////////////
////   End config   ////
/////////////////////////



//////////////////
////   Tagz   ////
//////////////////

//Playlist Number
$puts(playlist_number,$if(%_isplaying%,9B8A74|000000>>>>,$ifgreater(%_playlist_number%,999,$get(plnum_color)$num(%_playlist_number%,4),$ifgreater(%_playlist_number%,99,$get(plnum_color)$pad_right($num(%_playlist_number%,3),4),$ifgreater(%_playlist_number%,9,$get(plnum_color)$pad_right($num(%_playlist_number,2),4),$get(plnum_color)$pad_right($num(%_playlist_number%,1),4))))))

// Artist
$if(%artist%,
$puts(artist,$get(artist_color)%artist%),
$puts(artist,$get(artist_color)$directory(%_path%,2)))

$if(%various%,
$puts(artist,$get(artist_color)%various%))



//Track_artist
$if(%artist%,
$puts(track_artist,$get(trackartist_color)%artist%),
$puts(track_artist,$get(trackartist_color)$directory(%_path%,2)))

// Title
//Lengths
$puts(title_cut,$add($get(column_2),8))
$if($stricmp($num(%tracknumber%,2),01),$puts(title_cut,$get(column_2)))
$if(%various%,$puts(title_cut,$add($get(title_cut),30)))

$if(%title%,
$puts(title,$get(title_color)%title%),
$puts(title,$get(title_color)%_filename%))

$if(%fullalbum%,$if($stricmp($num(%tracknumber%,2),01),$puts(title,$if(%_isplaying,$get(title_color),$get(spacer_color))%title%)))

$if(%various%,$puts(title,$get(title) $get(spacer_color)$get(album_spacer) $get(track_artist)))

$if(%fullalbum%,$puts(title,$cut($get(title),$get(title_cut))(artist,$get(artist_color)$directory(%_path%,2)))

$if(%various%,
$puts(artist,$get(artist_color)%various%))



//Track_artist
$if(%artist%,
$puts(track_artist,$get(trackartist_color)%artist%),
$puts(track_artist,$get(trackartist_color)$directory(%_path%,2)))

// Title
//Lengths
$puts(title_cut,$add($get(column_2),8))
$if($stricmp($num(%tracknumber%,2),01),$puts(title_cut,$get(column_2)))
$if(%various%,$puts(title_cut,$add($get(title_cut),30)))

$if(%title%,
$puts(title,$get(title_color)%title%),
$puts(title,$get(title_color)%_filename%))

$if(%fullalbum%,$if($stricmp($num(%tracknumber%,2),01),$puts(title,$if(%_isplaying,$get(title_color),$get(spacer_color))%title%)))

$if(%various%,$puts(title,$get(title) $get(spacer_color)$get(album_spacer) $get(track_artist)))

$if(%fullalbum%,$puts(title,$cut($get(title),$get(title_cut))))
picmixer
Allright, guess that was to much for the dreadfull LPB dry.gif

Well it was worth a try. Trust me, I didn't mean it was that messy.

Wheres the exterminator, I hate the bugger. Why now headbang.gif
biggrin.gif
musicmusic
I would still suggest you try and separate the $ cuts()

first thing i noticed is in

$if(%fullalbum%,$puts(title,$cut($get(title),$get(title_cut))(artist,$get(artist_color)$directory(%_path%,2)))

youve got $get(artist_color) when you put artist_colour into some of the the $put() for artist I think ??

What I would suggest is that you cut your fields at the $ put level instead, and take colour codes out of the $put for artist etc.) So the $cuts() will add up to your current value in total.

Then when you want to build your string, its just $get(artist_colour)$get(artist)$get(title)$get(Title_colour)

The problem is (if you dont use $padcut and fixed width font that is, the forum messed your string up too much otherwise i would have at least pasted it into foobar) sometimes though your strings will be cut unneccessarily, i.e. extra space left over. So, you could even go all out, and make your cutting script more intelligent, ie if there is a short title, no need to cut artist. I had something like this ill see if i have it stil. (edit: its abit different, more simpler so it wouldnt be of much relevence)




If you really want to go for something based on cutting one long strings with colour codes it would have to be something messy and horrible like this.

$puts(string,$cut(%artist%%title%,40))

000000|000000

$cut($get(string),$len(%artist%))

FFFFFF|FFFFFF

$substr($get(string),$add($strstr($get(string),%artist%),$len(%artist%)),$len($get(string)))

Based upon your old example above, and doesnt work properly either. (which adds more to the reason for me reccomending against this, and going for the above.)
picmixer
QUOTE
Then when you want to build your string, its just $get(artist_colour)$get(artist)$get(title)$get(Title_colour)


Allright, that seems like a really promising option. Will definately look into this. Somehow this seems the most elegant way to solve this. Am not sure how successfull I'll still be tonight though.

Was actually still planning to include some kind of nice script for abbreviating everyhing nicely at a later point.

First want to get this to work properly though.

Appreciate your time and effort, the grey clouds are clearing up slowly biggrin.gif
picmixer
First of all apologies for constantly posting new posts, but I simply don't dare to edit at the moment.

QUOTE
first thing i noticed is in

$if(%fullalbum%,$puts(title,$cut($get(title),$get(title_cut))(artist,$get(artist_color)$directory(%_path%,2)))


Well funny, but that line absolutely does not exist in my string. It seems to be a pure product of the long post bug. I didn't know it could also do FB title formatting.

You really have to ignore that piece of code. It is an entire mess.
musicmusic
QUOTE(picmixer @ Aug 9 2003, 12:28 AM)
Well funny, but that line absolutely does not exist in my string.  It seems to be a pure product of the long post bug.  I didn't know it could also do FB title formatting.

Lol. Never mind.

To be honest though, I would avoid over-using $put/$get , i find it makes your string difficult to understand when you do it like thath, what I mean is i think its better to keep your string logical/in order , e.g.

QUOTE
// ARTIST SECTION ////////////////

$get(normcol)

$ifgreater($len(%artist%),$get(tartist),$trim($cut(%artist%,$sub($get(tartist),2)))…,%artist%)

// TITLE SECTION /////////////////

$repeat($char(9),9)
$get(normcol)
$if(%title%,
$ifgreater($len(%title%),$get(ttitle),$trim($cut(%title%,$sub($get(ttitle),2)))…,%title%)
,)


But its entirely down to personal preference..
mmartinx
Heh, figured it out again.
mmartinx
I want to switch between 2 colors between albums on my playlist, here's my code...

CODE

$if($stricmp(%album%,lastalbum),,$puts(lastalbum,%album%)$if($stricmp(color,F2A400|969696),$puts(color,FFFF00|FF1234),$puts(color,F2A400|969696)))


The idea is, if the lastalbum is the same as the current album, status quo. But if there is a new album, set the current album to last album and switch the colors. I tested the conditional with sample output, and I always got the else. Is it a problem that I'm not initializing it until it's in the conditional?

Probably something obvious that I'll figure out before someone posts wink.gif
picmixer
I think I know what you are trying to do. Tried something similar a few days ago and miserably failed.

In case it is, basically the point is that one line simply cannot know wich other line is actually playing. Each line can only determine wether it is playing by itself.

Took me a bit to get my head around that one as well. Try to read back in the thread one or two pages.

CODE

$puts(lastalbum,%album%)


Something is weird here as well, afaik you can't write info to tags only read from them.
mmartinx
Argh, I'm never gonna remember the $get() notation.

fixed (still doesn't work though)
CODE

$if($stricmp(%album%,$get(lastalbum)),,$puts(lastalbum,%album%)$if($stricmp(color,F2A400|969696),$puts(color,FFFF00|FF1234),$puts(color,F2A400|969696)))


QUOTE
In case it is, basically the point is that one line simply cannot know wich other line is actually playing. Each line can only determine wether it is playing by itself.


I don't see why not. The convention I'm trying to use compares (or is supposed to compare) the last album (which is stored in a separate variable, and only updated after the comparison is made) to the current album.
mmartinx
By the way, here's my current code:

CODE
// define colors
$if(%_isplaying%,$puts(color,FFDF9D|FFDF9D),$puts(color,F2A400|969696))

// soundtrack conditional
$if($or($or($stricmp(%genre%,Soundtrack),$stricmp(%genre%,Game)),$stricmp(%genre%,Anime)),$puts(first,%album%)$puts(second,%artist%),$puts(first,%artist%)$puts(second,%album%))

// set teh color
$get(color)

// output string
$num(%_playlist_number%,5) | $if(%title%,$padcut($iflonger($get(first),20,$left($get(first),20)...,$get(first)),25) | $padcut($iflonger($get(second),20,$left($get(second),20)...,$get(second)),25) | $if(%tracknumber%,$if($greater(%tracknumber%,9),$pad(%tracknumber%,3),$pad( %tracknumber%,3)))$padcut($iflonger(%title%,40,$left(%title%,40)...,%title%),$if(%tracknumber%,40,43)) |$pad($lower($ext(%_path%)),4)|$pad(%__bitrate%,3)'|',$padcut($iflonger(%_filename_ext%,95,$left(%_filename_ext%,95)...,%_filename_ext%),100)|$if($strcmp($ext(%_path%),cue),,$pad($lower($ext(%_path%)),4)|$pad(%__bitrate%,3)'|'))%_length%


For soundtracks, album comes before artist, everything else artist before album. There's a few more things I'd like to add (like alternating colors between albums, heh).

user posted image
upNorth
@mmartinx:
If I understand you correctly you are trying to do something like this:

All songs belonging to album A : RED
All songs belonging to album B : BLUE
All songs belonging to album C : RED
All songs belonging to album D : BLUE
All songs belonging to album E : RED

Or something similar.

This is not possible because of the fact that variables are not passed on to the next line to be processed. Your formatting is executed once for every line in the playlist, without any knowledge of the previous or the next line. In other words it has no memory. This is the reason all album oriented formattings use tracknumbers and custom tags to decide how each line should look.

As picmixer said, this has been mentioned earlier in this looong thread...
mmartinx
QUOTE(upNorth @ Aug 10 2003, 12:16 PM)
@mmartinx:
If I understand you correctly you are trying to do something like this:

All songs belonging to album A : RED
All songs belonging to album B : BLUE
All songs belonging to album C : RED
All songs belonging to album D : BLUE
All songs belonging to album E : RED

Or something similar.

This is not possible because of the fact that variables are not passed on to the next line to be processed. Your formatting is executed once for every line in the playlist, without any knowledge of the previous or the next line. In other words it has no memory. This is the reason all album oriented formattings use tracknumbers and custom tags to decide how each line should look.

As picmixer said, this has been mentioned earlier in this looong thread...

Yeah, that's what I was trying to do, and I see why it can't happen sad.gif

Has there been any talk of adding the ability to keep variables between formatting instances? Or even I/O from a file, that'd be awesome.
foosion
QUOTE(mmartinx @ Aug 10 2003, 11:21 PM)
Has there been any talk of adding the ability to keep variables between formatting instances?

I don't think this is gonna happen. The format strings for playlist entries are not necessarily (re)evaluated in the order of the entries in the playlist.

QUOTE(mmartinx @ Aug 10 2003, 11:21 PM)
Or even I/O from a file, that'd be awesome.

Well, it would make things awfully slow. Like "lightning fast" compared to "it takes ages".
Sam Stoat
Is there a way to display your total number of tracks in the playlist in the status bar? I don't like using playlist numbers in my list, but I'd like to know how many tracks are there.
smok3
QUOTE(Sam Stoat @ Aug 11 2003, 08:54 PM)
Is there a way to display your total number of tracks in the playlist in the status bar?  I don't like using playlist numbers in my list, but I'd like to know how many tracks are there.

reading the titleformat_help.html there is :

%_playlist_total% returns number of files in playlist

(but that seems to only work in playlist?)
camote
Can someone recommend a good fixed width font that has the following features.

-legible at small sizes (8 and/or below)
-narrow, doesn't take up too much space

I am currently using Ms Gothic which is nice.
Jan S.
QUOTE(camote @ Aug 11 2003, 09:45 PM)
Can someone recommend a good fixed width font that has the following features.

-legible at small sizes (8 and/or below)
-narrow, doesn't take up too much space

I am currently using Ms Gothic which is nice.

I think most ppl use "Lucida Console".
IMO your points are true for Lucida Console.
camote
Actually, Ms Gothic still works better (IMO) than Lucida Console. For anyone interested in trying Ms Gothic, it is available in the Microsoft Japenese Text Support Pack.
camote
And for anyone wondering, here is my simple format string. Feel free to offer suggestions.

QUOTE
| $padcut(%ARTIST%,39) | $padcut(%ALBUM%,38) | $padcut([%tracknumber%],21) | $padcut(%TITLE%,37) | $padcut([%comment%],58) |
smok3
QUOTE(camote @ Aug 11 2003, 09:45 PM)
-legible at small sizes (8 and/or below)
-narrow, doesn't take up too much space

i used to use the onuava.ttf
snap http://smokeamiga.virtualave.net/foo_onuava.gif
font http://www.dafont.com/search.php?nq=5&q=onuava


(but using NONmonospaced 'Lucida Sans Unicode' this days
http://users.volja.net/smoker/pub/foobar2000.png )
Sam Stoat
QUOTE(smok3 @ Aug 11 2003, 11:13 AM)
reading the titleformat_help.html there is :

%_playlist_total% returns number of files in playlist

(but that seems to only work in playlist?)

Thanks smok3, but %_playlist_total% returned '?' in both the status bar and the playlist.

I'm still fairly new to foobar, so can I ask where is the titleformat_help.html?
smok3
QUOTE(Sam Stoat @ Aug 12 2003, 01:41 PM)
Thanks smok3, but %_playlist_total% returned '?' in both the status bar and the playlist.

I'm still fairly new to foobar, so can I ask where is the titleformat_help.html?

this could be '0.7 beta xx' specific thingy then..., titleformat_help.html should be in your foobar's root dir. (again for 0.7 beta xx)
sld
QUOTE(sld @ Aug 5 2003, 10:01 PM)
CODE
%ALBUM% - $num(%TRACKNUMBER%,3)

How would you sort further with custom tags, for example, %DISC% or %SINGLETRACK%?
picmixer
Hmh, depends how exactly you want to sort them?

In case you want your singletrack in the beginning or end of your playlist you could try something like.

[%singletrack%] - $if2(%album artist%, %artist%) - %album% - [%disc%] - $num(%tracknumber%,2)
Linkin
this stuff is a bit too complicated for me so can anyone please tell me how i get this:

CODE

Playlistnumber. Artist: "Album" - |-Track 1
                                  |-Track 2
                                  |-Track X
torji
QUOTE
this stuff is a bit too complicated for me so can anyone please tell me how i get this:


CODE 

Playlistnumber. Artist: "Album" - |-Track 1
                                  |-Track 2
                                  |-Track X



Yes it is a good question biggrin.gif As far as i 'm concerned, I have read all the variables in titleformat_help.html but I keep misunderstandind how works $min and $select variables... huh.gif
Maybe something like $if($max(%tracknumber%,1),%artist% ? no ? unsure.gif
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.