Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Foobar2000 format strings (Read 497604 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar2000 format strings

Reply #1200


In order not to have %album% repeated I use something about as basic as
$if($strcmp(%tracknumber%,01),$if2(%album% - ,'n/a - '))

You mean dividers like this?

As for streams titles hmm I think you have to use <whatever>%title% instead of %_filename%, and make sure "Show dynamic info" is checked (in prefs|display) as well as "Enable dynamic track titles" (in prefs|http reader)

Foobar2000 format strings

Reply #1201
QUOTE(Olive @ Jan 26 2005, 05:01 PM)

3) Who's the girl in your avatar? =)
You shouldn't have told everyone it wasn't you JEN..........you might not get your post responded to as quickly now!!

oh it wasnt you........I need to read more carefully b4 posting

Foobar2000 format strings

Reply #1202
Darn! 

I blame poorimpulsectrl 

Oh well, looks like I will have to show you guys my real picture.

As its better

Foobar2000 format strings

Reply #1203
  @ JEN

Foobar2000 format strings

Reply #1204
Quote


In order not to have %album% repeated I use something about as basic as
$if($strcmp(%tracknumber%,01),$if2(%album% - ,'n/a - '))

You mean dividers like this?

As for streams titles hmm I think you have to use <whatever>%title% instead of %_filename%, and make sure "Show dynamic info" is checked (in prefs|display) as well as "Enable dynamic track titles" (in prefs|http reader)
[a href="index.php?act=findpost&pid=270193"][{POST_SNAPBACK}][/a]


I have drawn a diagram of what I'd like



The 2nd column on the left (containing 16B - How To Live 100 Years) shows %_directoryname% . I want a divider (the red line drawn) to be placed in between files from different directories.

I have drawn red x's through the redundant directory names on the left - I just want it so that the first time a file from a directory is displayed, the directory name is displayed on the left. For all other files from the same directory , I don't want the directory name displayed. I see this in many people's configurations.

Regarding the radio stuff, I have dynamic info checked , etc. What I need is the IF statement to add, so that if I am listening to an internet radio station, it will display %title% instead of %_filename%.

Foobar2000 format strings

Reply #1205
Separators: Add this to the colour tab - although it's probably not the fastest method 

//txt
|//txt
|//bg
|//bg
//
|//bg
|//left
|//top frame
$if($and($not($strcmp($add(1,%_playlist_number%),2)),
$strcmp($substr(%_filename%,1,2),01)),0000FF,000000)
|//right
|//bottom

No repeat: $if($strcmp($substr(%_filename%,1,2),01),%_directoryname%,)

Dynamic titles: $if($strcmp($substr(%_path_raw%,1,7),'http://'),[%artist% - ]%title%,%_filename%)

Foobar2000 format strings

Reply #1206
Thank you so much Olive. I will give that a try now.

So just to clarify - I should past the separators part to all the columns I have, into their colour fields?

And the no repeat parte to the display tab of my directory column?

dynamic titles to the display tab of my filename column?

Sorry for the dumb questions and thanks again .

Foobar2000 format strings

Reply #1207
Yes... You could use globals|colours instead of pasting to all columns -)
Note that I correlated your use of %_directoryname% and %_filename% to the screenshot you posted, and then assumed your naming pattern to be artist - album\tracknumber - title.ext. That will only work in that case, but if you got other patterns we can still add some $and() -)

Edit: BTW the comments were there to locate the top frame, you must delete them (replace |//txt with | etc.)
F. ex.
ffffff||000000||||$if($and($not($strcmp($add(1,%_playlist_number%),2)),
$strcmp($substr(%_filename%,1,2),01)),0000FF,000000)||

Foobar2000 format strings

Reply #1208
Quote
Yes... You could use globals|colours instead of pasting to all columns -)
Note that I correlated your use of %_directoryname% and %_filename% to the screenshot you posted, and then assumed your naming pattern to be artist - album\tracknumber - title.ext. That will only work in that case, but if you got other patterns we can still add some $and() -)

Edit: BTW the comments were there to locate the top frame, you must delete them (replace |//txt with | etc.)
F. ex.
ffffff||000000||||$if($and($not($strcmp($add(1,%_playlist_number%),2)),
$strcmp($substr(%_filename%,1,2),01)),0000FF,000000)||
[a href="index.php?act=findpost&pid=270343"][{POST_SNAPBACK}][/a]


Holy %*$%*(! Thank you so much Olive. I took your streaming radio string and managed to figure out how to get it to work with my existing string. Now the name of a stream will show if I'm listening to radio, otherwise my normal string seems to work fine!

Going to play with your strings on removing redundant directories and adding dividers between different directories. I tried putting them in earlier today and it seems there are some things I need to fix.

Thank you again!

 

Foobar2000 format strings

Reply #1209
i know you all are going to hate me, but!  i've been checking out all these crazy designs you've all been making and wanted to know if there was a place you could point me to to learn all this string formatting. i know foobar comes with a semi-manual but is there a site i can go to that will explain all this.

Thanks

Foobar2000 format strings

Reply #1210
Quote
i know you all are going to hate me, but!  i've been checking out all these crazy designs you've all been making and wanted to know if there was a place you could point me to to learn all this string formatting. i know foobar comes with a semi-manual but is there a site i can go to that will explain all this.

Thanks
[a href="index.php?act=findpost&pid=272192"][{POST_SNAPBACK}][/a]


Sorry, I'm not aware of any resource like that. I learned string formatting by following this thread and hacking an early formatting string from Jan S that I liked, consulting the syntax help page that comes with Foobar (Prefs > Display > Title formatting > Help button). You can learn a lot by changing strings and seeing what happens.
That's so plausible, I can't believe it.

Foobar2000 format strings

Reply #1211
thats kinda what i figured.  okay im gonna do it the honorable way and RTFM!!!

Thanks for the reply

Foobar2000 format strings

Reply #1212
another question.  how would i view a .fcs i've downloaded to use as a template to play with?  i cant seem to find it anywhere in prefs.

Foobar2000 format strings

Reply #1213
Quote
another question.  how would i view a .fcs i've downloaded to use as a template to play with?  i cant seem to find it anywhere in prefs.
[a href="index.php?act=findpost&pid=272424"][{POST_SNAPBACK}][/a]


in columns_ui settings, in the "other" tab, click the "import" button and import the fcs file.  if you've already done some configuring of your own and you don't want to lose it, be sure to "export" your config to an fcs file so you can recover it later.

Foobar2000 format strings

Reply #1214
There's so many posts here. I could never try them all. Can someone recommend one excellent title formatting string?



Foobar2000 format strings

Reply #1217
Quote
I'm very sorry. I had a little error in "my" code that showed 10 gray dots when a song was unrated. This should be fixed with this string:

Code: [Select]
$if(%rating%,$repeat(000000|000000●,%rating%)$repeat(C0C0C0|C0C0C0●,$sub(5,%rating%)),C0C0C0|C0C0C0●●●●●)



Regards,
Moon
[a href="index.php?act=findpost&pid=262081"][{POST_SNAPBACK}][/a]


Hi Moon,
I get the rating showing up in the Track Info correctly, but all that shows in teh rating column in 5 grey circles...  What am I missing?

Thx.

Foobar2000 format strings

Reply #1218
This isn't very complex formatting, but I worked for quite a bit on both my systray strings, and my colour scheme

http://startrooper.free.fr/fb2k1.png
http://startrooper.free.fr/fb2k2.png

Code: [Select]
$padcut(:: ['['#%tracknumber%']'] [%album%],55)$char(13)$char(10)
$padcut(:: [$if($and(%va%,%performer%),%va% - %artist%,$if2(%va%,%artist%))],55)
[$char(13)$padcut(:: '('$if($or(%performer%,$not(%va%)),%performer%,%artist%)')',55)]$char(13)$char(10)
$padcut(:: [%title%],55)


which gives a popup :
:: [#01] Disque 1
:: Trésors du Cinéma - Richard Strauss
:: (Orchestre de Philadelphie)
:: Ainsi Parlait Zarathoustra

or, in less-tagged files,
:: [#09] The Cello Suites : Inspired by Bach (Disc 1)
:: Yo-Yo Ma
:: Suite No. 2, Courante

and it also truncates the titles, artists and disc names to prevent double-line entries.

Foobar2000 format strings

Reply #1219
how to align %_length% to right of playlist (without using ui columns)??


Foobar2000 format strings

Reply #1220
Quote
how to align %_length% to right of playlist (without using ui columns)??

[a href="index.php?act=findpost&pid=322488"][{POST_SNAPBACK}][/a]
$tab()%_length%  or $char(9)%_length%

Foobar2000 format strings

Reply #1221
Quote
ideas i'm playing with:
-check mark appears on left when track has been submitted to audioscrobbler
-playing track color fades from bright blue to white as track approaches end
-playcounts are brighter for more recently played tracks, and fade up to white from previous shade as track approaches 50%

-topdownjimmy from the gallery thread


Forgive my noobness, the little I do know about scripting can't even touch this. I'd owe you guys big if you could show me how to do these 3 things.

Foobar2000 format strings

Reply #1222
Okay, as I've been waiting for a reply here, I've been making attempts at coding this myself. After about 10 collective hours (I told you I was a newbie) I've managed to come close to getting my 2nd question figured out. "-playing track color fades from bright blue to white as track approaches end"

Here's the code I made, It's uber-sloppy and I can't think of any better solutions.

Code: [Select]
//**************************
//********** Countdown
//**************************
$puts(10_color,158E21|2177A5)
$puts(9_color,168420|2891C8)
$puts(8_color,177B20|3EA3D9)
$puts(7_color,17711F|4EAADC)
$puts(6_color,18681F|61B4E0)
$puts(5_color,195E1E|71BBE3)
$puts(4_color,1A541D|7BC0E6)
$puts(3_color,1B4B1D|86C6E8)
$puts(2_color,1B411C|96CDEB)
$puts(1_color,1C381C|A8D6EE)

//10

$if(%_isplaying%,$ifgreater(11,%_time_remaining_seconds%,$get(10_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',))
$if(%_isplaying%,$ifgreater(11,%_time_remaining_seconds%,$get(10_color)[$get(artist) - ],))
$if(%_isplaying%,$ifgreater(11,%_time_remaining_seconds%,$get(10_color)[$get(album) - ],))
$if(%_isplaying%,$ifgreater(11,%_time_remaining_seconds%,$get(10_color)[$get(title)]                           ,))
$if(%_isplaying%,$ifgreater(11,%_time_remaining_seconds%,%_time_remaining_seconds%,))

//If time remaining is greater than 10 seconds, show normal string.

$if(%_isplaying%,$ifgreater(%_time_remaining_seconds%,10,438B7C$num(%_playlist_number%,$len(%_playlist_total%)).' '[$get(artist) - ][$get(album) - ][A0EBE1$get(title)]                           ,))


Is there a function that I could use as an "equal to"? For example $function(%_time_remaining_seconds%,9)

Any help would be greatly appreciated.

Foobar2000 format strings

Reply #1223
Quote
Is there a function that I could use as an "equal to"? For example $function(%_time_remaining_seconds%,9)

Any help would be greatly appreciated.
[a href="index.php?act=findpost&pid=325002"][{POST_SNAPBACK}][/a]
$strcmp is a popular choice.  For example,
$strcmp($num(%_time_remaining_seconds%,2),09)

see titleformat_help.html in your foobar directory

Foobar2000 format strings

Reply #1224
Quote
Is there a function that I could use as an "equal to"? For example $function(%_time_remaining_seconds%,9)

Any help would be greatly appreciated.
[a href="index.php?act=findpost&pid=325002"][{POST_SNAPBACK}][/a]


I would use a select for this
Code: [Select]
$puts(10_color,158E21|2177A5)
$puts(9_color,168420|2891C8)
$puts(8_color,177B20|3EA3D9)
$puts(7_color,17711F|4EAADC)
$puts(6_color,18681F|61B4E0)
$puts(5_color,195E1E|71BBE3)
$puts(4_color,1A541D|7BC0E6)
$puts(3_color,1B4B1D|86C6E8)
$puts(2_color,1B411C|96CDEB)
$puts(1_color,1C381C|A8D6EE)

// this limits to 11 colors, the 10 count down ones, and the normal one
$select($min(%_time_remaining_seconds%,11),
$get(1_color) DISPLAY STUFF HERE,
$get(2_color) DISPLAY STUFF HERE,
$get(3_color) DISPLAY STUFF HERE,
$get(4_color) DISPLAY STUFF HERE,
$get(5_color) DISPLAY STUFF HERE,
$get(6_color) DISPLAY STUFF HERE,
$get(7_color) DISPLAY STUFF HERE,
$get(8_color) DISPLAY STUFF HERE,
$get(9_color) DISPLAY STUFF HERE,
$get(10_color) DISPLAY STUFF HERE,
DISPLAY NORMAL STUFF HERE)

although putting the same thing but changing the color 10 times is kind of redundant, I would maybe use another variable like curr_color, which would be set depending on the time left like above, and use that for all tracks.