HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: kjoonlee on 2002-12-16 16:01:57

Title: Foobar2000 format strings
Post by: kjoonlee on 2002-12-16 16:01:57
Thanks to the awesome TAGZ library, awesome stuff is possible. I can make song titles look the way I want.

This is what I want:
Quote
Title - Version foo
Artist / Title
Artist / Album Disc 2 11 / Title
Album Disc 2 11 / Artist 28 / Title - Version bar

automatic title formatting based on the amount of data available.


Which basically means I start with the following:
if (album is by various artists)
%album% [Disc %discnumber% ]%tracknumber% / %artist% / %title%[ - %version%]
else
[%artist% / ][%album%[ [Disc %discnumber% ]%tracknumber%] / ])%title%[ - %version%]

if (album name is longer than 20 characters)
$abbr(%album%,20) instead of just %album% and so on.

to pad tracknumbers with zeroes
$tracknumber%()

if artist differs from performer
$if2(%performer%,%artist%)

if title is unknown
if2(%title%,%_filename_ext%)

which ultimately gives me:
Quote
$pad_right(%_playlist_number%,4). $if(%various%,$abbr(%album%,20) [Disc %discnumber% ]$tracknumber%() / $if2(%performer%,%artist%) / ,[$if2(%performer%,%artist%) / ][$abbr(%album%,20)[ [Disc %discnumber% ]$tracknumber%()] / ])$if2(%title%,%_filename_ext%)[ - %version%][ - $num(%__bitrate%,3)kbps][   %_length%]


Tell me what you think, please. I'd love to see other people's strings too. : )

edit: updated string to work on recent versions of foobar2000, minor additions too.
Hey folks, use QUOTE instead of CODE for formatting strings, please. CODE can cause display problems for other people.

edit2: I've since switched to this:
Quote
$num(%_playlist_number%,$len(%_playlist_total%)). []
$if(%__replaygain_track_peak%,,$rgb(255,0,0))

$if(%various%,

%album% [Disc %discnumber% ]$tracknumber() / $if2(%performer%,%artist%) / ,

[$if2(%performer%,%artist%) / ][%album%[ [Disc %discnumber% ]$tracknumber()] / ])

$if2(%title%,%_filename_ext%)
[ - %version%]
$num($if2(%__bitrate_dynamic%,%__bitrate%),3)kbps]
[$tab()%_length%]
Title: Foobar2000 format strings
Post by: psyqil on 2003-01-23 23:59:53
Ok, I got mine ready thanks to some help from you people, and I´m sure, one of these days I´ll be able to toggle different formats with my number keys ;-)
I´m too lazy to put comments on the string, just copy/paste and try yourself, feed it a couple of folders and you´ll see!! My background is black and my selection bar is yellow.

Quote
$if(%title%,$padcut([$caps(%artist%)],35) $padcut(00FFFF$caps(%title%),40)D2D200$if(%bpm%,$cut(%bpm%,3)bpm/,$if(%__bitrate%,$cut(%__bitrate%,3)bps/,No Data!)),409FFF%filename%)$if(%tracknumber%,409FFF$num(%tracknumber%,2) of 00FFFF$caps(%album%),0000FF$caps(%album%)) [%date%] $if(%__replaygain_album_gain%,00FF00T %__replaygain_track_gain% A %__replaygain_album_gain%,0000FF$caps(%album%)5B91FF No ReplayGain! %comment%)
Title: Foobar2000 format strings
Post by: Dibrom on 2003-01-24 00:18:59
This is what I currently use.  Haven't had time to had l33t coloring or anything though..  (I'm hoping to see italics/bold/underline formatting sometime in the future )

Quote
$pad(%_playlist_number%, 4). [%artist% - ]$if($strcmp(%date%,-1),,%date% - )$if(%title%,['['%album%[ : <%album subtitle%>][ :: <%album description%>][ #[%disc%/]$num(%tracknumber%,2)]'] ']%title%[ / %track co-title%][ : <%track subtitle%>]$if(%piece subsection%, - Part #%piece subsection%,)[ :: <%track description%>],%_filename%)


I also think it would be cool if some sort of functionality would be added to the Tagz stuff to where you could even script conditional entries in the playlist.  For example, some of the cd's I have contain "subsongs" within a track, which are delineated by subindices.  Since Ape2 (yes, I use MPC almost exclusively for my audio library, although the idea could easily work with Vorbis comments) defines an "index" tag, it would be cool if you could script something in tagz to where it would scan the index tag, and per entry, you could add a new playlist item.

Say:

Code: [Select]
TRACKNUMBER=4
INDEX=1:00/2:00/3:00


on the playlist it could look like:

Code: [Select]
1 - Some Artist - Some Album - Some Track                          Some Total Length
2 - Some Artist - Some Album - Some Track                          Some Total Length
3 - Some Artist - Some Album - Some Track                          Some Total Length
4 - Some Artist - Some Album - Some Track                          Some Total Length
                        4.1 + Subsong 1          Subsong 1 Length/Some Total Length
                        4.2 + Subsong 2          Subsong 2 Length/Some Total Length
                        4.3 + Subsong 3          Subsong 3 Length/Some Total Length
5 - Some Artist - Some Album - Some Track                          Some Total Length


I think this sort of functionality could have all kinds of other potential uses as well.

At any rate, I think this Tagz stuff is great... definitely one of fb2k's killer features :B
Title: Foobar2000 format strings
Post by: Dibrom on 2003-01-24 00:22:52
Btw.. I edited the first 2 posts so that the display would wrap correctly

If you guys want to use a monospace font then just do a quote block but with [ font = courier ] (without spaces) inside the quote block, then end the font tag before closing the quote.  It makes it much more pleasant to read the thread when it wraps properly
Title: Foobar2000 format strings
Post by: ExUser on 2003-01-24 05:24:53
Quote
I also think it would be cool if some sort of functionality would be added to the Tagz stuff to where you could even script conditional entries in the playlist.  For example, some of the cd's I have contain "subsongs" within a track, which are delineated by subindices.  Since Ape2 (yes, I use MPC almost exclusively for my audio library, although the idea could easily work with Vorbis comments) defines an "index" tag, it would be cool if you could script something in tagz to where it would scan the index tag, and per entry, you could add a new playlist item.

Quote
808080$num(%_playlist_number%,4). $if(%title%,422DA8%artist%[ feat. 9E2DA8%featuring%][ <[%date% - ]A82D55%album%[ {A8612DDisc $num(%disc%,1)}][, #93A82D$num(%tracknumber%,2)]>]: 36A82D%title%[ '('2DA880%subtitle%')'][ '['2D74A8%version%']']$if(%__replaygain_album_gain%,,   0000FF!!NO ALBUM GAIN!!),%_filename%)


The scheme gives a nice, not-entirely-saturated rainbow color going from left to right. The specialized fields I used are 'featuring', for featured artists (I'll expand it to include other things, possibly, like 'presented by'), 'subtitle', for the bracketed part of a track title, and 'version' for the mix name for electronic stuff (like "[Maas Remix]") The other bit is that all the symbols that aren't part of the field are black, so you can see exactly where the fields begin and end.

On a side note, when ClearType is enabled and the Trebuchet MS Bold font is used, FB2K is not displaying the right side of some characters.

@Dibrom: When you add an index, does FB2K treat the different sections as subtracks the way it does with ZIPs? Or is this just a feature request?
Title: Foobar2000 format strings
Post by: _Shorty on 2003-01-24 06:01:05
$num(%_playlist_number%,2). [$padcut(%artist%,30) - ]$if(%title%,$padcut(%title%,40)808080 - [$padcut('['$if(%tracknumber%,Track[ #[%disc%/]$num(%tracknumber%,2) ],)from %album%'] ',45)] [- $padcut($if(%__replaygain_album_gain%,FF0080%__replaygain_album_gain%,A00000%__replaygain_track_gain%),19)800080 $num(%__bitrate%,3)kbps ][$num(%__samplerate%,5)Hz][ - %comment%],%filename%)
Title: Foobar2000 format strings
Post by: spase on 2003-01-24 06:31:13
here is my string (use Courier New or some other fixed width font):

Code: [Select]
$num(%_playlist_number%,4) 808080| $padcut($if(%artist%,%artist%,'Unknown Artist'),35) 808080| $padcut($if(%title%,%title%,%_filename%),55) 808080| $padcut($if(%tracknumber%,'('$num(%tracknumber%,2)') ',)$if(%album%,%album%,'Unknown Album'),40) 808080| $padcut([%genre%],15) 808080|


it looks something like this:

<link removed>

basically it does playist # (padded to 4 characters... for now), then %artist% (or "Unknown Artist"), then %title% (or filename), then %tracknumber%, or null, then %album% (or "Unknown Album"), then genre (or null)

personally i think this is good because i can resize the window to a fairly small size, and still have artist and title, or make the window bigger and see useful information...

also for this screenshot, here is the status bar:
Code: [Select]
[%artist% - ]$if(%title%,%title%,%_filename%)[ // [Track %tracknumber% ]on "%album%"]

and here is the title bar and system tray tooltip: (same thing)
Code: [Select]
[%artist% - ]$if(%title%,%title%,%_filename%)

they are pretty self explanatory... artist if it exists, then title, or filename if there is no title.

EDIT: changed "%filename%" to "%_filename%"
EDIT 2: added bit about using a fixed width font
Title: Foobar2000 format strings
Post by: krmathis on 2003-01-24 07:38:41
Here is my Playlist string:

Code: [Select]
$num(%_playlist_number%,3).   [%artist% - ]FF0000$if(%title%,['['%album%[ 0000FF#[%disc%/]$num(%tracknumber%,2)]'FF0000]  ']%title%,%_filename%)

Album in blue and Track number in red.
Still working with the strings, so maybe I get a few hints here.

B)
Title: Foobar2000 format strings
Post by: Dibrom on 2003-01-24 07:42:13
Quote
@Dibrom: When you add an index, does FB2K treat the different sections as subtracks the way it does with ZIPs? Or is this just a feature request?

I don't think it does anything with the index tag.. so yeah, it's a feature request, though I'm not requesting a feature based implicitly on the index tag, but moreso a generalized ability to script conditional playlist entries.  This could be used for many things really.. the index thing just happens to be one of them.
Title: Foobar2000 format strings
Post by: anza on 2003-01-24 12:37:42
Code: [Select]
$num(%_playlist_number%,4). 5B5B5B$padcut($if(%artist%,%artist%,),30) $padcut($if(%title%, - %title%,),55) $padcut($if(%album%, - 5B5B5B$abbr(%album%,45),),55) $if(%tracknumber%,- 5B5B5B$num(%tracknumber%,2),)


Playlist font: ProFontWindows Size 7,
Text color RGB: 219, 219, 219,
Background: black,
Selection color: RGB: 83, 83, 83

That's it. I like it

EDIT:
My new string:
Code: [Select]
$num(%_playlist_number%,4). 5B5B5B$padcut($if(%artist%,%artist%,),30) $padcut($if(%title%, - %title%,),55) $padcut($if(%album%, - 5B5B5B$abbr(%album% ,45),),55) $padcut($if(%album%,$if(%date%,- '('%date%')', ),),10) $if(%tracknumber%,- 5B5B5B$num(%tracknumber%,2),)
Title: Foobar2000 format strings
Post by: Supachikn on 2003-01-24 14:36:58
Code: [Select]
1E1ECA$num(%_playlist_number%,4)':' $if(%title%,DC0C35$padcut($if(%artist%,%artist%,),25) $if(%date%,0080FF -'['%date%']',) $padcut($if(%album%,- 5B5B5B%album%,),45) $if(%tracknumber%,0000FF- $num(%tracknumber%,2) ,)$padcut($if(%title%,0000FF- %title%,),55),$padcut(808080%_filename%,100)BF408F'-NO TAGS FOUND!')


The code is a bit messy, due to my tweaking, but it gets the job done.
Title: Foobar2000 format strings
Post by: khostri on 2003-01-24 15:47:10
Tweaked and changed code samples from this topic to fit my needs.
Thank you all I used code from

Code: [Select]
1E1ECA$num(%_playlist_number%,4)':' $if(%title%,DC0C35$padcut($if(%artist%,%artist%,),25) $if(%tracknumber%,$padcut(0000FF- $num(%tracknumber%,2) ,14),-   ) $padcut($if(%title%,0000FF- %title%,),50) $if(%date%,$padcut(0080FF -'['%date%']',18), -'[    ]') $if(%album%,$padcut(- 5B5B5B%album%,45),$padcut('-   ',35)), $padcut(808080%_filename%BF408F,85)'NO TAGS FOUND!')$if(%__replaygain_album_gain%,$padcut(FF0080%__replaygain_album_gain%,21),$padcut(A00000%__replaygain_track_gain%,21))$if(%comment%,%comment%,)


EDIT:

Link to Screenshot (http://www.cadcentrum.cz/images/f2k.png)
Title: Foobar2000 format strings
Post by: fileman on 2003-01-24 17:01:20
I like it simple...:

Quote
$num(%_playlist_number%,4). [%artist% - ] %title%[    / %album%][ '('$num(%tracknumber%,2)')']


Screenshot (http://mitglied.tripod.de/fileman5/Zwischenablage02.gif)

Regards, fileman.
Title: Foobar2000 format strings
Post by: Volcano on 2003-01-24 17:07:34
<rant>This thread is bloody hard to read, are the forum's markup facilities that hard to understand?</rant>

I seldom use foobar, but I found the default display schemes too confusing even for occasional use.

In the playlist, I just like to have artist and title because anything else wouldn't make sense when I have my whole collection (which doesn't only consist of complete albums) loaded.

Playlist:
Code: [Select]
%_playlist_number%. [%artist% - ]$if(%title%,%title%,%_filename%)



System tray tooltip:
Code: [Select]
[%artist% - ]$if(%title%,%title%,%_filename%)



File info display: default


Status bar (this one's really good IMHO):
Code: [Select]
$if(%title%,$if(%artist%,%artist%,No Artist)  |  %title%
                   $if(%tracknumber%,Track $num(%tracknumber%,2),-)
 |  $if(%album%,%album%,No Album)  |  $if(%date%,%date%,No Date),
%filename%)



Window title:
Code: [Select]
[%artist% - ]$if(%title%,%title%,%filename%)     '['%_foobar2000_version%']'


This (http://free.pages.at/volcano/temp/foobar_schemes.png) is what it looks like.

Sorry for the line breaks in the [CODE ] elements, but that was the only way to preserve all the whitespace (it gets stripped out when put inside a [QUOTE ] or the normal post area).

[span style='font-size:8pt;line-height:100%'][EDIT][/span] Wow spase, you've just given me a great idea. I had never thought about mimicking columns like that, that of course would be the optimal solution!  [span style='font-size:8pt;line-height:100%'][/EDIT][/span]
Title: Foobar2000 format strings
Post by: spase on 2003-01-24 19:48:31
Quote
Wow spase, you've just given me a great idea. I had never thought about mimicking columns like that, that of course would be the optimal solution!

glad i could help  :-)
Title: Foobar2000 format strings
Post by: Sachankara on 2003-01-24 19:48:44
Foobar2000 really needs a new script language with support for variables. It's a pain of in the ass to make "dynamic format strings" with the current script language. Just look at the complexity of the script code needed for determining if an artist/song/album should use %original-language-xxx% or just %xxx% :
Quote
$num(%_playlist_number%,3). $if(%original-language-artist%,%original-language-artist% - $if(%original-language-album%,'['%original-language-album%$if(%tracknumber%, #%tracknumber%'] ',),$if(%album%,'['%album%$if(%tracknumber%, #%tracknumber%'] ',),))$if(%original-language-title%,%original-language-title%,$if(%title%,%title%,)),$if(%artist%,%artist% - $if(%original-language-album%,'['%original-language-album%$if(%tracknumber%, #%tracknumber%'] ',),$if(%album%,'['%album%$if(%tracknumber%, #%tracknumber%'] ',),))$if(%original-language-title%,%original-language-title%,$if(%title%,%title%,)),%_filename%))
Title: Foobar2000 format strings
Post by: Volcano on 2003-01-24 20:19:32
Gee, this is great! This made me realise how good foobar2000 actually is, I'm really starting to like it now.

I think this (http://free.pages.at/volcano/temp/foobar_schemes2.png) is much improved compared to the minimalist scheme I posted above (because, as spase pointed out, it can just be turned into an ordinary "Artist - Title" display if you resize the window).

Scheme used:
Code: [Select]
$padcut(%_playlist_number%,4) C0C0C0| $padcut($if(%artist%,
%artist%,Unknown Artist),34) C0C0C0| $padcut($if(%title%,%title%,
%filename%),54) C0C0C0| $padcut([%album%],44) C0C0C0| $padcut
([%date%],4) C0C0C0|


Thanks again for the "inspiration".


The only thing I miss is a function that displays the values passed to it only if *all* of them exist, not just one (which [] does), badly tagged or tagless files could be handled better then.
Title: Foobar2000 format strings
Post by: Artemis3 on 2003-01-24 22:54:51
I leave the thing the way it is... "factory" default.
Title: Foobar2000 format strings
Post by: Rizban76 on 2003-01-25 02:38:07
Quote
If you guys want to use a monospace font then just do a quote block but with [ font = courier ] (without spaces) inside the quote block, then end the font tag before closing the quote.


I tried the above to make my playlist number only in courier. How could you do this with the below string?

$num(%_playlist_number%,2).  $if(%artist%,%artist% - %title%,%_filename%)
Title: Foobar2000 format strings
Post by: Supachikn on 2003-01-25 05:06:44
He was talking about forum functions, not foobar2000
Title: Foobar2000 format strings
Post by: evereux on 2003-01-26 19:40:28
This thread is excellent, thanks for the many idea's.

But! 

Looking at Spase's screenshot I see all the column's are lined up, justified to the left. When I cut and paste the string into my Foobar, only the first two column's are .. what am I missing?
Title: Foobar2000 format strings
Post by: Volcano on 2003-01-27 12:34:57
You've got to use a fixed-width font such as Lucida Console or Courier New for it to work properly.
Title: Foobar2000 format strings
Post by: evereux on 2003-01-27 20:09:56
Ofcourse. D'oh!

Thanks.
Title: Foobar2000 format strings
Post by: musicmusic on 2003-01-27 20:24:00
Well, for what its worth, I only use a simple %artist% - %title% for the playlist. But for the status bar I use

Code: [Select]
| [Album: %Album% | ][Track: $num(%Tracknumber%,2) | ][Year: %date% | ][Genre: %genre% | ][Gain: $cut(%__replaygain_track_gain%,4)dB | ]


I like it because the separators make it clear, and they're only displayed if they're available.
Title: Foobar2000 format strings
Post by: SK1 on 2003-01-27 22:28:07
This page is really wide because of some [code]s, better put long code in
Quote
maybe everybody .
Anyway, useful thread!
Title: Foobar2000 format strings
Post by: bigahoona on 2003-01-27 23:20:26
Quote
This page is really wide

:angry: ..... it seems that you (SK1) have a serious problem,  I suggest that you visit you psychiatrist before posting a link to porn  :angry:

Edit: Please don't make links to that.  While this may not be the HA forum and the rules are more lax here, this doesn't give you license to link to anything you want.  That link was not appropriate for the forum, and had nothing to do with HA or Foobar2000. Remember what we were talking about on IRC... --TrN
Title: Foobar2000 format strings
Post by: mafe on 2003-01-27 23:23:45
Quote
$num(%_playlist_number%,4). $if(%__replaygain_album_gain%,0000FF*,) $if(%artist%,%artist%,'Unknown Artist') - $if(%album%,%album%,'Unknown Album') - $if(%tracknumber%,'['$num(%tracknumber%,2)'] ',)$if(%title%,%title%,%_filename%)


http://www.bonustrack.net/images/foros/foobar.png (http://www.bonustrack.net/images/foros/foobar.png)

If the Track have replaygain album i show the * if not i dont show anything.

sorry my english
Title: Foobar2000 format strings
Post by: SK1 on 2003-01-27 23:49:10
Sure thing.
bigahoona, remember to read the warning on pages first  they do have a warning.
Title: Foobar2000 format strings
Post by: bigahoona on 2003-01-28 00:48:49
Quote
bigahoona, remember to read the warning on pages first  they do have a warning.

I suppose you find yourself very funny……….. your link hasn’t any kind of warning….
so, visit porn if you like but stop bother others with this crap 
that’s all I have to say
Title: Foobar2000 format strings
Post by: Rommel on 2003-01-28 01:55:29
here is my string:

Playlist:
Code: [Select]
$num(%_playlist_number%,3).  $if(%artist%,$if(%title%,%artist%[ - '['%date% - %album% - $if(%tracknumber%,#$num(%tracknumber%,2),?)']'] - %title%,NO TAG - "%filename%"),NO TAG - "%filename%")


System tray tooltip:
Code: [Select]
$if(%artist%,$if(%title%,%artist% - %title%,NO TAG - "%filename%"),NO TAG - "%filename%")


Status bar:
Code: [Select]
[%comment%]


Window title:
Code: [Select]
"%filename%"
Title: Foobar2000 format strings
Post by: SK1 on 2003-01-28 14:01:15
Quote
Quote
bigahoona, remember to read the warning on pages first  they do have a warning.

I suppose you find yourself very funny……….. your link hasn’t any kind of warning….
so, visit porn if you like but stop bother others with this crap 
that’s all I have to say

I'm extremely sorry this has offended you. It was meant as a joke. And that page does have a warning, you can check it out again if you missed it, it's in big letters on top of the page.
By the way, here's the definition of porn by babylon.com:
n. literature or pictures describing sexual acts and intended to cause sexual arousal (Slang)
adj. pornographic, showing or describing sexual acts and intended to cause sexual arousal (Slang)
That page shows no -sexual- act, and definately causes no sexual arousal. So it definately isn't porn.
Anyway, sorry for any discomfort this has caused you, i will not make such jokes again .
Title: Foobar2000 format strings
Post by: LightYears on 2003-01-28 18:28:39
playlist:
Code: [Select]
0000FF$num(%_playlist_number%,3)':'FF0000
$padcut($caps([%artist%]),20)-008000
$padcut($caps([%album%]),30)-808000
$num([%tracknumber%],2)-000080
$caps([%title%])

which looks like this:

(http://mp3cdbrowser.sourceforge.net/foobar.png)
Title: Foobar2000 format strings
Post by: retch on 2003-01-30 08:09:47
Just some colours that i'm used to looking at (from mutt, irssi...).  I didn't bother with conditional operators, it's ugly enough as it is.

I've got the fields displayed in this order so I can sort by display name.

Code: [Select]
808080'['00FFFF%artist%808080','808040 %date% 808080-FFFF00 %album%808080']'FFFFFF $num(%tracknumber%,2)808080.FFFFFF %title%


font: franklyn gothic medium
playlist text colour: white
playlist background colour: black
playlist selection colour: grey or white

(http://flag.blackened.net/~retch/images/fb2k.png)
Title: Foobar2000 format strings
Post by: musicmusic on 2003-01-30 16:59:24
mafe: what font are you using?
Title: Foobar2000 format strings
Post by: mafe on 2003-01-30 18:17:15
Quote
mafe: what font are you using?

Everson Mono Latin

http://www.dafont.com/en/search.php?nq=1&q...Latin&Submit=Go (http://www.dafont.com/en/search.php?nq=1&q=Everson+Mono+Latin&Submit=Go)
Title: Foobar2000 format strings
Post by: musicmusic on 2003-01-30 18:24:25
Thanks.. 
Title: Foobar2000 format strings
Post by: voltron on 2003-01-30 20:39:41
I always tell others about how simple I like my Foobar2000, maybe now I can show you:
(http://home.attbi.com/~voltron/fb2k.gif)

The strings are all default except for the following two:

File info Display:
Code: [Select]
[%__bitrate%]/$cut([%__samplerate%],2)

Window title:
Code: [Select]
[%artist% - ]$if(%title%,['['%album%[ #[%disc%/]$num(%tracknumber%,2)]'] ']%title%,%_filename%)

voltron
Title: Foobar2000 format strings
Post by: musicmusic on 2003-01-30 23:54:15
I don't know if anyone else has, but I also realised today you can get a proper line separating those column things with this character (instead of "|" ):

Code: [Select]


It won't look right in title formatting but will when displayed.

edit: i can't get the forum to display it properly, but you can get it from ms word 2002, press 2502 followed by Alt+X. Or you could hold Alt and press 9474, but it will only work in word it seems. Then copy&paste to foobar title formatting.
Title: Foobar2000 format strings
Post by: andrep on 2003-01-31 00:12:39
Cheers Musicmusic, you've helped once again!!

I had been trying to remember my old Alt+ascii codes from my years ago BASIC programming days when a working knowledge of such codes was required info for creating title screens and menu boxes etc., but they didn't seem to work in the modern game.... the old 9474 cut/paste however has sharpened up my foobar playlistage considerably,
Title: Foobar2000 format strings
Post by: ak on 2003-01-31 00:18:05
Yep, few potential delimiters can be found in 'character map' for any particular font.
For 'courier new' it could be: ░ or ║ or ╬ as well.
Title: Foobar2000 format strings
Post by: andrep on 2003-01-31 00:29:53
9553 is the business. My ignorance astounds, I assumed that the character map was left for dead with Win98, and its been there all the time (in XP) in my accessories/system tools folder,

cheers,
Title: Foobar2000 format strings
Post by: Lefungus on 2003-01-31 11:38:08
Inspired by your work :

Code: [Select]
808080$if(%tracknumber%,#$num(%tracknumber%,2),#??) 
808040$if(%album%,%album% ,):
000080$if(%artist%,%artist%,'Unknown Artist')000000 -
008000$if(%title%,%title%,%_filename%)


Noob question : where can i find associated code for colors ?
Title: Foobar2000 format strings
Post by: Ghim on 2003-01-31 12:06:55
You can find colors code just in the same window where you format your strings...
just in the bottom of the windows, there's a color code generator...
Title: Foobar2000 format strings
Post by: musicmusic on 2003-01-31 16:51:58
Quote
My ignorance astounds, I assumed that the character map was left for dead with Win98, and its been there all the time (in XP) in my accessories/system tools folder

i did not even notice that either.. well word does the same thing anyway
Title: Foobar2000 format strings
Post by: RIV@NVX on 2003-02-04 10:43:49
This is my setup - it is very similar to default, and I use these colors because they are one inverted to other:
Code: [Select]
0080FF$num(%_playlist_number%,3).FF8000 [%artist%808080 - ]$if(%title%,['['0080FF%album%[ #[%disc%/]$num(%tracknumber%,2)]'808080] ']FF8000%title%,%_filename%)

Font: Tahoma; Playlist text color: 808080
Title: Foobar2000 format strings
Post by: RIV@NVX on 2003-02-07 10:11:24
Code: [Select]
0080FF$num(%_playlist_number%,3). FF8000[%artist% 808080- ]$if(%title%,['['0080FF%album%[ #[%disc%/]$num(%tracknumber%,2)]'808080] ']FF8000%title%,%_filename_ext%)[    %_length%]


This is updated for 0.5 b14 which handles it a bit different.
Title: Foobar2000 format strings
Post by: anza on 2003-02-07 12:40:50
Updated strings for b14, try this!

PL:
Code: [Select]
$num(%_playlist_number%,4). $if(%__replaygain_track_gain%,DBDBDB|CCCCCC·,0000FF|0000FF·) 5B5B5B|CCCCCC$padcut([%artist%],30) DBDBDB|CCCCCC$padcut([- %title%],55)    $padcut([8B8B8B|CCCCCC%_length%],20) DBDBDB|CCCCCC |$if(%album%, 8B8B8B|CCCCCC$if2('['%date%']',      ),) $padcut([5B5B5B|CCCCCC $cut(%album%,35)],56)[ 8B8B8B|CCCCCC#$num(%tracknumber%,2)]


Status bar:
Code: [Select]
| [Album: $cut(%album%,26) | ][Track: $num(%Tracknumber%,2) | ][Length: %_length% | ][Year: %date% | ][Genre: %genre% | ]


Window title:
Code: [Select]
[%artist% - ]$if(%title%,['['%album%[ [%disc%/]#$num(%tracknumber%,2)]'] ']%title%,%_filename%) '['[TG: %__replaygain_track_gain%][/AG: %__replaygain_album_gain%]']'


Thanks to them from whom I took some ideas.
Title: Foobar2000 format strings
Post by: musicmusic on 2003-02-07 14:59:05
Hey, I guess you took ideas from my status bar for yours then

Anyway, I've got a new string (b14) now (im guessing the forum will mess up some of the characters):

playlist
Code: [Select]
CACACA|3A3A3A$padcut([%artist%],20) 7F7F7F│CACACA|3A3A3A $padcut([%title%],71) 7F7F7F│CACACA|3A3A3A $padcut([%album%],19) 7F7F7F│ $padcut([%date%],4) 7F7F7F│CACACA|3A3A3A $padcut([%genre%],10) 7F7F7F│CACACA|3A3A3A $padcut([%__replaygain_track_gain%],7) 7F7F7F│CACACA|3A3A3A $padcut([%__bitrate%kbps],7) 7F7F7F│CACACA|3A3A3A $padcut([$ifgreater(%__channels%,2,==,$ifgreater(%__channels%,1,--,-))],2) 7F7F7F│CACACA|3A3A3A[    %_length%]


tooltip, window title,
Code: [Select]
%artist% - %title%


file info
Code: [Select]
[%__bitrate%kbps ][%__samplerate%Hz ]$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)[%__extrainfo% ][$ext(%_filename_ext%)]


statusbar
Code: [Select]
| [Track: $num(%Tracknumber%,2) | ][Year: %date% | ][Genre: %genre% | ][Gain: $cut(%__replaygain_track_gain%,5)dB | ]


Playlist font: Monofur point 8

Playlist text colour: 202,202,202

Pl background: 55,56,65

selection: 148,149,163

item frame: 205,205,205


The idea behind the playlist string is when foobar is in normal size (not maximised) it will display artist, title, album, length. but when its maximised it will display everything else, i find it very useful!

edit: where thers a &#9474 it needs replacig as describe earlier in this thread
Title: Foobar2000 format strings
Post by: Ghim on 2003-02-07 16:58:44
I myself got a little title formatting...
(It's the basic one + some colours and less controls because I always check my music tags so there won't be any error...)


Code: [Select]
$if(%_isplaying%,800000|800000$num(%_playlist_number%,4). %artist% - '['%album% #$num(%tracknumber%,2)'] '%title%,000000|000000$num(%_playlist_number%,4). %artist% - '['%album% #$num(%tracknumber%,2)'] '%title%)[    000000|000000%_length%]


As you can see, that's a very simple but usefull title formatting for the playlist... 

I've also modified the system tray a little :
Code: [Select]
%artist% - %title%


Just try it !

it uses both selected item colors and playing item colors...

I use 216 - 217 - 222 for playlist selection color...
Title: Foobar2000 format strings
Post by: Skates on 2003-02-08 21:15:37
Ok I just love the basic scripts, so here's what I created to suit my needs!

Code: [Select]
$num(%_playlist_number%,4) 808080| $padcut($if(%artist%,%artist%,'Unknown Artist'),60) 808080| $padcut($if(%title%,%title%,%_filename%),76) 808080|  %_length%


Let me know if anything is screwed up with it on other systems, also is their a way to right justify the track length tag?

Also is their a way to set the number of character padding, by using the window size of foobar? Then I could modify it to look the same on all systems!
Title: Foobar2000 format strings
Post by: musicmusic on 2003-02-08 22:43:05
put a tab in front of the length tag and put it at the end of your string, and it will always be on the right side of the playlist.

copy + paste this and replace yours with it:

Code: [Select]
[    %_length%]


edit: your talking about the 0.5 beta, right?
Title: Foobar2000 format strings
Post by: Skates on 2003-02-09 00:04:05
Yeah I am! Beta 16 to be exact, shit to bad there isn't like a window size command, so you know how many characters wide the playlist is, then you can create a script with some math formulas that would auto resize itself dependeding on the size of the window!
Title: Foobar2000 format strings
Post by: musicmusic on 2003-02-09 00:36:32
What would be better is to make parts take of a certain % of the playlist, that would then invlove allowing you to split the string into sections though, which would really be like virtual columns.

Anyway, copying and pasting that won't work because the forums don't seem to like tabs, its been replaced with a space. Since you can't press tab in the title formatting either, you'd have to do it in Notepad and copy + paste.
Title: Foobar2000 format strings
Post by: smok3 on 2003-02-10 01:13:42
Quote
Since you can't press tab in the title formatting either, you'd have to do it in Notepad and copy + paste.
ctrl + tab will/should work.
-------------------

my playlist (http://smokeamiga.virtualave.net/foobar05b16.gif) for 0.5 beta 16:

$if(%_isplaying%,aa0000,5B5B5B)$padcut($if(%tracknumber%,%title% ,%_filename_ext% ),30) $if(%tracknumber%,5B5B5B$num(%tracknumber%,2),)$padcut($if(%artist%, - %artist%,),15) $if(%album%, - 5B5B5B/%album%/ ,)      *replaceme*    %_length%

where *replaceme* = ctrl + tab.
Title: Foobar2000 format strings
Post by: musicmusic on 2003-02-10 17:07:06
Quote
ctrl + tab will/should work.

thanks, that's quite useful 
Title: Foobar2000 format strings
Post by: mafe on 2003-02-27 20:38:09
Playlist String

Quote
$ifgreater(%_isplaying%,0,00FFFF$num(%_playlist_number%,4). $if(%__replaygain_album_gain%,*,) $if(%artist%,%artist%,'Unknown Artist') - $if(%album%,%album%,'Unknown Album') - $if(%tracknumber%,'['$num(%tracknumber%,2)'] ',)- $if(%title%,%title%,%_filename%)[<TAB>%_length%],$num(%_playlist_number%,4). $if(%__replaygain_album_gain%,0000FF*,) $ifgreater($strstr($ext(%_filename_ext%),mpc),0,C4FFFF$if(%artist%,%artist%,'Unknown Artist') - $if(%album%,%album%,'Unknown Album') - $if(%tracknumber%,'['$num(%tracknumber%,2)'] ',)- $if(%title%,%title%,%_filename%),FFFFFF$if(%artist%,%artist%,'Unknown Artist') - $if(%album%,%album%,'Unknown Album') - $if(%tracknumber%,'['$num(%tracknumber%,2)'] ',)- $if(%title%,%title%,%_filename%))[<TAB>%_length%])


New format string....  detecting file format and showing mpc in different color.... detecting  playing song, detecting replaygain, etc.

Sort By... String

Quote
%ARTIST% - %ALBUM% - %_PATH% - $num(%TRACKNUMBER%,3)


http://www.bonustrack.net/images/foros/foobar-new.png (http://www.bonustrack.net/images/foros/foobar-new.png)

Font: Everson Mono Latin ( http://www.dafont.com/en/search.php?nq=1&q...Latin&Submit=Go (http://www.dafont.com/en/search.php?nq=1&q=Everson+Mono+Latin&Submit=Go) )
Size: 8

Foobar Version: 0.53

sorry my english
Title: Foobar2000 format strings
Post by: musicmusic on 2003-02-27 22:15:41
changed mine too, gave up with fixed-width fonts, now using trebuchet ms point 7 and pl string is:

Code: [Select]
c47F5e|ffAA80$ifgreater($len(%artist%),20,$cut(%artist%,18)..,%artist%) • $ifgreater($len(%title%),55,$cut(%title%,53)..,%title%)<TAB>c47F5e|ffAA80[$ifgreater($len(%album%),30,$cut(%album%,28)..,%album%)]


takes advantage of $len to use ".." if string too long, and title / artist and album is still clearly separated and it looks better too. replace <tab> with tab. prolly wont look right wid wrong bg colour.
Title: Foobar2000 format strings
Post by: Bushwack on 2003-02-28 01:27:25
Quote
$puts(BYTE_RATE_COLOUR,$hex($puts(MIN_BYTE_RATE,96)$puts(MEAN_BYTE_RATE,192)$puts(MAX_BYTE_RATE,256)$ifgreater(%__bitrate%,$get(MAX_BYTE_RATE),32768,$ifgreater(%__bitrate%,$get(MEAN_BYTE_RATE),$sub(32896,$div($mul($sub(%__bitrate%,$get(MEAN_BYTE_RATE)),127),$sub($get(MAX_BYTE_RATE),$get(MEAN_BYTE_RATE)))),$ifgreater(%__bitrate%,$get(MIN_BYTE_RATE),$add(128,$mul($div($mul($sub(%__bitrate%,$get(MIN_BYTE_RATE)),127),$sub($get(MEAN_BYTE_RATE),$get(MIN_BYTE_RATE))),256)),128))),6))$get(BYTE_RATE_COLOUR)|$get(BYTE_RATE_COLOUR)$num(%_playlist_number%,3)$if(%__replaygain_album_gain%,000000'.',$if(%__replaygain_track_gain%,808080'.', )) $if(%_isplaying%,600060,202020)$padcut($caps2($if2(%artist%,$ifgreater($left(%_filename%,2),0,$if($strcmp($strchr(%_directoryname%,-),0),%_filename%,$cut(%_directoryname%,$sub($strchr(%_directoryname%,-),1))),$if($strcmp($strchr(%_filename%,-),0),%_filename%,$cut(%_filename%,$sub($strchr(%_filename%,-),1)))))),30) $if(%_isplaying%,4000B0,000060)$padcut($caps2($if2(%title%,$if($strcmp($strrchr(%_filename%,-),0),Unknown Title,$substr(%_filename%,$add(1,$strrchr(%_filename%,-)),$len(%_filename%))))),35) $if(%_isplaying%,208080,808040)$if(%tracknumber%,$num(%tracknumber%,2),$ifgreater($left(%_filename%,2),0,$num($cut(%_filename%,2),2),$ifgreater($cut($replace($substr(%_filename%,$add(1,$strchr(%_filename%,-)),$len(%_filename%)), ,),2),0,$num($cut($replace($substr(%_filename%,$add(1,$strchr(%_filename%,-)),$len(%_filename%)), ,),2),2),--))) $if(%_isplaying%,808000,004000)$puts(ALBUM,$pad($left($caps2($if2(%album%,$substr(%_directoryname%,$add(1,$strchr(%_directoryname%,-)),$len(%_directoryname%)))),$if(%date%,31,38))$if(%date%,' (',)$if(%_isplaying%,208080,808040)[%date%]$if(%date%,')',),50))$if($strcmp($cut($get(ALBUM),1), ),$substr($get(ALBUM),2,$len($get(ALBUM))),$get(ALBUM))[   $if(%_isplaying%,0000A0,)%_length% ]


All right it looks a little long and scary, but most of it is just guessing the artist, album, etc.. if the tag is missing.

The interesting part of this is the first part which defines a colour: $get(BYTE_RATE_COLOUR) which is continuously dependent on bitrate.
By changing the values of the *_BYTE_RATE variable you can adjust the scale to reflect your own prefference/file formats.
Also with a little work you should be able to shift the colours to the bright half of the spectum (for a dark background) or use the full spectum.

Looks best with a fixed-width font on a white background.

PS Has anyone been able to figure out a way to do recursion? I've come close a few times, but no luck yet.

EDIT: Screen Shot (http://www3.telus.net/abush2/playlist.png) anyone?
Title: Foobar2000 format strings
Post by: Samweis on 2003-02-28 13:14:46
Here we go... here's my string...

Code: [Select]
$num(%_playlist_number%,4) 000000$if(%artist%,[$pad($cut(%artist%,25), 25) $pad($cut(%title%,40), 40) 808080$pad($cut(%album% ,35), 35) $if(%tracknumber%,C0C0C0#$num(%tracknumber%,2),'   ') 0080FF$pad_right(%_length%,5)],0000FFNOT TAGGED: "%_filename%_%_filename_ext%")


Playlist font: Andale Mono (8)
Playlist text color: #808080
Playlist background color: #E6ECEE
Playlist selection color: #C0C0C0
Selected item frame: #808080

(Screenshot (http://chopped.and.pained.net/foobar.png))
Title: Foobar2000 format strings
Post by: xamphear on 2003-03-02 00:53:54
Quote
Here we go... here's my string...
(Screenshot (http://chopped.and.pained.net/foobar.png))

First off: How'd you get that UI with the buttons and seekbar? Is there a plugin somewhere I'm missing out on?

And, here's my settings, which are meant to mimmic a program called "puTTY" which is an ssh shell for windows.
Code: [Select]
[$padcut(%artist%,20)] - [FF5555$padcut(%_directoryname%,20)] - [%title%][  - 00FF00%_length%]
Title: Foobar2000 format strings
Post by: ChS on 2003-03-02 01:27:21
Code: [Select]
625122$num(%_playlist_number%,4) ' | ' $if(%title%,000000$padcut($if(%artist%,%artist%,),21)
 $if(%tracknumber%,$padcut(5C4736| $num(%tracknumber%,2) ,14),-   )
$padcut($if(%title%,5C4736| 9B5E3C%title%,),50) $if(%date%,$padcut(58513A
'['%date%']',18), '[    ]' ) $if(%album%,$padcut(5B5B5B$abbr(%album%,20),30),
$padcut('-   ',50)), $padcut(808080%_filename%BF408F,85)'NO TAGS FOUND!')  
$if(%comment%,%comment%,)[    %_length%]



Font: ProFont

screenshot (http://www.apehaus.com/ss/foo1.png)
Title: Foobar2000 format strings
Post by: anza on 2003-03-02 08:37:31
Changed my foobar to more minimal style, like it better that way:

Code: [Select]
Playlist:
DBDBDB|CCCCCC$num(%_playlist_number%,4).$if(%mp3%,0000FF|0000FF,DBDBDB|CCCCCC)·$if(%__replaygain_track_gain%,DBDBDB|CCCCCC,0000FF|0000FF)· $if(%_isplaying%,0000FF|0000FF» ,)[535353|535353$abbr($if2(%performer%,%artist%),20) DBDBDB|DBDBDB- %title%] ['['%comment%']'] [    535353|535353%_length%]


NOTE: 1) I've got a %mp3% tag in every mp3PRO I have
2) I have a %performer% tag in every song from Various Artists' CD which indicates the performer, the %artist% tag in these songs is "Various Artists". With this kind of setup, I can have the Album list work well, as the Various Artists CDs don't mess it up.

Playlist font: ProFont (7)
Playlist text color: 219, 219, 219
Playlist background color: 0, 0, 0
Playlist selection color: 20, 20, 20
Selected item frame: 50, 50, 50

ScreenShot (http://koti.mbnet.fi/antsau/fb_small.jpg)
Title: Foobar2000 format strings
Post by: Bamral on 2003-03-02 14:46:50
Code: [Select]
$if(%__replaygain_track_gain%,,0000FF'RG(0)')$if(%artist%,$pad(00FF00%artist%,$if(%__replaygain_track_gain%,38,33))$pad(800080'['$num(%tracknumber%,2)']  ',4)$pad(00FFFF%title%,42)A00000'['$if(%date%,%date%']',    ']')'   '408000%album%,$if(%tracknumber%,0000FF'CD TRACK  ['%tracknumber%']' ,$if(%__bitrate%,0000FF%_filename% '(No Tags)',0000FF'DEAD STREAM or UNINSERTED CD')))


Using at 800x600 res. Backround Black...Courier New is the font

Any non-replaygained track is listed as RG(0)

Simple setup...but works for me

Screenshot:
http://home.attbi.com/~billamral/2.PNG (http://home.attbi.com/~billamral/2.PNG)
Title: Foobar2000 format strings
Post by: DrDS on 2003-03-03 13:07:08
Code: [Select]
$if(%_isplaying%,FFFFFF$padcut($num(%_playlist_number%,4),4)$padcut(' ][ ',4)$padcut([%artist%],35)$padcut(' ][ ',4)$padcut([%album%],35)$padcut(' ][ ',4)$if(%tracknumber%,$padcut(-$num(%tracknumber%,2)-,5),'     ')$padcut($if(%title%,%title%,%_filename_ext%),45)$padcut(' ][ ',4)$pad(%__bitrate%kbps,7)$padcut(' ][ ',4) %_length%,FF8000|000000$padcut($num(%_playlist_number%,4),4)0080FF|000000$padcut(' ][ ',4)FF8000|000000$padcut([%artist%],35)0080FF|000000$padcut(' ][ ',4)FF8000|000000$padcut([%album%],35)0080FF|000000$padcut(' ][ ',4)FFCD9B|000000$if(%tracknumber%,$padcut(-$num(%tracknumber%,2)-,5),'     ')$padcut($if(%title%,%title%,%_filename_ext%),45)0080FF|000000$padcut(' ][ ',4)FF8000|000000$pad(%__bitrate%kbps,7)0080FF|000000$padcut(' ][ ',4)FF8000|000000[ %_length%])


Screenshot(1280x1024):

http://drds.free.fr/piti/foo4.JPG (http://drds.free.fr/piti/foo4.JPG)
Title: Foobar2000 format strings
Post by: Bamral on 2003-03-03 17:37:54
If anyone is interested ...an extended help section for tagz formatting:

http://home.attbi.com/~billamral/TAGZ.TXT (http://home.attbi.com/~billamral/TAGZ.TXT)
Title: Foobar2000 format strings
Post by: impulse3k on 2003-03-03 18:07:55
I also want to know how you got the UI to have the buttons and seekbar. Thanks in advance
Title: Foobar2000 format strings
Post by: Speek on 2003-03-03 18:37:33
Quote
If anyone is interested ...an extended help section for tagz formatting:

http://home.attbi.com/~billamral/TAGZ.TXT (http://home.attbi.com/~billamral/TAGZ.TXT)

Thanks Bamral, that's just what I needed!
Title: Foobar2000 format strings
Post by: musicmusic on 2003-03-03 18:49:56
Quote
$puts(BYTE_RATE_COLOUR,$hex($puts(MIN_BYTE_RATE,96)$puts(MEAN_BYTE_RATE,192)$puts(MAX_BYTE_RATE,256)$ifgreater(%__bitrate%,$get(MAX_BYTE_RATE),32768,$ifgreater(%__bitrate%,$get(MEAN_BYTE_RATE),$sub(32896,$div($mul($sub(%__bitrate%,$get(MEAN_BYTE_RATE)),127),$sub($get(MAX_BYTE_RATE),$get(MEAN_BYTE_RATE)))),$ifgreater(%__bitrate%,$get(MIN_BYTE_RATE),$add(128,$mul($div($mul($sub(%__bitrate%,$get(MIN_BYTE_RATE)),127),$sub($get(MEAN_BYTE_RATE),$get(MIN_BYTE_RATE))),256)),128))),6))$get(BYTE_RATE_COLOUR)|$get(BYTE_RATE_COLOUR)$num(%_playlist_number%,3)$if(%__replaygain_album_gain%,000000'.',$if(%__replaygain_track_gain%,808080'.', )) $if(%_isplaying%,600060,202020)$padcut($caps2($if2(%artist%,$ifgreater($left(%_filename%,2),0,$if($strcmp($strchr(%_directoryname%,-),0),%_filename%,$cut(%_directoryname%,$sub($strchr(%_directoryname%,-),1))),$if($strcmp($strchr(%_filename%,-),0),%_filename%,$cut(%_filename%,$sub($strchr(%_filename%,-),1)))))),30) $if(%_isplaying%,4000B0,000060)$padcut($caps2($if2(%title%,$if($strcmp($strrchr(%_filename%,-),0),Unknown Title,$substr(%_filename%,$add(1,$strrchr(%_filename%,-)),$len(%_filename%))))),35) $if(%_isplaying%,208080,808040)$if(%tracknumber%,$num(%tracknumber%,2),$ifgreater($left(%_filename%,2),0,$num($cut(%_filename%,2),2),$ifgreater($cut($replace($substr(%_filename%,$add(1,$strchr(%_filename%,-)),$len(%_filename%)), ,),2),0,$num($cut($replace($substr(%_filename%,$add(1,$strchr(%_filename%,-)),$len(%_filename%)), ,),2),2),--))) $if(%_isplaying%,808000,004000)$puts(ALBUM,$pad($left($caps2($if2(%album%,$substr(%_directoryname%,$add(1,$strchr(%_directoryname%,-)),$len(%_directoryname%)))),$if(%date%,31,38))$if(%date%,' (',)$if(%_isplaying%,208080,808040)[%date%]$if(%date%,')',),50))$if($strcmp($cut($get(ALBUM),1), ),$substr($get(ALBUM),2,$len($get(ALBUM))),$get(ALBUM))[   $if(%_isplaying%,0000A0,)%_length% ]

Nice, but $put & $get was killed in 0.55 

Which has made my string stupidly long.. (not as much as yours though!):

Code: [Select]
c47F5e|ffAA80$ifgreater($len(%artist%),20,$cut(%artist%,18)..,%artist%) ▪ $ifgreater($len(%title%),55,$cut(%title%,53)..,%title%)<TAB>c47F5e|ffAA80$if(%album%,[$ifgreater($len(%album%),$sub(100,$len($ifgreater($len(%artist%),20,$cut(%artist%,18)..,%artist%)  $ifgreater($len(%title%),55,$cut(%title%,53)..,%title%))),$cut(%album%,$ifgreater($sub(100,$len($ifgreater($len(%artist%),20,$cut(%artist%,18)..,%artist%) ▪ $ifgreater($len(%title%),55,$cut(%title%,53)..,%title%))),40,39,$sub($sub(100,$len($ifgreater($len(%artist%),20,$cut(%artist%,18)..,%artist%) ▪ $ifgreater($len(%title%),55,$cut(%title%,53)..,%title%))),2)))..,%album%)],) <%_length%>


It basically resizes the album field (album is right aligned with length), depending on how long the "atrist - title" field is, and also putting ".." on any fields that are cut (the string is suited to the size i keep foobar). Im totally lost in parts of it now, i wont be changing it for a long time.. ▪ needs to be replaced with the character using character map (trebechut ms). This string is my substitution for colums/fixed width virtual columns, I find its got all the info i want, clearly separated, and not looking ugly either.

impulse/xamphear: those buttons where an "illegal" hack, they aren't allowed because they will cause foobar to mess up with new versions and such, as they do not use legal apis (as there arent any to do what they want, maybe with a future version who knows, but the ui was suposed to be seperated into a separate opensourced dll in a later version, so customised uis will be available when that happens.)
Title: Foobar2000 format strings
Post by: impulse3k on 2003-03-03 19:00:54
ah, thanks for the explanation musicmusic
Title: Foobar2000 format strings
Post by: TurinsRevenge on 2003-03-03 21:01:10
Here's what I'm using, thanks to Bushwack's mega-script  .  I got rid of the puts and gets to work with .55.  Made to blend with the windows 2000/XP classic background



Code: [Select]
 $if(%_isplaying%,97FE5F,D6F8FE)$num(%_playlist_number%,3) $padcut($caps2($if2(%artist%,$ifgreater($left(%_filename%,2),0,$if($strcmp($strchr(%_directoryname%,-),0),%_filename%,$cut(%_directoryname%,$sub($strchr(%_directoryname%,-),1))),$if($strcmp($strchr(%_filename%,-),0),%_filename%,$cut(%_filename%,$sub($strchr(%_filename%,-),1)))))),30)$padcut($caps2($if2(%title%,$if($strcmp($strrchr(%_filename%,-),0),Unknown Title,$substr(%_filename%,$add(1,$strrchr(%_filename%,-)),$len(%_filename%))))),35) $if(%tracknumber%,$num(%tracknumber%,2),$ifgreater($left(%_filename%,2),0,$num($cut(%_filename%,2),2),$ifgreater($cut($replace($substr(%_filename%,$add(1,$strchr(%_filename%,-)),$len(%_filename%)), ,),2),0,$num($cut($replace($substr(%_filename%,$add(1,$strchr(%_filename%,-)),$len(%_filename%)), ,),2),2),--))) $if(%album%,[$ifgreater($len(%album%),$sub(100,$len($ifgreater($len(%artist%),20,$cut(%artist%,18)..,%artist%) 
$ifgreater($len(%title%),55,$cut(%title%,53)..,%title%))),$cut(%album%,$ifgreater($sub(100,$len($ifgreater($len(%artist%),20,$cut(%artist%,18)..,%artist%) $ifgreater($len(%title%),55,$cut(%title%,53)..,%title%))),40,39,$sub($sub(100,$len($ifgreater($len(%artist%),20,$cut(%artist%,18)..,%artist%) $ifgreater($len(%title%),55,$cut(%title%,53)..,%title%))),2)))..,%album%)],)$if(%date%,' (',)[%date%]$if(%date%,')',)<TAB> <%_length%>



Replace <TAB> (near end) with keyboard CTRL/TAB


Playlist font: Courier (8)
Playlist text color: 250, 233, 197
Playlist background color: 81, 124, 133
Playlist selection color: 250, 233, 197
Selected item frame: 0, 128, 255

Unselected non-playing tracks are shown as Cream (Playlist Color) on Teal Blue (Background)

Shows Now Playing in Red on Cream if selected and Bright Green on Teal Blue if not selected.

Selected, but not playing, shows as Black on Cream.

Columns shown are:

Playlist#___ Artist Name___Song Title___Album Track#___Album Name___Album Date___Track Time

All are justified for a neat display.


If someone can enhance it even more, please go for it and re-post
Title: Foobar2000 format strings
Post by: Volcano on 2003-03-03 22:53:33
Man, this stuff is so cool you can play around with it for hours!

I changed my colours to create a Borland Pascal IDE look-alike.

Playlist font: Lucida Console, 8pt
Playlist text color: 252,252,84 [span style='font-size:8pt;line-height:100%'](doesn't really matter since it's hardcoded in the playlist format string)[/span]
Playlist background color: 0,0,168
Playlist selection color: 0,168,168
Selected item frame: 192,192,192

Playlist formatting string (replace <TAB> with tab):

Quote
$if(%_isplaying%,FFFFFF|000000$padcut(%_playlist_number%,4),54FCFC|FFFFFF$padcut(%_playlist_number%,4)) A8A8A8|A8A8A8| $if(%_isplaying%,FFFFFF|000000$padcut($if(%artist%,%artist%,Unknown Artist),34),54FCFC|FFFFFF$padcut($if(%artist%,%artist%,Unknown Artist),34)) A8A8A8|A8A8A8| $if(%_isplaying%,FFFFFF|000000$padcut($if(%title%,%title%,%_filename_ext%),54),54FCFC|FFFFFF$padcut($if(%title%,%title%,%_filename_ext%),54)) A8A8A8|A8A8A8| $if(%_isplaying%,FFFFFF|000000$padcut([%album%],44),54FCFC|FFFFFF$padcut([%album%],44)) A8A8A8|A8A8A8| $if(%_isplaying%,FFFFFF|000000$padcut([%date%],4),54FCFC|FFFFFF$padcut([%date%],4)) A8A8A8|A8A8A8|$if(%_isplaying%,[<TAB>FFFFFF|000000%_length%],[<TAB>54FCFC|FFFFFF%_length%])


Ridiculously long, yeah... I wonder if there's any way to get the colors right without having to specify each command twice (because of the $if(%_isplaying%,...,...) statements)...?

Screenshot (1152*864, 44.7 KB) available here (http://free.pages.at/volcano/temp/foobar_schemes3.png).

I wish you guys had used [QUOTE ]s instead of [CODE ]s, BTW...
Title: Foobar2000 format strings
Post by: Bushwack on 2003-03-04 00:34:53
Quote
$put & $get was killed in 0.55


nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

Well there goes my dream of having recurrsion so I can do proper string processing 

Also without $put and $get my formatting string becomes pretty much just an unmangable mess.

Quote
$hex($ifgreater(%__bitrate%,256,32768,$ifgreater(%__bitrate%,192,$sub(32896,$div($mul($sub(%__bitrate%,192),127),$sub(256,192))),$ifgreater(%__bitrate%,$get(96),$add(128,$mul($div($mul($sub(%__bitrate%,96),127),$sub(192,96)),256)),128))),6)|$hex($ifgreater(%__bitrate%,256,32768,$ifgreater(%__bitrate%,192,$sub(32896,$div($mul($sub(%__bitrate%,192),127),$sub(256,192))),$ifgreater(%__bitrate%,96,$add(128,$mul($div($mul($sub(%__bitrate%,96),127),$sub(192,96)),256)),128))),6)$num(%_playlist_number%,3)$if(%__replaygain_album_gain%,000000'.',$if(%__replaygain_track_gain%,808080'.', )) $if(%_isplaying%,600060,202020)$padcut($caps2($if2(%artist%,$ifgreater($left(%_filename%,2),0,$if($strcmp($strchr(%_directoryname%,-),0),%_filename%,$cut(%_directoryname%,$sub($strchr(%_directoryname%,-),1))),$if($strcmp($strchr(%_filename%,-),0),%_filename%,$cut(%_filename%,$sub($strchr(%_filename%,-),1)))))),30) $if(%_isplaying%,4000B0,000060)$padcut($caps2($if2(%title%,$if($strcmp($strrchr(%_filename%,-),0),Unknown Title,$substr(%_filename%,$add(1,$strrchr(%_filename%,-)),$len(%_filename%))))),35) $if(%_isplaying%,208080,808040)$ifgreater($left(%_filename%,2),0,$num($cut(%_filename%,2),2),$ifgreater($cut($replace($substr(%_filename%,$add(1,$strchr(%_filename%,-)),$len(%_filename%)), ,),2),0,$num($cut($replace($substr(%_filename%,$add(1,$strchr(%_filename%,-)),$len(%_filename%)), ,),2),2),$if(%tracknumber%,$num(%tracknumber%,2),--)))  $if(%_isplaying%,808000,004000)$if($strcmp($cut($pad($left($caps2($if2(%album%,$substr(%_directoryname%,$add(1,$strchr(%_directoryname%,-)),$len(%_directoryname%)))),$if(%date%,31,38))$if(%date%,' (',)$if(%_isplaying%,208080,808040)[%date%]$if(%date%,')',),50),1), ),$substr($pad($left($caps2($if2(%album%,$substr(%_directoryname%,$add(1,$strchr(%_directoryname%,-)),$len(%_directoryname%)))),$if(%date%,31,38))$if(%date%,' (',)$if(%_isplaying%,208080,808040)[%date%]$if(%date%,')',),50),2,$len($pad($left($caps2($if2(%album%,$substr(%_directoryname%,$add(1,$strchr(%_directoryname%,-)),$len(%_directoryname%)))),$if(%date%,31,38))$if(%date%,' (',)$if(%_isplaying%,208080,808040)[%date%]$if(%date%,')',),50))),$pad($left($caps2($if2(%album%,$substr(%_directoryname%,$add(1,$strchr(%_directoryname%,-)),$len(%_directoryname%)))),$if(%date%,31,38))$if(%date%,' (',)$if(%_isplaying%,208080,808040)[%date%]$if(%date%,')',),50))[   $if(%_isplaying%,0000A0,)%_length%]


Nearly the same string I posted above, just updated for .55.  The one change I made was it now searches the filename for the tracknumber before looking at the tag, since I have alot of compilations I find this to be more accurate.

BTW I'm loving all the different strings, keep them coming.

EDIT: accually tested with with .55 now
Title: Foobar2000 format strings
Post by: ssamadhi97 on 2003-03-04 01:07:53
Quote
I changed my colours to create a Borland Pascal IDE look-alike.

ROFL. without reading your post, I just looked at the screenshot and immediately thought "Hey, look! Just like good ol' Borland Pascal!"     

Looks like you did succeed (w00t)
Title: Foobar2000 format strings
Post by: Gemini on 2003-03-04 01:18:10
Is there a way to make the File info display box smaller?
I keep my fb2k window pretty small, and the artists/title get cut off in the status bar by the file info display.
Title: Foobar2000 format strings
Post by: Rommel on 2003-03-04 02:03:33
UPDATE

TITLE FORMATTING, PLAYLIST:
Quote
$if(%_isplaying%,0080FF|0080FF$num(%_playlist_number%,3). $if(%artist%,$if(%title%,%artist%[ - '['[%album% - ][''%date% - ][$if(%tracknumber%,#$num(%tracknumber%,2),?) - ]$pad_right(%_length%,5)']'] - %title%,NO TAG - $pad_right(%_length%,5) - "%_filename_ext%"),NO TAG - $pad_right(%_length%,5) - "%_filename_ext%"),$num(%_playlist_number%,3). $if(%artist%,$if(%title%,FFFFFF%artist%[ - '['[%album% - ][''%date% - ][$if(%tracknumber%,#$num(%tracknumber%,2),?) - ]$pad_right(%_length%,5)']'] - FFFFFF%title%,NO TAG - $pad_right(%_length%,5) - FFFFFF"%_filename_ext%"),NO TAG - $pad_right(%_length%,5) - FFFFFF"%_filename_ext%"))

SYSTEM TRAY TOOLTIP:
Quote
$if(%artist%,$if(%title%,%artist% - %title%,NO TAG - "%_filename_ext%"),NO TAG - "%_filename_ext%")

FILE INFO DISPLAY:
Quote
$upper($ext(%_filename_ext%))[ - %__bitrate%kbps][ - %__channels%ch][ - %__samplerate%Hz]

STATUS BAR:
Quote
"%_path%"

WINDOW TITLE:
Quote
%_foobar2000_version% is playing $upper($ext(%_filename_ext%)) %comment%

PLAYLIST FONT: ProFontWindows - Normal - 8pt.
PLAYLIST TEXT COLOR: 128,128,128
PLAYLIST BACKGROUND COLOR: 0,0,0
PLAYLIST SELECTION COLOR: 192,192,192
SELECTED ITEM FRAME: 255,128,0

screenshot (http://www.stupidario.com/img/Rommel.png) (27kb)
Title: Foobar2000 format strings
Post by: oizoK on 2003-03-04 11:01:30
ok .. here's mine REALLY simple and it's likely to suck for all other people than me

Code: [Select]
[%artist%  -  ]$if(%title%,[%album%[  - [%disc%/] $num(%tracknumber%,2)]]  -  %title%,%_filename%)[<TAB>%_length%]


now i still have a problem .. apparently i'm too stupid to make the song which is playing at the moment a different colour ... could anybody do that ? (i'm thinkin about a dark grey, i normally have white text on black bg, so that would be a good contrast)

thanks in advance

edit:
screenshot (http://cgi.ethz.ch/~rolansch/files/friends/oizok/foo2k.jpg)
Title: Foobar2000 format strings
Post by: psynapse on 2003-03-04 13:48:30
Wow, Phoenix really doesn't like this forum. All those extended ascii characters mess with it's layout something shocking.
Anyway, i'm in ie6 now, so here's what i use for my playlist:

Code: [Select]
$$if(%_isplaying%,cda774|000000$num(%_playlist_number%,2).fdd7a4|000000 '('$if(%artist%,$caps([%artist%]),$caps2($replace([%_filename%],_, )))')' $caps2([%title%])    cda774|000000 '['[%_length%]']',cccccc|000000$num(%_playlist_number%,2). '('$if(%artist%,$caps2([%artist%]),$caps($replace([%_filename%],_, )))')' $caps2([%title%])    cccccc|000000 '['[%_length%]']')


Background: Black
Font: Verdana

Regular listing: 'playlistnumber{silver} (artist) title{white} length{silver}'
Current Playing: 'playlistnumber{navy} (artist) title{blue} length{navy}'

All info is capitalized for Easy Reading™, showing a filename (with underscores converted to spaces) if no iD3 tag is found.
Title: Foobar2000 format strings
Post by: xamphear on 2003-03-04 16:57:16
Slightly modified my puTTY look alike:
Code: [Select]
[$padcut(%artist%,20)] [FF5555|FF5555$padcut(%_directoryname%,20)] [%title%] [    00FF00|00FF00%_length%]


SCREENSHAWT! (http://cantara.org/xamphear/myfoobar.png)
Title: Foobar2000 format strings
Post by: TurinsRevenge on 2003-03-04 23:29:30
Oziok

Put this at the beginning of the string


Code: [Select]
$if(%_isplaying%,626262,FFFFFF)


The first colors apply if track is playing (dark grey), the second if it is not (white).

For other color combos, click on Chnage Color in the title formatting screen window and cut/paste.
Title: Foobar2000 format strings
Post by: shirotenshi on 2003-03-05 00:46:56
The String:
Quote
$if(%_isplaying%,FF80FF|FF80FF$num(%_playlist_number%,4)'<'FFFFFF|FFFFFF'| '$if(%disc%,FF80FF|FF80FF'Disc '%disc%,$pad(' ',6))$if(%tracknumber%,FF80FF|FF80FF' Track '$num(%tracknumber%,2),8D8AFD|8D8AFD' *NO TAG*')FFFFFF|FFFFFF' | '$if(%album%,FF80FF|FF80FF$padcut(%album%,40),8D8AFD|8D8AFD$padcut_right('*NO TAG*',40))FFFFFF|FFFFFF' | '$if(%artist%,FF80FF|FF80FF$padcut(%artist%,40),8D8AFD|8D8AFD$padcut_right('*NO TAG*',40))FFFFFF|FFFFFF' | 'FF80FF|FF80FF$if(%title%,$padcut(%title%,50),$padcut(%_filename_ext%,50))<TAB>8D8AFD|8D8AFD$if(%title%,$pad(' ',5),'*NO TAG*')FFFFFF|FFFFFF' | 'FF80FF|FF80FF$pad_right(%_length%,5)FFFFFF|FFFFFF' | 'FF80FF|FF80FF$pad_right(%__bitrate%,3)' kbps',FFFFFF|FFFFFF$num(%_playlist_number%,4)FFFFFF|FFFFFF' | '$if(%disc%,8AFDF8|8AFDF8'Disc '%disc%,$pad(' ',6))$if(%tracknumber%,8AFDF8|8AFDF8' Track '$num(%tracknumber%,2),8D8AFD|8D8AFD' *NO TAG*')FFFFFF|FFFFFF' | '$if(%album%,88FFA6|88FFA6$padcut(%album%,40),8D8AFD|8D8AFD$padcut_right('*NO TAG*',40))FFFFFF|FFFFFF' | '$if(%artist%,FC998B|FC998B$padcut(%artist%,40),8D8AFD|8D8AFD$padcut_right('*NO TAG*',40))FFFFFF|FFFFFF' | '8AD5FD|8AD5FD$if(%title%,$padcut(%title%,50),$padcut(%_filename_ext%,50))<TAB>8D8AFD|8D8AFD$if(%title%,$pad(' ',5),'*NO TAG*')FFFFFF|FFFFFF' | 'C3C3C3|C3C3C3$pad_right(%_length%,5)FFFFFF|FFFFFF' | 'FFFFFF|FFFFFF$pad_right(%__bitrate%,3)' kbps')
------------------- The End ----------------
Replace <TAB> with a tabulation(CTRL+TAB)

Quote
Playlist font: Ms Gothic - Standard - 9
Playlist background color: Red: 46  Green: 95  Blue: 105
Playlist selection color: Red: 57  Green: 117  Blue: 130


And the screenshot is here: 1280x1024 (46kB) (http://perso.wanadoo.fr/shirotenshi/foobar.png)
Title: Foobar2000 format strings
Post by: flloyd on 2003-03-05 01:31:57
shirotenshi, I love your setup. However when I try to use it my Title column is not straight like your's. Rather they are all the same distance away from the end of the Artist column so with a compilation album with different artists the titles are zigzagged. Do you (or anyone else) have any idea what I need to do in order to fix this?
Title: Foobar2000 format strings
Post by: smok3 on 2003-03-05 01:35:55
btw, with the complex examples, wouldnt it be easier to just upload the foobar2000.cfg somewhere together with snapshot and optional font?
Title: Foobar2000 format strings
Post by: muxinpp on 2003-03-05 03:35:44
Quote
$if(%_isplaying%,00FF00|00FF00● ,E294A6|007300 )9EBAED|9EBAED$num(%_playlist_number%,3).FF5B5B|FF5B5B【$if(%album%,FFD988|FFD988%album%,FFD988|FFD988%_directoryname%)FF5B5B|FF5B5B】FFFFFF|FFFFFF [84FF84|84FF84%artist% - ]$if(%title%,35FFFF|35FFFF%title%,35FFFF|35FFFF%_filename_ext%)[   8080FF%_length% BEFF7D|BEFF7D]
Title: Foobar2000 format strings
Post by: oizoK on 2003-03-05 13:37:55
thx turins revenge

(btw: it's really strange to what music some people listen here )
Title: Foobar2000 format strings
Post by: Golly on 2003-03-05 16:59:17
ok, time for my contribution to this. I've noticed alot of ppl like having columns, i prefer colours.
heres my humble string:

$if(%_isplaying%,FFFF00+++  ,2020FF)$num(%_playlist_number%,4). $if(%title%,[$if(%_isplaying%,FFFF00,80FF80)%artist% $if(%_isplaying%,FFFF00,D8D8D8)- $if(%year%,%year%,$if(%date%,%date%,????)) - [$if(%_isplaying%,FFFF00,FFA060)%album% $if(%_isplaying%,FFFF00,D8D8D8)- $num(%tracknumber%,2) - ]]$if(%_isplaying%,FFFF00,30FFFF)%title%,$if(%_isplaying%,FFFF00,2020FF)%_path%)$if(%_isplaying%,  +++,)   <TAB HERE> $if(%_isplaying%,FFFF00,FFB0FF)$pad_right(%_length%,5)


ps: also, i noticed alot of ppl here listen to Nightwish....legends!  NIGHTWISH ARE AWESOME!!

screenshot here (http://www.geocities.com/gollystrading/foobar.GIF) (33k)

EDIT: ok, if that link doesnt work try this (http://www.geocities.com/gollystrading/foobar.html)
Title: Foobar2000 format strings
Post by: Tri on 2003-03-05 19:39:58
Based on the information I found here, my playlist string is this:
Quote
000000|000000$padcut_right(%_playlist_number%,4). C0C0C0| 6B240A|000000$ifgreater($len(%artist%),45,$cut(%artist%,42)...,$padcut([%artist%],45)) C0C0C0| 000080|000000$ifgreater($len(%album%),45,$cut(%album%,42)...,$padcut([%album%],45)) C0C0C0| 000000|000000$pad($if(%tracknumber%,'# '$padcut_right(%tracknumber%,2),),4) C0C0C0| 008000|000000$if(%title%,$ifgreater($len(%title%),41,$cut(%title%,38)'...',$padcut([%title%],41)),$ifgreater($len(%_filename%),41,$cut(%_filename%,38)'...',$padcut(%_filename%,41)))   C0C0C0| $if(%__bitrate%,0080FF|000000$num(%__bitrate%,3) kbps, ) C0C0C0| 000000|000000$padcut($if(%__codec%,$caps(%__codec%),$ext(%_filename_ext%)),6) C0C0C0| 6B240A|000000$if(%__replaygain_track_gain%,'·',)000080|000000$if(%__replaygain_album_gain%,'·',) [   %_length%]


Playlist Font is Sheldon Narrow
Playlist Selection Color is R 192 G 192 B 192
Selected Item Frame is Black

Foobar window is always maximized at a resolution of 1280x1024

(I hope it's displayed properly... )
Title: Foobar2000 format strings
Post by: shirotenshi on 2003-03-05 19:44:12
Quote
shirotenshi, I love your setup. However when I try to use it my Title column is not straight like your's. Rather they are all the same distance away from the end of the Artist column so with a compilation album with different artists the titles are zigzagged. Do you (or anyone else) have any idea what I need to do in order to fix this?

hehe thx flloyd 
Take a screenshot to show your problem pls

I have some problems with half-width/full-width character and the $pad, $pad_right, $padcut, $padcut_right, $len functions 
Is it possible to add the same functions with half-width/full-width support ? 

A half-width/full-width character support example In Java (http://perso.wanadoo.fr/shirotenshi/Test.java) (Text File Encoding : UTF-8)
A screenshot 1280x1024 (46ko) (http://perso.wanadoo.fr/shirotenshi/Unicode-Font.png)

I made some modifications of the string too:
Quote
$if(%_isplaying%,FF80FF|FF80FF$num(%_playlist_number%,4)'<'FFFFFF|FFFFFF'| '$if(%disc%,FF80FF|FF80FF'Disc '%disc%,$pad(' ',6))$if(%tracknumber%,FF80FF|FF80FF' Track '$num(%tracknumber%,2),8D8AFD|8D8AFD' *NO TAG*')FFFFFF|FFFFFF' | '$if(%album%,FF80FF|FF80FF$padcut(%album%,40),8D8AFD|8D8AFD$padcut_right('*NO TAG*',40))FFFFFF|FFFFFF' | '$if(%artist%,FF80FF|FF80FF$padcut(%artist%,35),8D8AFD|8D8AFD$padcut_right('*NO TAG*',35))FFFFFF|FFFFFF' | 'FF80FF|FF80FF$if(%title%,$padcut(%title%,60),$padcut(%_filename_ext%,60))<TAB>8D8AFD|8D8AFD$if(%title%,,'*NO TAG*')FFFFFF|FFFFFF' | 'FF80FF|FF80FF$pad_right(%_length%,5)FFFFFF|FFFFFF' | 'FF80FF|FF80FF$pad_right(%__bitrate%,3)' kbps',FFFFFF|FFFFFF$num(%_playlist_number%,4)FFFFFF|FFFFFF' | '$if(%disc%,8AFDF8|8AFDF8'Disc '%disc%,$pad(' ',6))$if(%tracknumber%,8AFDF8|8AFDF8' Track '$num(%tracknumber%,2),8D8AFD|8D8AFD' *NO TAG*')FFFFFF|FFFFFF' | '$if(%album%,88FFA6|88FFA6$padcut(%album%,40),8D8AFD|8D8AFD$padcut_right('*NO TAG*',40))FFFFFF|FFFFFF' | '$if(%artist%,FC998B|FC998B$padcut(%artist%,35),8D8AFD|8D8AFD$padcut_right('*NO TAG*',35))FFFFFF|FFFFFF' | '8AD5FD|8AD5FD$if(%title%,$padcut(%title%,60),$padcut(%_filename_ext%,60))<TAB>8D8AFD|8D8AFD$if(%title%,,'*NO TAG*')FFFFFF|FFFFFF' | 'C3C3C3|C3C3C3$pad_right(%_length%,5)FFFFFF|FFFFFF' | 'FFFFFF|FFFFFF$pad_right(%__bitrate%,3)' kbps')
------------------- The End ----------------
Replace <TAB> with a tabulation(CTRL+TAB)

Quote
Playlist font: Ms Gothic - Standard - 9
Playlist background color: Red: 46  Green: 95  Blue: 105
Playlist selection color: Red: 57  Green: 117  Blue: 130


And the screenshot here : 1280x1024 (42ko) (http://perso.wanadoo.fr/shirotenshi/foobar_2.png)
Title: Foobar2000 format strings
Post by: ExUser on 2003-03-06 00:38:45
Quote
Is it possible to add the same functions with half-width/full-width support ? 

The problem is that the column stuff is just a hack anyhow. Until real column-based playlist support is implemented, there's a good chance it could break unless you have a font that's monospaced for both full and half character widths.
Title: Foobar2000 format strings
Post by: flloyd on 2003-03-06 01:02:01
shirotenshi, here is what mine (http://home.earthlink.net/~flloyd24/images/foobar.gif) looks like. Any ideas?
Title: Foobar2000 format strings
Post by: Bushwack on 2003-03-06 01:09:26
flloyd it looks like you want to be using a fixed width font.

Try Lucida Console or Courier New, there are a few more as well.
Title: Foobar2000 format strings
Post by: flloyd on 2003-03-06 01:22:33
Thanks Bushwack. That was exactly the problem.
Title: Foobar2000 format strings
Post by: ZiY0N on 2003-03-06 17:27:40
Tweaked version of Muxinpp's code (Thanks Muxinpp).

Font: Courier New
Playlist BG Color: Black
Playlist Selection Color: R: 128 B: 128 G: 128
Selected Item Frame: R: 212 B: 208 G: 200

Made the arrows and track time surrounding the album turn neon-green while playing. Added %tracknumber% to playlist and 'roll over' colors for the current playing song.

Kudos to Muxinpp for the rest of the code.

Quote
$if(%_isplaying%,00FF00|00FF00◘9EBAED|9EBAED$pad_right($pad(%_playlist_number%.,5),5)00FF00|EC00EC►$if(%album%,FFD988|FFD988%album%,FFD988|FFD988%_directoryname%)00FF00|EC00EC◄FFFFFF|FFFFFF [84FF84|84FF84%artist% - [[00FF00$num(%tracknumber%,2)84FF84|84FF84] - ]]$if(%title%,35FFFF|35FFFF%title%,35FFFF|35FFFF%_filename_ext%)[   00FF00%_length% BEFF7D|BEFF7D], E294A6|0073009EBAED|9EBAED$pad_right($pad(%_playlist_number%.,5),5)FF5B5B|FF5B5B►$if(%album%,FFD988|FFD988%album%,FFD988|FFD988%_directoryname%)FF5B5B|FF5B5B◄FFFFFF|FFFFFF [84FF84|84FF84%artist% -[ $num(%tracknumber%,2) -] ]$if(%title%,35FFFF|35FFFF%title%,35FFFF|35FFFF%_filename_ext%)[   8080FF|C9C9C9%_length% BEFF7D|BEFF7D])

Change "◘" and "►"  (Start>Programs>Access>Wordpad -Select "Courier New" for font and type in Alt-9688 or 9658)

Here is a picture with the current playing song NOT selected.

(http://www.strike9.com/file.aspx?path=/TempXM/fullsize%5cFoobar2k/Off.PNG)

Here is a picture with the current playing song SELECTED.

(http://www.strike9.com/file.aspx?path=/TempXM/fullsize%5cFoobar2k/Over.PNG)

-ZiY0N
-133T wanabie Hax0r-
Title: Foobar2000 format strings
Post by: Gallvs on 2003-03-07 10:21:45
Here's mine:

Quote
$if(%_isplaying%,FFFF00,2020FF)$if(%title%,[[$if(%_isplaying%,FFFF00,FFA060)%album% $if(%year%,$if(%_isplaying%,FFFF00,FFB0FF)'('%year%')' ,$if(%date%,$if(%_isplaying%,FFFF00,FFB0FF)'('%date%')' ,))$if(%_isplaying%,FFFF00,30FFFF)- $num(%tracknumber%,2) - $if(%_isplaying%,FFFF00,80FF80)%artist% $if(%_isplaying%,FFFF00,D8D8D8)- ]]$if(%_isplaying%,FFFF00,FFD2A6)%title%,$if(%_isplaying%,FFFF00,2020FF)%_path%)   $if(%_isplaying%,FFFF00,FFB0FF)$pad_right(%_length%,5)


The font is Andale Mono (monospaced).

Screenshot here (http://www.geocities.com/jhs81it/foobar_shot.png)
Title: Foobar2000 format strings
Post by: smok3 on 2003-03-07 20:03:55
post removed. (out of date cfg files were linked here)
Title: Foobar2000 format strings
Post by: ap1978 on 2003-03-09 19:11:34
Here's how my foobar2000 (http://home.no.net/wincmd/images/snap2.png) looks like...
Title: Foobar2000 format strings
Post by: BlueScreenJunky on 2003-03-09 19:29:08
okay, it's been asked several times already, but without any answer : Ap1978, where did you get your seekbar, volume control and buttons ?
Title: Foobar2000 format strings
Post by: Xecter on 2003-03-09 19:34:25
OMG@Ap1978 foobar


Dood! Where did u get those controls?!

They're great! Share it
Title: Foobar2000 format strings
Post by: ap1978 on 2003-03-09 19:39:02
Hehe  The control's made by X-Fixer (http://x-fixer.narod.ru/progs/index.html#butt) and sadly, doesn't work with the latest versions of foobar2000. I sent him a mail a few mins ago asking him to update it...
Title: Foobar2000 format strings
Post by: BlueScreenJunky on 2003-03-09 19:51:46
Thanx !
I'll wait for the next versions.
Title: Foobar2000 format strings
Post by: ssjkakaroto on 2003-03-09 20:48:00
just made one using shirotenshi's and Golly's codes:
Quote
2020FF|2020FF$num(%_playlist_number%,3)$if(%_isplaying%,<FFFFFF|FFFFFF|, FFFFFF|FFFFFF|) $if(%title%,80FF80|80FF80$padcut($if(%artist%,%artist%,Unknown Artist),35) FFFFFF|FFFFFF| FFA060|FFA060$padcut($if(%album%,%album%,Unknown Album),40) FFFFFF|FFFFFF|D8D8D8|D8D8D8#$if(%tracknumber%,$num(%tracknumber%,2),??)FFFFFF|FFFFFF| 30FFFF|30FFFF$padcut(%title%,60),%_filename%)[   <TAB>FFFF80|FFFF80%_length%]FFFFFF|FFFFFF|FFB0FF|FFB0FF$pad_right($num(%__bitrate%,3),3)C080FF|C080FFkbps


Font: MS Gothic, Regular, 9
BG Color: Black
Selection & Frame Color: B:160 R:0 G:0
sshot (http://www.geocities.com/notfound404us/f2k.html)
Title: Foobar2000 format strings
Post by: voltron on 2003-03-09 22:49:35
Quote
Hehe  The control's made by X-Fixer (http://x-fixer.narod.ru/progs/index.html#butt) and sadly, doesn't work with the latest versions of foobar2000. I sent him a mail a few mins ago asking him to update it...

the latest version is .57 as per your screenshot.
Title: Foobar2000 format strings
Post by: neoufo51 on 2003-03-09 23:18:49
Oh man, I didn't know those buttons and seekbar existed!

When he updates it, please tell him to let us know.
Title: Foobar2000 format strings
Post by: billcow on 2003-03-10 01:10:21
Just whipped this one up. works under .57, haven't tested older versions.
Code: [Select]
FFFFFF|FFFFFF$lower($num(%_playlist_number%,4). |
CCFFCC|CCFFCC
$repeat( ,$add($div($sub(32,$len(%artist%)),2),$mod($sub(32,$len(%artist%)),2)))%artist%$repeat( ,$div($sub(32,$len(%artist%)),2))
FFFFFF|FFFFFF|
FFFFCC|FFFFCC
$repeat( ,$add($div($sub(40,$len($if(%album%,'['$ifgreater($len(%album%),29,%album%…,%album%)[ #$num(%tracknumber%,2)]']',))),2),$mod($sub(40,$len($if(%album%,'['$ifgreater($len(%album%),29,%album%…,%album%)[ #$num(%tracknumber%,2)]']',))),2)))$if(%album%,'['$ifgreater($len(%album%),29,%album%…,%album%)[ #$num(%tracknumber%,2)]']',)$repeat( ,$div($sub(40,$len($if(%album%,'['$ifgreater($len(%album%),29,%album%…,%album%)[ #$num(%tracknumber%,2)]']',))),2))
FFFFFF|FFFFFF|
FFCCCC|FFCCCC
$repeat( ,$add($div($sub(50,$len(%title%)),2),$mod($sub(50,$len(%title%)),2)))%title%$repeat( ,$div($sub(50,$len(%title%)),2))
FFFFFF|FFFFFF|
)    CCCCFF|CCCCFF%_length%


screenshot (http://billcow0.tripod.com/fb2k_1.html)

works best with a black background and a fixed-width font. The reason I used "|"s instead of a block-drawing character is 'cause the font i'm using doesn't have those (it's a Type1 conversion from the computer modern TeX fonts, if anyone's curious)

pseudo-code for centering text is as follows:
Code: [Select]
$repeat( ,$add($div($sub(width,$len(string)),2),$mod($sub(width,$len(string)),2)))string$repeat( ,$div($sub(width,$len(string)),2))


BTW, $get and $put are back.

[edit]
Oops. Me = stupid. I used $strchr when i could have easily used $len. It's fixed now tho. I also added a function to add ellipses to the album name when it's 30 characters long (therefore indicating that it's a maxed-out ID3v1 tag, and thus not likely to be the whole album name). i could do it for the track name and artist too, but it's messy enough as it is.
[/edit]
Title: Foobar2000 format strings
Post by: ap1978 on 2003-03-10 01:38:56
Quote
Quote
Hehe  The control's made by X-Fixer (http://x-fixer.narod.ru/progs/index.html#butt) and sadly, doesn't work with the latest versions of foobar2000. I sent him a mail a few mins ago asking him to update it...

the latest version is .57 as per your screenshot.

Yeah, the toolbar component shows up in recent versions of foobar2k but it's unusable, nothing works. I just started it in the version of foobar2k i use, just as an example of how it looks like -what to expect when/if it's updated
Title: Foobar2000 format strings
Post by: billcow on 2003-03-10 04:27:53
Code: [Select]
$puts(SPACING,$if(%_isplaying%,FFFFFF|00003F$char(9608), ))
FFFFFF|FFFFFF$lower($num(%_playlist_number%,4). $char(9553)
$if(%title%,
$repeat($get(SPACING),$add($div($sub(32,$len(%artist%)),2),$mod($sub(32,$len(%artist%)),2)))CCFFCC|CCFFCC%artist%$repeat($get(SPACING),$div($sub(32,$len(%artist%)),2))
FFFFFF|FFFFFF$char(9553)
$repeat($get(SPACING),$add($div($sub(40,$len($if(%album%,'['%album%[ #$num(%tracknumber%,2)]']',))),2),$mod($sub(40,$len($if(%album%,'['%album%[ #$num(%tracknumber%,2)]']',))),2)))FFFFCC|FFFFCC$if(%album%,'['%album%[ #$num(%tracknumber%,2)]']',)$repeat($get(SPACING),$div($sub(40,$len($if(%album%,'['%album%[ #$num(%tracknumber%,2)]']',))),2))
FFFFFF|FFFFFF$char(9553)
$repeat($get(SPACING),$add($div($sub(50,$len(%title%)),2),$mod($sub(50,$len(%title%)),2)))FFCCCC|FFCCCC%title%$repeat($get(SPACING),$div($sub(50,$len(%title%)),2))
,
$repeat($get(SPACING),$add($div($sub(124,$len(%_filename%)),2),$mod($sub(124,$len(%_filename%)),2)))0000FF|0000FF%_filename%$repeat($get(SPACING),$div($sub(124,$len(%_filename%)),2))
FFFFFF|FFFFFF
)
FFFFFF|FFFFFF$char(9553)
)    CCCCFF|CCCCFF%_length%


Updated mine to use $get and $put to allow for a nice highlighting of the playing song, and to display the filename if the title tag isn't found (in my mp3 collection this generally means that the playlist is pointing to the old location of a song that has since been moved to better fit my organization system, so it also sets the text color to red, and doesn't bother trying to look for any other tags)

screenshot (http://billcow0.tripod.com/fb2k_2.html)
Title: Foobar2000 format strings
Post by: Bushwack on 2003-03-10 05:06:18
billcow I really like that centred text idea, nice work.

Keep the strings coming everyone, but keep the discussion about GUI hacks out of this thread please.
Title: Foobar2000 format strings
Post by: ak on 2003-03-10 17:33:31
After some fooling around had settled down with this (http://www.hot.ee/nafigator/pics/fb2k.png):
Quote
$if(%_isplaying%,$puts(C,$char(9632)),$puts(C,$char(9633)))
$puts(N, $char(3)c7c7c7|c7c7c7$char(3))
$puts(D,$char(3)6c6c6c|6c6c6c$char(3)$get©)
$puts(L,%_length_seconds%)
$lower($get(D)$get(N)$padcut($if(%artist%,%artist%, ),16)
$get(D)$get(N)$padcut($if(%date%,%date%, ),4)
$get(D)$get(N)$padcut($if(%album%,$if(%disc%,$padcut(%album%,16)
'['%disc%']',$if(%volume%,$padcut(%album%,16)
'('%volume%')',%album%)), ),20)
$get(D)$get(N)$if(%tracknumber%,$num(%tracknumber%,2),
$if(%track%,$num(%track%,2),$padcut( ,2)))
$get(D)$get(N)$if(%title%,%title%,%_filename%)$char(9)
$get(D)$get(N)$ifgreater(1,$get(L),00:00,
$ifgreater(600,$get(L),0%_length%,
$ifgreater(3600,$get(L),%_length%,
$puts(H,$div($get(L),3600))
$puts(X,$sub($get(L),$mul($get(H),3600)))
$puts(M,$num($div($get(X),60),2))
$puts(S,$num($sub($get(X),$mul($get(M),60)),2))
$ifgreater(6000,$get(L),$add($get(M),60):$get(S),$get(H)h:$get(M))))) )
$get(D)$char(3)$char(3)

Edit: OMG, looks like ( C ) is converted to © automatically, is it new software or it always has been this way?
Title: Foobar2000 format strings
Post by: musicmusic on 2003-03-10 18:23:27
Quote
Edit: OMG, looks like ( C ) is converted to © automatically, is it new software or it always has been this way?

yeh i think they upgraded to 1.1.1 from beta 4 or something.

try using a code block instead:

Code: [Select]
(c)
Title: Foobar2000 format strings
Post by: smok3 on 2003-03-10 20:37:34
can i do something like:
'when 2nd backslash is found cut off the rest of the string and including that backslash' type of display on playlist? (for the paths)

edit:
so i get something like 'g:\music...' or 'd:\mp3...'
Title: Foobar2000 format strings
Post by: TurinsRevenge on 2003-03-10 20:56:28
Someone said that puts() and get() are back in .57 but they're not listed in help and I can't find the syntax.  Can someone verify that they ARE back and if so, is this the correct syntax:

$puts(variable_name, value)
// Variable_name can be existing or it will be dynamically created.
// Value can be any string, numeric or hex value

$get(variable_name)
// Returns current value of variable_name. if there is no value or variable-name has not been created, returns null.


Thanks
Title: Foobar2000 format strings
Post by: billcow on 2003-03-11 03:21:47
nope, they aren't in the docs. and yup, that's how they work.
Title: Foobar2000 format strings
Post by: frod on 2003-03-14 09:34:04
For .58:

Code: [Select]
$puts(Q,$mod($div($get(COUNT),256),2))
$if($strcmp($get(Q),0),$puts(L,$mod($get(COUNT),256)),$puts(L,$sub(255,$mod($get(COUNT),256))))

$puts(HEX10,A)$puts(HEX11,B)$puts(HEX12,C)$puts(HEX13,D)$puts(HEX14,E)$puts(HEX15,F)
$puts(H,$get(L))$puts(T,$div($get(H),16))
$if($greater(10,$get(T)),$puts(V,$get(T)),$puts(V,$get(HEX$get(T))))
$puts(T,$sub($get(H),$mul($div($get(H),16),16)))
$if($greater(10,$get(T)),$puts(V,$get(V)$get(T)),$puts(V,$get(V)$get(HEX$get(T))))
$puts(BWG,$get(V)$get(V)$get(V))

// Playlist #
1212d0|1212d0$num(%_playlist_number%,4)':'

// Display replaygain indicator
$if(%__replaygain_album_gain%,9a3a45|9a3a45þ,)
$if($and(%__replaygain_track_gain%, $not(%__replaygain_album_gain%)),5b2329|5b2329þ,)
$if(%__replaygain_track_gain%%__replaygain_album_gain%,,0000FF|0000FFù)

$if(%_isplaying%,
$if(%title%,00e9f4|00e9f4$padcut($if(%artist%,%artist%,),25) $if(%tracknumber%,$padcut(DDDDDD|DDDDDD-00e9f4|00e9f4 $num(%tracknumber%,2) ,36),DDDDDD|DDDDDD-   ) $padcut($if(%title%,0000FF|0000FF- 00e9f4|00e9f4%title%,),70) $if(%date%,$padcut( DDDDDD|DDDDDD-00e9f4|00e9f4 '['%date%']',41), - '[    ]')
$if(%album%,$padcut(- 00e9f4|00e9f4%album%,52),$padcut('-   ',35)), $padcut(808080%_filename%BF408F,85)NO TAGS FOUND!$padcut(,33)),

$if(%title%,0078b9|1189ca$padcut($if(%artist%,%artist%,),25) $if(%tracknumber%,$padcut(DDDDDD|DDDDDD-1212d0|0000ff $num(%tracknumber%,2) ,36),DDDDDD|DDDDDD-   ) $padcut($if(%title%,0000FF|0000FF- DDDDDD|EEEEEE%title%,),70) $if(%date%,$padcut( -0078b9|1189ca '['%date%']',26), - '[    ]')

$if(%album%,$padcut(- 5B5B5B%album%,45),$padcut('-   ',35)), $padcut(808080%_filename%BF408F,85)NO TAGS FOUND!$padcut(,33))
)
    [c4c441|FFFF80%_length%]$get(BWG)|$get(BWG)³FFB0FF|FFB0FF$pad_right($num(%__bitrate%,3),3)C080FF|C080FFkbps


Screenshot is here (http://bene.ath.cx:3000/fb2k.gif).

And here's an interesting snippet.  It could probably be made a bit tighter, but oh well.  It's a gradient thing that fades from one color to another.  (Screenshot here (http://bene.ath.cx:3000/fbgrad.gif))

Code: [Select]
// Define Gradient Start Color
$puts(R1,20)$puts(G1,254)$puts(B1,254)
// Define Gradient End Color
$puts(R2,254)$puts(G2,220)$puts(B2,1)
// Set Fade Speed
$puts(FS,5)

// Cycle RGB value for gradient
$puts(COUNT,$mul($get(FS),$sub(%_playlist_number%,1)))
$puts(RDIF,$sub($get(R2),$get(R1)))
$puts(GDIF,$sub($get(G2),$get(G1)))
$puts(BDIF,$sub($get(B2),$get(B1)))
$puts(BIGDIF,$max($max($get(RDIF),$get(GDIF)),$get(BDIF)))
$if($greater($get(BIGDIF),0),,$puts(BIGDIF,$mul($get(BIGDIF),-1)))
$puts(RSC,$div($mul($get(RDIF),$get(COUNT)),$get(BIGDIF)))
$puts(GSC,$div($mul($get(GDIF),$get(COUNT)),$get(BIGDIF)))
$puts(BSC,$div($mul($get(BDIF),$get(COUNT)),$get(BIGDIF)))
$puts(RDIR,$mod($div($get(RSC),$get(RDIF)),2))
$puts(GDIR,$mod($div($get(GSC),$get(GDIF)),2))
$puts(BDIR,$mod($div($get(BSC),$get(BDIF)),2))
$if($greater($get(RDIF),0),$puts(RDIR,$add($get(RDIR),1)),$puts(RDIR,$add($get(RDIR),1)))
$if($greater($get(GDIF),0),$puts(RDIR,$add($get(RDIR),1)),$puts(GDIR,$add($get(GDIR),1)))
$if($greater($get(BDIF),0),$puts(RDIR,$add($get(RDIR),1)),$puts(BDIR,$add($get(BDIR),1)))
$puts(RT,$mod($get(RSC),$get(RDIF)))
$puts(GT,$mod($get(GSC),$get(GDIF)))
$puts(BT,$mod($get(BSC),$get(BDIF)))

$if($strcmp($get(RDIF),0),$puts(R,0),$select($get(RDIR),$puts(R,$add($get(R1),$get(RT))),$puts(R,$sub($get(R2),$get(RT)))))
$if($strcmp($get(GDIF),0),$puts(G,0),$select($get(GDIR),$puts(G,$add($get(G1),$get(GT))),$puts(G,$sub($get(G2),$get(GT)))))
$if($strcmp($get(BDIF),0),$puts(B,0),$select($get(BDIR),$puts(B,$add($get(B1),$get(BT))),$puts(B,$sub($get(B2),$get(BT)))))

// Create Hex Code for Gradient
$puts(HEX10,A)$puts(HEX11,B)$puts(HEX12,C)$puts(HEX13,D)
$puts(HEX14,E)$puts(HEX15,F)

// Blue
$puts(H,$get(B))$puts(T,$div($get(H),16))
$if($greater(10,$get(T)),$puts(V,$get(T)),$puts(V,$get(HEX$get(T))))
$puts(T,$sub($get(H),$mul($div($get(H),16),16)))
$if($greater(10,$get(T)),$puts(V,$get(V)$get(T)),$puts(V,$get(V)$get(HEX$get(T))))
$puts(HEX,$get(HEX)$get(V))

// Green
$puts(H,$get(G))$puts(T,$div($get(H),16))
$if($greater(10,$get(T)),$puts(V,$get(T)),$puts(V,$get(HEX$get(T))))
$puts(T,$sub($get(H),$mul($div($get(H),16),16)))
$if($greater(10,$get(T)),$puts(V,$get(V)$get(T)),$puts(V,$get(V)$get(HEX$get(T))))
$puts(HEX,$get(HEX)$get(V))

// Red
$puts(H,$get(R))$puts(T,$div($get(H),16))
$if($greater(10,$get(T)),$puts(V,$get(T)),$puts(V,$get(HEX$get(T))))
$puts(T,$sub($get(H),$mul($div($get(H),16),16)))
$if($greater(10,$get(T)),$puts(V,$get(V)$get(T)),$puts(V,$get(V)$get(HEX$get(T))))
$puts(HEX,$get(HEX)$get(V))


Should be self-explanatory.  You put the starting RGB value in R1,G1, and B1 and the end in R2,G2, and B2.  The final hex code is in the variable HEX.  To use that you just need something like:

Code: [Select]
$get(HEX)
Look at the colors!



If you find any bugs/see any way to make the code smaller, i'd like to know!
Title: Foobar2000 format strings
Post by: JEN on 2003-03-14 10:52:14
With the addition of a viewable seekbar in the statusbar, foobar (for me!) now feels complete

screenshot (http://uk.photos.yahoo.com/bc/jennyjenx/vwp?.dir=/SharingFolder&.src=ph&.dnm=FoobarComplete.gif&.view=t&.done=http%3a//uk.photos.yahoo.com/bc/jennyjenx/lst%3f%26.dir=/SharingFolder%26.src=ph%26.view=t)!
Title: Foobar2000 format strings
Post by: Nivo on 2003-03-14 13:08:06
is it possible to leave out part of the filename? For example; right now its showing the filename if no tag is found, including .mp3... zo how do i leave the extention out?
Title: Foobar2000 format strings
Post by: Case on 2003-03-14 13:40:43
Quote
is it possible to leave out part of the filename? For example; right now its showing the filename if no tag is found, including .mp3... zo how do i leave the extention out?

You get filename without extension by using %_filename% instead of %_filename_ext%. For more general text manipulation refer to 'functions' section in help text.
Title: Foobar2000 format strings
Post by: Nivo on 2003-03-14 13:55:25
doh... i knew it would be something simple... thanks
Title: Foobar2000 format strings
Post by: Volcano on 2003-03-14 16:49:34
After upgrading to v0.58, I re-arranged some of the strings. The
status bar now displays a progress bar and the Track Gain value.

My current setup is listed here (http://free.pages.at/volcano/temp/fb2k_strings.txt) (it would be kinda hard to post it in
the thread without either loosing the spaces or contributing to the
mess caused by people not capable of using forum markup code
properly :alien:). I'll mess with colors and "real" columns later.

Here's a screenshot (http://free.pages.at/volcano/temp/foobar_schemes4.png).
Title: Foobar2000 format strings
Post by: matrix on 2003-03-14 18:18:15
thank you all for providing nice formattin layout for n00bs like myself  foobar owns!!!!!
Title: Foobar2000 format strings
Post by: ExUser on 2003-03-14 19:17:55
Quote
For .58:

[snip]

If you find any bugs/see any way to make the code smaller, i'd like to know!

That's freakin' ugly... If only we had some sort of macro support, now, eh? I'm getting to the point where I could do some really interesting things if I had some way to implement functions, but unless that comes, there's now way I'm going to insert the amount of redundant code needed for proper formatting. I'm thinking of things like RGB to HSL conversion and vice-versa. HSL is so much nicer than RGB, but there's no easy way to do it right now in FB2K, at least numerically.
Title: Foobar2000 format strings
Post by: Solka on 2003-03-14 19:30:53
Mine is very simple, and it's like many others, maybe I must set it if there aren't tags, but atm is good enough for me

Code: [Select]
$padcut(%_playlist_number%,5)B89425|  
$padcut([%artist%],20) B89425|      
$padcut([%album%] #[%tracknumber%],40)B89425|    
$padcut([%title%],40)B89425|  
$padcut([%comment%],25)B89425|
$char(9)%_length%


Screenshot: click. (http://digilander.iol.it/matteovisco/varie/foo.png) [~300kb]
Title: Foobar2000 format strings
Post by: billcow on 2003-03-14 20:48:30
I can't post my actual formatting string, or any actual strings, as I'm away from home for the weekend.

However, I did do some neat stuff with .58 before i left, so i'll give a short synopsis of that:

1.) I created code that creates a smooth transition from 0 to a value "n" and back every "n" seconds. It's neat to create a pulsing color effect in the statusbar, or to create a "Throbber" that's more complex than can be done with a $switch style statement like in the default statusbar string for .58. Unfortunately, it's limited to a resolution of one update per second, so it's more of a slow cdhange than an actual pulsing if you use it for color, and if used for a "throbber" the animation can be (IE is) kinda jerky.

2.) Improved my earlier centering code a bit to use variables to avoid duplicating code.

Plus, does anyone know how "$put" works? "$puts" stores a string to a variable, but what is "$put"? I would try to figure it out, but i'm currently stuck with a webtv for 'net access (blech), so I can't do anything more than theory until sunday. So my only guess is that it might be for macros ("$put(function,value,params)" or something like that maybe)
Title: Foobar2000 format strings
Post by: Solka on 2003-03-14 20:54:05
I changed my string, now fb2k looks a little bit different, just added date, CD if present and some colours...

shot. (http://digilander.libero.it/matteovisco/varie/foo.png) [~400kb]

string:
Code: [Select]
$padcut(%_playlist_number%,5)B89425|  
$padcut([%artist%],20) B89425|      
$padcut([%album%] $if(%CD%,CD%CD%) #[%tracknumber%],40)B89425|    
$padcut([%title%],50)B89425|    
FBF3CE$padcut([%comment%],25)B89425|
F3C994$padcut($if(%date%,y:%date%),7)B89425|
$char(9)6F6AFF%_length%
Title: Foobar2000 format strings
Post by: Dibrom on 2003-03-14 23:01:35
Quote
2.) Improved my earlier centering code a bit to use variables to avoid duplicating code.

Can you go a little more in depth into what you mean by this?

I've been putting together a rather complex display myself and have been working on making it as clean and easily configurable as possible, so I've been looking for more ways to do this sort of thing.  So far I've been unsuccessful in creating anything like a 'function' though because the variables created with $puts are only evaluated on creation, not when they are called later with $get.  As a result I've been having to duplicate rather large blocks of code... so have you found a way around this?

Quote
Plus, does anyone know how "$put" works? "$puts" stores a string to a variable, but what is "$put"? I would try to figure it out, but i'm currently stuck with a webtv for 'net access (blech), so I can't do anything more than theory until sunday. So my only guess is that it might be for macros ("$put(function,value,params)" or something like that maybe)


As far as I can tell, $put does the exact same thing as $puts, except that the second argument is sent to the display immediately at the same time it is sent to the variable, whereas with $puts, the second argument is not sent to the display until called with $get.
Title: Foobar2000 format strings
Post by: TurinsRevenge on 2003-03-14 23:58:08
I put this together so I could get a better feel for what the actual problems would be with creating functions/macros out of the current capability.

//Initialize Variables

//Store Reset Color Sequence
$puts(color_reset,)

//Store Color Red
$puts(color_red,0000FF)

//Store Color Black
$puts(color_black,000000)

//Store Elapsed and Total Time
$puts(time_elap_tot, %_time_elapsed%[ / %_time_total%])

//Store Time Percentage
$puts(time_percent,[ $div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%)])

//Store Progress Bar
$puts(progress_bar,$progress(%_time_elapsed_seconds%,%_time_total_seconds%,20,<$get(color_red)$get(time_percent)'%'$get(color_black)>,'—'))


//----Begin Status Bar Display----//

$Get(color_reset)
'|'
$Get(progress_bar)

$Get(color_reset)
'| '
$Get(time_elap_tot)

//----End Status Bar Display----//



Here're just a few thoughts for starters.

1. Need the ability to create andname functions so they can be reused across all of FB2K

2. functions and variables need to be global or local so different functions can communicate between scripts

3. Need the ability to have an init/DIM section.  In the above example I'm initing the colors on every pass, which is unnecessary.

4. Ability to nest functions

5. Need looping, i.e. Do While

6. Return codes from functions

7. Ability to pass variables between local or global functions, i.e. FooU(artist, length, ret_code)

8. Evaluate variables at execution
Title: Foobar2000 format strings
Post by: Dibrom on 2003-03-15 00:47:02
Quote
Here're just a few thoughts for starters.

1. Need the ability to create andname functions so they can be reused across all of FB2K

2. functions and variables need to be global or local so different functions can communicate between scripts

3. Need the ability to have an init/DIM section.  In the above example I'm initing the colors on every pass, which is unnecessary.

4. Ability to nest functions

5. Need looping, i.e. Do While

6. Return codes from functions

7. Ability to pass variables between local or global functions, i.e. FooU(artist, length, ret_code)

8. Evaluate variables at execution

I would like to see more flexibility in the tagz stuff myself, but I seriously doubt we'll ever see things progress to this level.

Most of the current problems could be resolved simply by an $eval() tag of some sort that would take a string and evaluate it as tagz code.  In combination in with $puts and $get, this would allow for quite a bit more flexibility.  The problem with this is that it would allow people to create scripts that would freeze fb2k.  I talked to Peter about this last night and he said the only reason he hasn't added this sort of thing is just because of that.  Maybe there is a solution somewhere that could be found that would allow for a safe system of doing this, but I don't know.
Title: Foobar2000 format strings
Post by: TurinsRevenge on 2003-03-15 01:40:42
Yeah, I agree.  After writing this I came back to reality and realized what a Pandora's box it was. Going down that road, sooner or later someone would eventually ask him to write a FB-specific compiler.  hehehe

The reason I like FB2K is that it's more about the accurate reproduction of music than it is about the player's technology or looks.  In spite of what some may say, I like the UI because it's intuitive, easy to use and flexible. And the fact that FB2K is resource friendly completes the packasge.

It's a very tricky balancing act for a developer to figure out what the most important features are, put them together in the right way, keep his options open for future requirements and keep it easy-to-maintain, efficient and bug-free (not to mention maybe making some money from it in the future).

So often it's easy for people who don't see the full product vision to throw out ideas that would take the product in the wrong direction.  And as keeper of the vision, I guess only Peter knows the right path

Now about that compiler... 
Title: Foobar2000 format strings
Post by: ExUser on 2003-03-15 01:57:47
Quote
Now about that compiler... 

I've said it before, and I'll say it again: Why not compile Perl in? Hell, even LISP? 
Title: Foobar2000 format strings
Post by: TurinsRevenge on 2003-03-15 02:23:33
Actually, I was thinking COBOL. 
Title: Foobar2000 format strings
Post by: Golly on 2003-03-15 02:38:34
hey dudes, for those who are interested i made a little thingy for the colour of the bitrate when i display it.
If the bitrate is below a 128kbps it will display in red, if not it will be somewhere between 128(green) and 320(blue) so the colour for 224kbps will be halfway between green and blue, get i mean?
U can customise the low bitrate and the colours with the vars at the top, i'm terrible with colour coordination so i'll probably get someone else to pick better colour for me later 


//Shit bitrate threshold and colour
$puts(SB_T,127)
$puts(SB_C,0000FF)

//Low and High Bitrate colours
$puts(LB_R,20)
$puts(LB_G,128)
$puts(LB_B,20)
$puts(HB_R,0)
$puts(HB_G,0)
$puts(HB_B,255)

//////////////// dont change below ////////////////

//Set bitrate colour
$if($greater(%__bitrate%,$get(SB_T)),
$puts(BR,$div($mul($sub(%__bitrate%,$get(SB_T)),255),$sub(320,$get(SB_T))))
$puts(BR_R,$add($get(LB_R),$div($mul($sub($get(HB_R),$get(LB_R)),$get(BR)),255)))
$puts(BR_G,$add($get(LB_G),$div($mul($sub($get(HB_G),$get(LB_G)),$get(BR)),255)))
$puts(BR_B,$add($get(LB_B),$div($mul($sub($get(HB_B),$get(LB_B)),$get(BR)),255)))
$puts(BR_C,$hex($get(BR_B),2)$hex($get(BR_G),2)$hex($get(BR_R),2))
,
$puts(BR_C,$get(SB_C)))

//////////////// bitrate colour now stored in BR_C ////////////////

//Display Bitrate
$get(BR_C)'['%__bitrate% kbps']'
Title: Foobar2000 format strings
Post by: DarkAngel on 2003-03-15 02:52:32
this is a slightly modified version of the excellent formatting posted by frod (http://www.hydrogenaudio.org/forums/index.php?act=Profile&CODE=03&MID=5481) on page 5 (http://www.hydrogenaudio.org/show.php/act/ST/f/27/t/4899/st/100) of this thread.

Its 2:30am here, and my modifications are such an ugly hack of it all i wont post the code in all its glory here for fear of causing shock, instead look here (http://gosh.ex.ac.uk/~cs00mhp/fb2k/code.txt).

A screenshot is here: screenshot (http://gosh.ex.ac.uk/~cs00mhp/fb2k/theme.gif)
(note: the far right coloumns do highlight on select, but it wont capture. HypserSnap has a crap GIF encoder, JPEG is even worse at 100% quality.)

its also quite large, screen real-estate wise, but i do run at 1600x1200.

edit, forgot to say, background is (R,G,B) 32,36,49, font is ProFontWindows, frame is 167,167,167
Title: Foobar2000 format strings
Post by: billcow on 2003-03-15 04:01:29
Dibrom:
What I meant by cleaning up my centering code was that I created a variable for the text that was being centered, and then referenced that variable everywhere it was used. For simple strings like %artist% it didn't simplify things much, but for longer things, such as if the artist is deduced from the filename, it makes it a lot more readable. I would attempt to put it here, but like i said, I'm stuck with a WebTV at the moment, and trying to type anything very long is complicated enough, and when i have to worry about parentheses, i'd be likely to mess it up so bad as to seriously confuse anyone who tried to use it.

Basically, what it came down to is that it comes out as (formatted more as C than fb2k code, btw. less parens to type wrong):
Code: [Select]
$repeat( ,$get(SPACELEFT))
$get(STR)
$repeat( ,$get(SPACERIGHT))


If nothing else, now I can change the text that gets centered without having to change it in about 8 places.

And my personal opinion about solving the scripting problem - formatting plugins. The script could include something like '$function(component,function,parameters', foobar would call the corrosponding component DLL with the function name and the parameters, the DLL would return a string, and foobar would put that in the output.

It wouldn't have the problem with easily crashing foobar, or at least not the problems associated with that, because presumably, anyone who can write a plugin should know better than to complain to Peter when their untested code crashes his program.

It wouldn't have issues with bloating foobar, because all the code would be in a seperate file.

It would also be simple to prevent unnecessary duplication of code - foobar could process the parameter string before it passes it to the DLL (replacing anything tagz recognizes), and then do the same with what it gets back before it prints it. Any recursion there could be elimiated by bypassing anything that would call another DLL.

And if someone wanted to get really crazy, they could write their own script language as a function. Then they could implement anything from Perl to COBOL to Brainf*ck.
Title: Foobar2000 format strings
Post by: penvzila on 2003-03-15 04:49:55
Don't know if it's my favorite but I did make it:

Playlist:

Code: [Select]
$if(%_isplaying%,D39850$padcut($num(%_playlist_number%,4),4) 
$padcut(%_filename_ext%,100)
|
$padcut(%_length%,7)
$padcut(%_length_seconds%s,5)
|
%__bitrate%,
CB30CF|A7EDCC$padcut($num(%_playlist_number%,4),4) 000000|EE6C35$padcut(%_filename_ext%,100) 99762D|404080|$padcut(%_length%,7) $padcut(%_length_seconds%s,5)|A35C5A|FFFFFF
$if(%__bitrate%,$padcut(%__bitrate%,3),???))

|$if(%__replaygain_track_gain%,%__replaygain_track_gain%, )


System Tray

Code: [Select]
$abbr(%_filename%,50)


Window Title

Code: [Select]
%_foobar2000_version% is now playing %_filename_ext% %_length% at %__bitrate%Kbps %__samplerate%Hz in $if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)[%__extrainfo%]


Status Bar Now with mad colors

Code: [Select]
:::FB006A%_time_elapsed% $progress($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),100,100,595959$num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),2)'%',808080'|')808080'|' 408000%_time_remaining% 0CB407 '('%_time_total%')' 0059B3Replaygain:$if(%__replaygain_track_gain%,%__replaygain_track_gain%, None) 27278BPeak: $if(%__replaygain_track_peak%,%__replaygain_track_peak%, None)    8000FF-={

$select($add($mod(%_time_elapsed_seconds%,12),1),'f','fo','foo','foob','fooba','foobar','fooba','foob','foo','fo','f',' ')

8000FF}=- 
Title: Foobar2000 format strings
Post by: DustMagnet on 2003-03-15 04:54:51
One trick that I haven't seen posted yet:

Code: [Select]
$if2($if($stricmp(the ,$left(%artist%,4)),
$right(%artist%,$sub($len(%artist%),4)),%artist%),'Artist')


I'm removing "The " from the start of Artist if it exists. That way "The Doors" and "Doors", for example, display the same. The code is a bit convoluted because I need a $cut_right(A,x) function. (hint hint  ). Or maybe I'm just being retarded.

And in case you're wondering, I've renamed the band "The The" as "The The The" to avoid code for that one case. 
Title: Foobar2000 format strings
Post by: Dibrom on 2003-03-15 05:18:37
Quote
Dibrom:
What I meant by cleaning up my centering code was that I created a variable for the text that was being centered, and then referenced that variable everywhere it was used. For simple strings like %artist% it didn't simplify things much, but for longer things, such as if the artist is deduced from the filename, it makes it a lot more readable. I would attempt to put it here, but like i said, I'm stuck with a WebTV at the moment, and trying to type anything very long is complicated enough, and when i have to worry about parentheses, i'd be likely to mess it up so bad as to seriously confuse anyone who tried to use it.

Basically, what it came down to is that it comes out as (formatted more as C than fb2k code, btw. less parens to type wrong):
Code: [Select]
$repeat( ,$get(SPACELEFT))
$get(STR)
$repeat( ,$get(SPACERIGHT))


If nothing else, now I can change the text that gets centered without having to change it in about 8 places.

Ah, yes.  I wasn't sure if this is what you meant, or if you'd found a way to create something like a function.  I've been doing exactly what you're speaking of with the layout that I'm working on right now (which, btw, borrows your idea of centered text ).  I'm basically working on making a highly configurable, easily readible, script with reusable components.  The part that is a bit of a pain in the ass is in having to repeat a rather large code block for each column, even when using variables.  I had come up with a really nice setup for solving this problem before I realized that no matter what you do, strings are evaluated on declaration with $puts, and so they never chagne, even if they rely on variables that are modified before $get is called :/ (This was my first real experimentation with $put/$get and trying to create something non-basic)

At any rate, I'll post what I'm working on here when I get more of my initial ideas implemented.

Quote
And my personal opinion about solving the scripting problem - formatting plugins. The script could include something like '$function(component,function,parameters', foobar would call the corrosponding component DLL with the function name and the parameters, the DLL would return a string, and foobar would put that in the output.


An interesting idea, but I think this would still allow for the type of problems that Peter seems to want to avoid, mainly that with this level of power in scripting, the possibility to freeze foobar with a bad script becomes much easier.

Quote
It wouldn't have the problem with easily crashing foobar, or at least not the problems associated with that, because presumably, anyone who can write a plugin should know better than to complain to Peter when their untested code crashes his program.


Hrmm.. I do recall this very thing happening with one of the early fb2k plugins for which links were removed from this forum

While technically people shouldn't bitch at Peter, I'm not so sure it would actually happen that way.  No matter how clearly you try to point out possible risks or problems, people still seem to find a way to be surprised when it happens.

Quote
It wouldn't have issues with bloating foobar, because all the code would be in a seperate file.


True, though I don't think that adding the type of functionality necessary to have something like an $eval function (which would allow for recursion) would really add too much bloat though.

Quote
And if someone wanted to get really crazy, they could write their own script language as a function. Then they could implement anything from Perl to COBOL to Brainf*ck.


It would be pretty cool to have a plugin which could leverage the power of languages like Perl or Python for string manipulation.  I wonder if the current SDK would allow for something like this.

While we're at it, I think it would be rather cool if a plugin were made that would allow for loading an entire tagz display setup, along with fonts, color setups, etc, from an archive of sorts.  That way people could distribute tagz display schemas easily.  Functionality could even be added to select from different archives on the fly and have them update the playlist in realtime.  Kind of like a skin browser, but just for tagz.  It seems rather like a logical progression to me given the increasing complexity of the scripts we are seeing and the continued interest people have in creating new layouts and trying out new ideas.
Title: Foobar2000 format strings
Post by: neoufo51 on 2003-03-15 06:34:45
I dunno bout you guys, but I want to see the best possible status bar display that you guys could produce. I really dislike the default one.
Title: Foobar2000 format strings
Post by: xamphear on 2003-03-15 07:44:43
Quote
I dunno bout you guys, but I want to see the best possible status bar display that you guys could produce. I really dislike the default one.

Code: [Select]
'['$progress(%_time_elapsed_seconds%,%_time_total_seconds%,30,'©','–')']'
[ '['%__bitrate%kbps @ %__samplerate%khz']']
I like simplicity.
Title: Foobar2000 format strings
Post by: penvzila on 2003-03-15 08:10:02
Quote
I dunno bout you guys, but I want to see the best possible status bar display that you guys could produce. I really dislike the default one.

How about this monster?  I took the color bitrate thing from some guy here.

Code: [Select]
:::FB006A%_time_elapsed%:::$progress($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),100,100,595959$num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),2)'%',808080'|')808080'|' :::408000%_time_remaining%:::0CB407 '('%_time_total%')' 0059B3Track Peak:$if(%__replaygain_track_peak%,%__replaygain_track_peak%, None) 

$puts(SB_T,127)
$puts(SB_C,0000FF)

$puts(LB_R,20)
$puts(LB_G,128)
$puts(LB_B,20)
$puts(HB_R,0)
$puts(HB_G,0)
$puts(HB_B,255)

$if($greater(%__bitrate%,$get(SB_T)),
$puts(BR,$div($mul($sub(%__bitrate%,$get(SB_T)),255),$sub(320,$get(SB_T))))
$puts(BR_R,$add($get(LB_R),$div($mul($sub($get(HB_R),$get(LB_R)),$get(BR)),255)))
$puts(BR_G,$add($get(LB_G),$div($mul($sub($get(HB_G),$get(LB_G)),$get(BR)),255)))
$puts(BR_B,$add($get(LB_B),$div($mul($sub($get(HB_B),$get(LB_B)),$get(BR)),255)))
$puts(BR_C,$hex($get(BR_B),2)$hex($get(BR_G),2)$hex($get(BR_R),2))
,
$puts(BR_C,$get(SB_C)))

$get(BR_C)%__bitrate%kbps

 8000FF-={
$select($add($mod(%_time_elapsed_seconds%,12),1),'f','fo','foo','foob','fooba','foobar','fooba','foob','foo','fo','f',' ')

8000FF}=- 
Title: Foobar2000 format strings
Post by: Golly on 2003-03-15 09:44:18
i like mine. as usual though i'm still indecsisive about my choice of colours.......
......although see how ive got a low bitrate thershold, i'm thinking about adding a high one too.......
Screen shot here (http://www.geocities.com/gollystrading/foobar.html)

//Progress bar colours
$puts(PB_C1,0000FF)
$puts(PB_C2,FF0000)
$puts(PB_C3,B80000)
$puts(PB_C4,0000A8)

//Shit bitrate threshold and colour
$puts(SB_T,127)
$puts(SB_C,0000FF)

//Low and High Bitrate colours
$puts(LB_R,0)
$puts(LB_G,116)
$puts(LB_B,0)
$puts(HB_R,160)
$puts(HB_G,0)
$puts(HB_B,220)

////////////////////////////////////////////////////

//Set bitrate colour
$if($greater(%__bitrate%,$get(SB_T)),
$puts(BR,$div($mul($sub(%__bitrate%,$get(SB_T)),255),$sub(320,$get(SB_T))))
$puts(BR_R,$add($get(LB_R),$div($mul($sub($get(HB_R),$get(LB_R)),$get(BR)),255)))
$puts(BR_G,$add($get(LB_G),$div($mul($sub($get(HB_G),$get(LB_G)),$get(BR)),255)))
$puts(BR_B,$add($get(LB_B),$div($mul($sub($get(HB_B),$get(LB_B)),$get(BR)),255)))
$puts(BR_C,$hex($get(BR_B),2)$hex($get(BR_G),2)$hex($get(BR_R),2))
,
$puts(BR_C,$get(SB_C)))

//Filename
%_path%
   
//bitrate
'['$get(BR_C)
%__bitrate%kbps$get(BR_C)
[ $div(%__samplerate%,1000)kHz$get(BR_C)]
$if(%__channels%,$ifgreater(%__channels%,2, %__channels%ch$get(BR_C),$ifgreater(%__channels%,1, Stereo, Mono)),)
']'

//Progress
$get(PB_C1)'['$get(PB_C3)%_time_elapsed%
$get(PB_C1)|$progress(%_time_elapsed_seconds%,%_time_total_seconds%,16,$get(PB_C2)#$get(PB_C1),=)|
[$get(PB_C4)%_time_total%$get(PB_C1)']']
Title: Foobar2000 format strings
Post by: Golly on 2003-03-15 16:12:28
man i suck with colours, i changed em again, this looks better (i'm talking about the playlist btw, not status bar)

if anyone has any better ideas with colours lemme know

screenshot here (http://www.geocities.com/gollystrading/foobar.html)

$puts(SB_C,0048C0)
$puts(LB_R,255)
$puts(LB_G,92)
$puts(LB_B,22)
$puts(HB_R,255)
$puts(HB_G,255)
$puts(HB_B,182)
Title: Foobar2000 format strings
Post by: anza on 2003-03-15 20:02:01
As I already told in the other thread, I changed the title formatting a bit. Actually it's just been little fine tuning, but there's also some "bigger" changes (like theprogress bar).

Quote
Playlist:
// the playlist number
DBDBDB|CCCCCC$num(%_playlist_number%,4).

// if the file is mp3PRO (has a %mp3% -tag), the first · is red
$if(%mp3%,0000FF|0000FF,DBDBDB|CCCCCC)·

// if the file hasn't got replaygain-track info, the second · is red
$if(%__replaygain_track_gain%,DBDBDB|CCCCCC,0000FF|0000FF)·

// if the file is playing, it'll show a red » in front of the "artist - title"
$if(%_isplaying%,0000FF|0000FF »,)
[ 535353|535353%artist%]
[DBDBDB|DBDBDB - %title%][ '['%comment%']']  
[$char(9)535353|535353%_length%]

System tray:
%_foobar2000_version% [playing: %genre%]

Window title:
'['%_length%']' "%title%" by %artist%

Status bar:
// shows time elapsed in the progress bar
|$progress(%_time_elapsed_seconds%,%_time_total_seconds%,20,%_time_elapsed%,'—')|

//bit- and samplerate
$char(9)[%__bitrate%kbps ][$div(%__samplerate%,1000).$substr(%__samplerate%,3,3)kHz]


The font's the same, ProFontWindows, 7
PL text color: 219, 219, 219
PL BG color: 0, 0, 0
PL selection color: 20, 20, 20
Selected item frame color: 0, 0, 0
Title: Foobar2000 format strings
Post by: musicmusic on 2003-03-15 22:56:43
my current strings, commented:

playlist

could be better, but stupid font doesnt have all the other chars, and no other font has same vertical spacing and looks nice

features: tab hack columns, new long field truncatator (using "…" char) which checks if they end in a space after trucation and eliminates it, separate now playing script (needs work) to remove truncations for current playing file and easily show it, colour transitions for current highlighted track (needs work too).

font: trebuchet ms, point 7
background: 15, 17, 19
designed for window about 750 pixels wide
selection colour: 55, 78, 128
item frame: 194, 205, 231

Code: [Select]
//now playing artist colour
$puts(artistcol,0BC886|26DF50)

//nowplayling main colour
$puts(plcol,10AFE4|12B9EF)

//enable for red nowplaying main col
//$puts(plcol,0C00D5|322DFF)

// playlist colour, old colour was c47F5e, temp disabled.
//$puts(normcol,D88163|ffAA80)

// now playing in front character
$puts(plfc,>)

// now playing separator
$puts(plsep,$char(9642))

// artist field truncatation length
$puts(tartist,33)

// title field truncatation length
$puts(ttitle,92)

// album field truncatation length
$puts(talbum,24)

// check if playing
$if(%_isplaying%,

// if playling use this for formatting
$get(plcol)
$repeat($get(plfc),4)   Now Playing:   $get(artistcol)%artist%  $get(plsep)  %title%$if(%album%,  $get(plsep)  From The Album "%album%",)  

// colours + separators
$get(plcol)$repeat($get(plfc),2)  

// display length
%_length%

// if not playing
,

// declare colour code
$get(normcol)

// store artists + truncate
$puts(artist,$ifgreater($len(%artist%),$get(tartist),$cut(%artist%,$sub($get(tartist),2))…,%artist%))
$puts(artist2,$ifgreater($len(%artist%),$get(tartist),$cut(%artist%,$sub($get(tartist),3))…,%artist%))

// artist
$transition($if($strcmp($strrchr($get(artist),' '),31),$get(artist2),$get(artist)),$rgb(99,129,217,152,70,0),$rgb(99,129,217,0,0,0))

// column
$repeat($char(9),1)

// store titles + truncate
$puts(title,$ifgreater($len(%title%),$get(ttitle),$cut(%title%,$sub($get(ttitle),2))…,%title%))
$puts(title2,$ifgreater($len(%title%),$get(ttitle),$cut(%title%,$sub($get(ttitle),3))…,%title%))

// title
$transition($if($strcmp($strrchr($get(title),' '),53),$get(title2),$get(title)),$rgb(99,129,217,0,0,0),$rgb(99,129,217,152,70,0))

// column
$repeat($char(9),3)

// redeclare colour code for column
$get(normcol)

// store album + truncate
$puts(album,$ifgreater($len(%album%),$get(talbum),$cut(%album%,$sub($get(talbum),2))…,%album%))
$puts(album2,$ifgreater($len(%album%),$get(talbum),$cut(%album%,$sub($get(talbum),3))…,%album%))

// display album
$if(%album%,
$transition($if($strcmp($strrchr($get(album),' '),22),$get(album2),$get(album)),$rgb(99,129,217,152,70,0),$rgb(99,129,217,0,0,0))
,)

// right aligned
$repeat($char(9),1)

// redeclare colour code for right aligned part of playlist
$get(normcol)

// display length
$transition(%_length%,$rgb(99,129,217,0,0,0),$rgb(99,129,217,152,70,0))

// end isplaying if statement
)


statusbar

this i am happy with.

features: virtual separators like those previously between fileinfo/status, colour custom coded progress bar with time moving towards total time. will prolly add more fields to this as i need them.

Code: [Select]
// set main text colour, BGR
$puts(colour,$rgb(77,77,77))

// set separator
$puts(sep, CDBDB1|$get(colour) )

// get colourcode
$get(colour)

// display track if present, and is not 00, with seperator
$if($strcmp(%tracknumber%,00),,Track: %tracknumber%$get(sep))

// display year if present with seperator. not using [] because dont work.
$if(%date%,Year: %date%$get(sep),)

// display bitrate with seperator
$if(%__bitrate%,%__bitrate%kbps$get(sep),)

// display channels + sep
$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,Stereo,Mono)),)
$get(sep)

// extension + sep
$upper($ext(%_filename_ext%))
$get(sep)

// trackgain,cut-off at 1dp
[Gain: $left(%__replaygain_track_gain%,$add($strchr(%__replaygain_track_gain%,.),1)) dB$get(sep)]

// display extra infos, disabled
//[%__extrainfo%$get(sep)]

// second thing, disabled
// $select($add($mod(%_time_elapsed_seconds%,4),1),$char(8213),' \',' |',' /')

// progress slider, disabled
// 1000D2$progress(%_time_elapsed_seconds%,%_time_total_seconds%,35,0392C0%_time_elapsed%056B1F,'»')

// custom progress bar

// length, not including indicator. $progress counts indicator as single char so value here is one higher than that in $progress
$puts(plen,35)

// left char
$puts(leftchar,«)

// right char
$puts(rightchar,»)

// indicator
$puts(mbit,%_time_elapsed%)

// offset for first/last position, leave alone
$puts(offset,

// due to decimals getting cut off, effectively rounding them down, we check if this has happened as the only decimal would be .5 and this should round up. we could actually get the same effect by adding one before divide always instead of using an $ifgreater statement
$ifgreater(
$div(%_time_total_seconds%,$get(plen)),
$mul($div(%_time_total_seconds%,$mul($get(plen),2)),2),

// these lines calculate half of the period of time that the indicator takes to move one char
$add($div(%_time_total_seconds%,$mul($get(plen),2)),1),
$div(%_time_total_seconds%,$mul($get(plen),2))

//close $ifgreater ad $put
))

// calculate how many left chars to show
$puts(gone,$div($mul($add(%_time_elapsed_seconds%,$get(offset)),$get(plen)),%_time_total_seconds%))

// before colour
2222EE
//1000D2

// show before part
$repeat($get(leftchar),$get(gone))

// indicator col
0392C0

// show indicator
$get(mbit)

// right part col
0B8A5E
//0B9565
//056B1F
//0A9E6A

//show right part, generated from whats currently on left part to prevent rounding problems
$repeat($get(rightchar),$sub($get(plen),$add($get(gone),0)))

// colour
$get(colour)

// total time
[$get(sep)%_time_total%]$get(sep)


edit: updated strings. if %_volume% comes, i already have a script for it 
edit: minor fix for forum as i was asked about it. and added colours for playlist item frame/selection etc.
Title: Foobar2000 format strings
Post by: Golly on 2003-03-16 00:25:00
Quote
progress bar feature req
ability to use different chars for before and after indicator, e.g. <<<<<<<<56%>>>>>>>

yeah, i just made this dude, go here (http://www.hydrogenaudio.org/show.php/act/ST/f/27/t/7546)
Title: Foobar2000 format strings
Post by: musicmusic on 2003-03-16 00:54:40
Quote
yeah, i just made this dude, go here (http://www.hydrogenaudio.org/show.php/act/ST/f/27/t/7546)

hehe, made my own custom progress silder instead.

my progress silder part of status bar is now:

Code: [Select]
// custom progress bar

// length, not including indicator. $progress counts indicator as single char so value here is one higher than that in $progress
$puts(plen,35)

// left char
$puts(leftchar,«)

// right char
$puts(rightchar,»)

// indicator
$puts(mbit,%_time_elapsed%)

// offset for first/last position, leave alone
$puts(offset,
$ifgreater(
$div(%_time_total_seconds%,$get(plen)),
$mul($div(%_time_total_seconds%,$mul($get(plen),2)),2),
$add($div(%_time_total_seconds%,$mul($get(plen),2)),1),
$div(%_time_total_seconds%,$mul($get(plen),2))
))

// calculate how many left chars to show
$puts(gone,$div($mul($add(%_time_elapsed_seconds%,$get(offset)),$get(plen)),%_time_total_seconds%))

// before colour
2222EE

// show before part
$repeat($get(leftchar),$get(gone))

// indicator col
0392C0

// show indicator
$get(mbit)

// right part col
0B8A5E

//show right part, generated from whats currently on left part to prevent rounding problems
$repeat($get(rightchar),$sub($get(plen),$add($get(gone),0)))


edit: whoops forgot i put this here to. this is the updated version im am using, in fact ill edit my whole string above. whoever used it (anza,bluescreenjunky) you may want to change to this code instead, it works better.
Title: Foobar2000 format strings
Post by: Spadge on 2003-03-16 02:46:58
Here's mine:

Code: [Select]
//If isplaying = true
$ifgreater(%_isplaying%,0,

//////////////////////////////////Do this

//     Playlist Number
0000FF%_playlist_number%$repeat($char(9),2)'│'

//     Artist
$if(%artist%,0000FF$upper(%artist%),'UNKNOWN ARTIST')$repeat($char(9),17)'│'

//     Title
$if(%title%, 0000FF$upper(%title%),'UNKNOWN TITLE')$repeat($char(9),19)

//     Length
'['0000FF%_length%']'$repeat($char(9),3)'│'

//     Album
$if(%album%, 0000FF$upper(%album%),'UNKOWN ALBUM')$repeat($char(9),20)

//     Tracknumber
$if(%tracknumber%,0000FF '[#'$num(%tracknumber%,2)']',' ')$repeat($char(9),3)
' '

//////////////////////////////////////////Otherwise do this

//      Playlist Number
,%_playlist_number%$repeat($char(9),2)'│'

//     Artist
$if(%artist%,%artist%,'UNKNOWN ARTIST')$repeat($char(9),17)'│'

//     Title
$if(%title%,%title%,'Unkown Title')$repeat($char(9),19)

//     Length
'['%_length%']'$repeat($char(9),3)'│'

//      Album
$if(%album%,%album%,'Unkown Album')$repeat($char(9),20)

//     Tracknumber
$if(%tracknumber%,'[#'$num(%tracknumber%,2)']','    ')$repeat($char(9),3)' ')


font: Century Gothic (Bold)

Playlist Backgroud: Black
Playlist Font Colour: White


EDIT: Added Colours
Title: Foobar2000 format strings
Post by: Ghim on 2003-03-16 08:27:49
Why don't you just use : $if(%_is_playing%, , ) instead of $ifgreater(%_is_playing%, , ) ??

And you could easily make your code shorter...

by example :
$if(%_is_playing%,$puts(color,0000FF),$puts(color,))
Title: Foobar2000 format strings
Post by: anza on 2003-03-16 09:22:31
As people have begun to use colors in their status-bars, I decided to do so also. So here's my new formatting for the status bar:
Code: [Select]
$puts(barlength,20)
$puts(elapsed,|)
$puts(timeleft,—)
$puts(pos,$select($add($mod(%_time_elapsed_seconds%,4),1),'—,'\','|','/'))
$puts(gone,$div($mul(%_time_elapsed_seconds%,$get(barlength)),%_time_total_seconds%))

'['0000FF
$repeat($get(elapsed),$get(gone))
000000
$get(pos)
$repeat($get(timeleft),$sub($get(barlength),$get(gone)))
']'

$char(9)
$ifgreater(%__bitrate%,0,0000FF,)
$ifgreater(%__bitrate%,99,0080FF,)
$ifgreater(%__bitrate%,160,008000,)
$ifgreater(%__bitrate%,319,FFFF00,)
%__bitrate%kbps

$ifgreater(%__samplerate%,0,0000FF,)
$ifgreater(%__samplerate%,22050,008000,)
$ifgreater(%__samplerate%,44100,FFFF00,)
$div(%__samplerate%,1000).$substr(%__samplerate%,3,3)kHz


Should look something like this:
[|||||||||/——————————] 192kbps 44.1kHz
Where the "/" is the rotating thing
Title: Foobar2000 format strings
Post by: BlueScreenJunky on 2003-03-16 11:29:03
Okay, here's mine. It's rather simple, I've shamelessly stolen what others have done, but I like it  :-)

Screenshot here (http://bluescreenjunky.free.fr/foobar/foobar.gif)


Playlist :
Code: [Select]
9E9E9E$num(%_playlist_number%,3). $if(%artist%,%artist%,'Unknown Artist') $if(%album%, - %album%,)


$repeat($char(9),7)
$if(%title%,%title%,%_filename%)
$repeat($char(9),6)

$ifgreater(%__bitrate%,0,0000FF,)
$ifgreater(%__bitrate%,95,4080FF,)
$ifgreater(%__bitrate%,127,00CC00,)
$ifgreater(%__bitrate%,159,008000,)
$ifgreater(%__bitrate%,191,A00000,)
$ifgreater(%__bitrate%,255,FF0000,)


%__bitrate%kbps $ext(%_path%)

$repeat($char(9),3)
%_length%


Status bar :
Code: [Select]
$puts(plen,50)
$puts(leftchar,|)
$puts(rightchar,|)

[%_time_elapsed%]

$puts(gone,$div($mul(%_time_elapsed_seconds%,$get(plen)),%_time_total_seconds%))

$if(%_time_total%,
'['
$repeat($get(leftchar),$get(gone))
919191$get(mbit)
B2B2B2$repeat($get(rightchar),$sub($get(plen),$get(gone)))
']'
[%_time_total%], '['Total Time Unavailable']')

$char(9)
%__bitrate%kbps
$div(%__samplerate%,1000) kHz


Update !!! : Is now compatible with files which don't have total time (like TFMX). The status bar displays a "total time unavailable" message instead of the progress bar becoming insanely long. (hey, I actually found that myself  )
Title: Foobar2000 format strings
Post by: penvzila on 2003-03-16 18:55:29
screenshot (http://www.geocities.com/penvzila/yetanotherfoobarscreenshot.txt)
Title: Foobar2000 format strings
Post by: Rommel on 2003-03-16 20:04:19
@penvzila
the extension of the file in your screenshot link is .txt 
I think your image is .png 
Title: Foobar2000 format strings
Post by: spase on 2003-03-16 21:38:13
here we are... format string version 2.0... complete with imaginary columns and a jazzy screenshot!

i havent inspected everyone elses strings, but this one makes some special provisions for .cue files... i havent seen such things anywhere else.

Code: [Select]
$if(%_isplaying%,1E67FF|FFFFFF,)$pad_right(%_playlist_number%,4) $repeat($char(9),1) 808080- $if(%_isplaying%,1980FF|FFFFFF,)$if($stricmp($right(%_filename_ext%,3),cue),%TRACK_ARTIST%,$if2(%artist%,'Unknown Artist'))$repeat($char(9),8) 808080- $if(%_isplaying%,1980FF|FFFFFF,)$if2(%title%,%_filename%)$repeat($char(9),10) 808080- $if(%_isplaying%,1980FF|FFFFFF,)['('$num(%tracknumber%,2)') ']$if2(%album%,'Unknown Album')$repeat($char(9),7) 808080- $if(%_isplaying%,1980FF|FFFFFF,)[%genre%]$repeat($char(9),6) 808080- $if(%_isplaying%,1980FF|FFFFFF,)%_length%


screenshots: Desktop screenshot (http://musepack.org/misc/Desktop_screenshot.png) and foobar2000 screenshot (http://musepack.org/misc/fb2k_screenshot.png)
Title: Foobar2000 format strings
Post by: billcow on 2003-03-16 21:41:35
Ahh, finally back home. Typing on a webtv is like typing on a soda-soaked laptop keyboard, you get no feedback from pushing the keys to begin with and when you actually manage to press a key enough, someone steps in the way of the IR beam.

Quote
Quote
And my personal opinion about solving the scripting problem - formatting plugins. The script could include something like '$function(component,function,parameters', foobar would call the corrosponding component DLL with the function name and the parameters, the DLL would return a string, and foobar would put that in the output.


An interesting idea, but I think this would still allow for the type of problems that Peter seems to want to avoid, mainly that with this level of power in scripting, the possibility to freeze foobar with a bad script becomes much easier.

Yeah, but then it's the plugin dev's fault. Thus bringing us to...
Quote
Quote
It wouldn't have the problem with easily crashing foobar, or at least not the problems associated with that, because presumably, anyone who can write a plugin should know better than to complain to Peter when their untested code crashes his program.


Hrmm.. I do recall this very thing happening with one of the early fb2k plugins for which links were removed from this forum

While technically people shouldn't bitch at Peter, I'm not so sure it would actually happen that way.  No matter how clearly you try to point out possible risks or problems, people still seem to find a way to be surprised when it happens.

Heh. I was actually referring to the fact that if you have to write a DLL to crash foobar, then you are either (a) competent, and thus won't do it, (B) incompetent, but smart enough not to give other people your crappy code or complain to peter, © incompetent, and stupid enough to complain to peter, or (d), incompetent, and stupid enough to give people your crappy code anyway. In the first two cases, power to them. In case ©, well, at least they can be publically humiliated, and are a minority besides. In the final case, which is hopefully also the least likely, well, there's not much that can be done aside from judicious application of various forum admin's censoring abilities. Seeing as the problems that have been had in the past with bad plugins seem to have stopped, the class c & d devs apparently have learned their lesson.

Quote
Quote
It wouldn't have issues with bloating foobar, because all the code would be in a seperate file.


True, though I don't think that adding the type of functionality necessary to have something like an $eval function (which would allow for recursion) would really add too much bloat though.

A literal $eval function wouldn't make much bloat, correct. But if every possible eventuality that would lead to crashes were caught, then it might. I don't have much experience in that area, so I could be wrong. In any case, $eval is probably a bad idea anyway, so it doesn't matter much.

Quote
Quote
And if someone wanted to get really crazy, they could write their own script language as a function. Then they could implement anything from Perl to COBOL to Brainf*ck.


It would be pretty cool to have a plugin which could leverage the power of languages like Perl or Python for string manipulation.  I wonder if the current SDK would allow for something like this.

I don't think the current SDK could allow for this - at least not without *really* cheating. Basically, it would involve making a plugin that adds a metadata tag to each file containing whatever the plugin wants to generate, probably by calling an implementation of whatever scripting language it wanted to use, hooked to provide the metadata already in the file. You'd then have to set the formatting tag to be a reference to the tag added by the script. If you feel like going even further and explicitly ignore SDK directions, you could go ahead and override the titleformat class that foobar has built in which takes care of that whole thing.

Quote
While we're at it, I think it would be rather cool if a plugin were made that would allow for loading an entire tagz display setup, along with fonts, color setups, etc, from an archive of sorts.  That way people could distribute tagz display schemas easily.  Functionality could even be added to select from different archives on the fly and have them update the playlist in realtime.  Kind of like a skin browser, but just for tagz.  It seems rather like a logical progression to me given the increasing complexity of the scripts we are seeing and the continued interest people have in creating new layouts and trying out new ideas.

That's one thing I was thinking of. Does thinking the same thing as you make me a great mind by default?
Title: Foobar2000 format strings
Post by: Somebody on 2003-03-16 23:03:51
Quote
@penvzila
the extension of the file in your screenshot link is .txt  
I think your image is .png 

That's the only way to trick geocities into having the image be displayed without bitching at you whenever you click the link.
Title: Foobar2000 format strings
Post by: justinj88 on 2003-03-17 01:52:40
Here's my playlist string:
Code: [Select]
1E1ECA$pad(%_playlist_number%,4)':' 
DC0C35$pad(%artist%,25)
0080FF$pad('-['$num(%date%,4)']-',9)
5B5B5B$pad(%album%,40)
0000FF$pad($num(%tracknumber%,2),4)
DC0C35$pad(%title%,50)
0080FF$pad(%__bitrate%,3)kbps


This is a screenshot of how it looks (http://justin.yi.org:99/foobar.png).
Title: Foobar2000 format strings
Post by: billcow on 2003-03-17 04:22:51
that's one keen statusbar you got there in your screenshot. you wouldn't by any chance be able to post it too, would you?
Title: Foobar2000 format strings
Post by: voltron on 2003-03-17 05:00:17
My updated formatting, for anyone who loves simplicity.

Playlist
Code: [Select]
$num(%_playlist_number%,2)| [%artist% - ]$if(%title%,['['%album%[ #[%disc%/]$num(%tracknumber%,2)]'] ']%title%,%_filename%)[    %_length%]

System Tray
Code: [Select]
[%artist% - ][%album% - ][$num(%tracknumber%,2) - ]$if(%title%,%title%,%_filename%)

Window title
Code: [Select]
$if(%title%,%title%,%_filename%)

Status bar
Code: [Select]
%__bitrate%/$cut(%__samplerate%,2) - %_time_elapsed%/%_time_total%

Copy command
Code: [Select]
[%artist% - ][%album% - ][$num(%tracknumber%,2) - ]$if(%title%,%title%,%_filename%) - [%_length%]


And this is what it looks like in all its glory (5.6kb GIF):
(http://sa.nextwish.org/Hosted/fb2k.gif)

Comments are welcome.
Title: Foobar2000 format strings
Post by: Rommel on 2003-03-17 13:10:12
Quote
That's the only way to trick geocities into having the image be displayed without bitching at you whenever you click the link.

...ah ok
thanks for the trick
Title: Foobar2000 format strings
Post by: floyd on 2003-03-17 13:15:33
Anyone know if it would be possible to use title formatting to somehow 'scroll' fields that are contain too many characters instead of truncating them?  ie.  if the song title is truncated it scrolls slowly horizontally in order to be read easily.  Probably would be best used on just the currently playing song, or else the whole playlist would sometimes be scrolling
Title: Foobar2000 format strings
Post by: billcow on 2003-03-17 15:22:54
On the playlist, there isn't any way to scroll a field, for a playing file or otherwise.

The statusbar, however is a different story. Since you have access to the %_elapsedtime_seconds% variable, youi can use something like the following (usual warning applies - the general gist of the code is correct, if it doesn't work i probably left out a parentheses somewhere)

Code: [Select]
// What text to scroll
$puts(FIELD,%title%)
// how many characters it's allowed.
$puts(LENGTH,10)

// Start of displayed portion
$puts(START1,$mod(%_time_elapsed_seconds%,$len($get(FIELD))))
// End of displayed portion
$puts(END1,$mod($add($get(START1),$get(LENGTH)),$len($get(FIELD))))
// If it wraps around the edge of the string, handle that
$if($greater($get(START1),$get(END1)),
// clip two characters off the end to replace with elipses
$puts(START2,0)$puts(END2,$sub($get(END1),2))$puts(END1,$len($get(FIELD))),
// Otherwise, it's fine on it's own
$puts(START2,0)$puts(END2,0)
$substr($get(FIELD),$get(START1),$get(END1))
// if the second field was set we need to add ellipses
$if($greater($get(END2),0),...,)
$substr($get(FIELD),$get(START2),$get(END2))


That should do it. Change the two variables at the top to change what's displayed. I will scroll at a constant speed of 1 char/second. It can be done slower by changing any reference to %_time_elapsed_seconds% to something like $div(%time_elapsed_seconds%,2) or somthing like that, but it can't be done faster, since the time can't be resolved at a higher resolution than seconds.

Note that it's not extremely robust - if the value of FIELD is less than LENGTH characters long i don't know what this'll do. Plus, since almost nobody has their windows fonts configured such that statusbars have a fixed-width font, the width of the field will be constantly changing unless the tag is something like -=+=-=+=-=+=- or something else where all the characters are the same width.

Which brings me to a feature request - configurable statusbar font. Since foobar already custom-draws the statusbar it wouldn't bring on any speed loss (since there is no speed advantage to using the default fonts. It's actually faster, since you can hold onto the same font reference as opposed to having to request it every time you draw text) or any bloat (interface or code-wise) aside from a button somewhere to select the font.
Title: Foobar2000 format strings
Post by: billcow on 2003-03-17 21:26:47
Last version doesn't work.

Code: [Select]
$puts(FIELD,$get(FIELD) *** )
$puts(START1,$mod(%_time_elapsed_seconds%,$len($get(FIELD))))
$puts(END1,$mod($add($get(START1),$get(LENGTH)),$len($get(FIELD))))
$if($greater($get(START1),$get(END1)),
$puts(END2,$get(END1))$puts(END1,$len($get(FIELD))),
)
$substr($get(FIELD),$get(START1),$get(END1))
$substr($get(FIELD),0,$get(END2))


This does. It's cleaner anyway. The instructions are the same. It works in either the Title Bar, the Status Bar or the System Tray strings. Here:
Code: [Select]
$puts(
FIELD,$if(%title%,%title% - %artist% ['['%album%']'],%_filename% *** )
)
$puts(LENGTH,$len($get(FIELD)))

$puts(START1,$mod(%_time_elapsed_seconds%,$len($get(FIELD))))
$puts(END1,$mod($add($get(START1),$get(LENGTH)),$len($get(FIELD))))
$if($greater($get(START1),$get(END1)),
$puts(END2,$get(END1))$puts(END1,$len($get(FIELD))),
)
$substr($get(FIELD),$get(START1),$get(END1))
$substr($get(FIELD),0,$get(END2))

< %_foobar2000_version% >

Is what I am now using for the Titlebar string. It is the default titlebar string, except it scrolls. I put the little ***s in to seperate the beginning from the end, winamp style. The foobar identifier and version number don't scroll, that way they don't usually show up in the taskbar. I set the max length to the length of the whole string, that way if i can see the whole titlebar, i can still see the whole thing, but still get the scrolling in the taskbar.

Good idea on that, BTW. It's definately got a permanent spot in my config file.
Title: Foobar2000 format strings
Post by: ranor on 2003-03-17 21:49:13
While playing around with anza's replaygain/mp3pro indicators, I came up with this. Simple, effective and pretty cool looking IMHO.  B)

screenshot (http://www.redrival.com/fnord/foobar.png)

Code: [Select]
// the playlist number (if playing make black)
$if(%_isplaying%,000000|000000$num(%_playlist_number%,3).,0636363|636363$num(%_playlist_number%,3).)

// if the file is mp3PRO (has a %mp3% -tag), the first · is red
$if(%mp3%,0000FF|0000FF,999999|999999)ù

// if the file hasn't got replaygain-track info, the second · is red
$if(%__replaygain_track_gain%,999999|999999,0000FF|0000FF)ù

// -if playing make black-
$if(%_isplaying%,
// artist
000000|000000%artist%
// separator
999999|999999 ù
// album
000000|000000 %album% '('%date%')'
// separator
999999|999999 ù
// title
000000|000000 $num(%tracknumber%,2). %title%
// length
$char(9)000000|000000%_length%,

// -else if not playing make grey-
// artist
636363|636363%artist%
// separator
999999|999999 ù
// album
636363|636363 %album% '('%date%')'
// separator
999999|999999 ù
// title
636363|636363 $num(%tracknumber%,2). %title%
// length
$char(9)636363|636363%_length%
)


Playlist Font: lime 8pt (can be found in the blackbox font pack at http://www.desktopian.org/bb/ (http://www.desktopian.org/bb))
Playlist Background Color: White (255, 255, 255)
Playlist Selection Color: 235, 235, 235
Selected Item Frame: 154, 154, 154
Title: Foobar2000 format strings
Post by: floyd on 2003-03-17 22:21:16
Quote
Last version doesn't work.

[snip]

This does. It's cleaner anyway. The instructions are the same. It works in either the Title Bar, the Status Bar or the System Tray strings. Here:

Thanks for trying the idea.  However on my system with f2k .586 w/ your sample code I get character scrolling in one space only.  ie.  if the album title is 'One', the O appears, and is replaced by the n, which is replaced by the e.  It doesn't actually scroll.
Title: Foobar2000 format strings
Post by: billcow on 2003-03-17 22:44:53
That's probably because I forgot to tell you to specify the number of characters displayed with $puts(WIDTH,###)
Title: Foobar2000 format strings
Post by: justinj88 on 2003-03-17 23:16:50
Quote
that's one keen statusbar you got there in your screenshot. you wouldn't by any chance be able to post it too, would you?

Here it is:

Code: [Select]
:::FB006A%_time_elapsed%:::$progress($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),100,100,595959$num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),2)'%',808080'|')808080'|' :::408000%_time_remaining%:::0CB407 '('%_time_total%')' 0059B3Track Peak:$if(%__replaygain_track_peak%,%__replaygain_track_peak%, None) 

$puts(SB_T,127)
$puts(SB_C,0000FF)

$puts(LB_R,20)
$puts(LB_G,128)
$puts(LB_B,20)
$puts(HB_R,0)
$puts(HB_G,0)
$puts(HB_B,255)

$if($greater(%__bitrate%,$get(SB_T)),
$puts(BR,$div($mul($sub(%__bitrate%,$get(SB_T)),255),$sub(320,$get(SB_T))))
$puts(BR_R,$add($get(LB_R),$div($mul($sub($get(HB_R),$get(LB_R)),$get(BR)),255)))
$puts(BR_G,$add($get(LB_G),$div($mul($sub($get(HB_G),$get(LB_G)),$get(BR)),255)))
$puts(BR_B,$add($get(LB_B),$div($mul($sub($get(HB_B),$get(LB_B)),$get(BR)),255)))
$puts(BR_C,$hex($get(BR_B),2)$hex($get(BR_G),2)$hex($get(BR_R),2))
,
$puts(BR_C,$get(SB_C)))

$get(BR_C)%__bitrate%kbps
Title: Foobar2000 format strings
Post by: musicmusic on 2003-03-17 23:34:46
check my playlist string on page 6, ive added some basic transitions for highlighted track using $transition(), will work on it later. $transition could be something to combine with progress slider & $substr for some interesting effect..
Title: Foobar2000 format strings
Post by: playerman on 2003-03-17 23:52:57
Quote
can i do something like:
'when 2nd backslash is found cut off the rest of the string and including that backslash' type of display on playlist? (for the paths)

edit:
so i get something like 'g:\music...' or 'd:\mp3...'

this works:

$left(%_path%,$sub($add($strchr($right(%_path%,$sub($len(%_path%),$strchr(%_path%,\))),\),$strchr(%_path%,\)),1))...
Title: Foobar2000 format strings
Post by: penvzila on 2003-03-18 00:39:42
Quote
Quote
@penvzila
the extension of the file in your screenshot link is .txt  
I think your image is .png 

That's the only way to trick geocities into having the image be displayed without bitching at you whenever you click the link.

It should render (i know it does in IE and phx)_
Title: Foobar2000 format strings
Post by: penvzila on 2003-03-18 00:41:14
wops
Title: Foobar2000 format strings
Post by: penvzila on 2003-03-18 00:41:29
Quote
...wont capture. HypserSnap has a crap GIF encoder, JPEG is even worse at 100% quality.)...

Use irfanview (google it), or, heck, alt+printscreen and paint saves as png.
Title: Foobar2000 format strings
Post by: penvzila on 2003-03-18 00:46:29
Quote
Here's my playlist string:
Code: [Select]
1E1ECA$pad(%_playlist_number%,4)':' 
DC0C35$pad(%artist%,25)
0080FF$pad('-['$num(%date%,4)']-',9)
5B5B5B$pad(%album%,40)
0000FF$pad($num(%tracknumber%,2),4)
DC0C35$pad(%title%,50)
0080FF$pad(%__bitrate%,3)kbps


This is a screenshot of how it looks (http://justin.yi.org:99/foobar.png).

YAYY!!! Someone using my statusbar!!! Although I've changed it to include somebody's dancing kriby, I cant remember who:

Code: [Select]
:::FB006A%_time_elapsed%:::$progress($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),100,100,595959$num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),2)'%',808080'|')808080'|':::408000%_time_remaining%:::0CB407'('%_time_total%')'0059B3Track Peak:$if(%__replaygain_track_peak%,%__replaygain_track_peak%,None) $puts(SB_T,127)
$puts(SB_C,0000FF)

$puts(LB_R,20)
$puts(LB_G,128)
$puts(LB_B,20)
$puts(HB_R,0)
$puts(HB_G,0)
$puts(HB_B,255)
$if($greater(%__bitrate%,$get(SB_T)),
$puts(BR,$div($mul($sub(%__bitrate%,$get(SB_T)),255),$sub(320,$get(SB_T))))
$puts(BR_R,$add($get(LB_R),$div($mul($sub($get(HB_R),$get(LB_R)),$get(BR)),255)))
$puts(BR_G,$add($get(LB_G),$div($mul($sub($get(HB_G),$get(LB_G)),$get(BR)),255)))
$puts(BR_B,$add($get(LB_B),$div($mul($sub($get(HB_B),$get(LB_B)),$get(BR)),255)))
$puts(BR_C,$hex($get(BR_B),2)$hex($get(BR_G),2)$hex($get(BR_R),2))
,$puts(BR_C,$get(SB_C)))$get(BR_C)%__bitrate%kbps


913D9A$select($add($mod(%_time_elapsed_seconds%,30),1),'<(^-^)v','<(^-^<)','^(^-^<)','^(^-^)^','<(-.-)>','(>.<)','<(O.<)','<(O.O)>','<(o.O)v','v(o.o)v','^(º.o)v','^(º-º)^','v(O.º)^','v(O.o)>','(>o.o)>','(>-.-)^','^(^.^)^','<(^-^)>','v(^.^)v','(>.<)','<(o.o)>','<(O.o)>','<(o.O)>','<(O.o)>','<(o.O)>','(>.<)','<(º.o)>','<(o.º)>','<(º.o)>','<(º-º)v'
)

 8000FF={
$get(BR_C)$select($add($mod(%_time_elapsed_seconds%,12),1),'f','fo','foo','foob','fooba','foobar','fooba','foob','foo','fo','f',' ')
8000FF}= 


I could tell because no one but me is stupid enough to put %__replaygain_track_peak% in the statusbar.
Title: Foobar2000 format strings
Post by: playerman on 2003-03-18 01:40:48
Maybe i'm just slow, but i just discovered this and i haven't seen it mentioned here.

You can get coloms relative to the window with simply by using $char(9) instead of pad or padcut.

Any $char(9) used before the last one (which aligns text to the right), will cause a 'relative' colom.

If the first colomn is playlist number and the second contains some title information, it's best to align those the old fashioned way and use $char(9) for the third and subsequent coloms (other than right aligned coloms).
A colom can be made wider by using $char(9)$char(9) in sequence.

Only downside is it seems $char(9) resets the colors, so if you use _isplaying to highlight the currently playing song you'll have to re-assign that color after using $char(9). I found get and put come in handy here:
$put(playing,$if(%_isplaying%,44DDDD|44DDDD,EB9E52|EB9E52)) 

which would be used like this:
$char(9)$get(playing)

Though that's probably old news for most of you.

I prefer a small window but i want to see most of the song title which is in the second colom after tracknr.
I use two $char(9) before the 3rd colom, so the 1st + 2nd colom is two relative tabs wide.
Then one $char(9) before the 4th colom (artist), so the 3rd colom is one relative tab wide. In my case most the 4th colom (album) is cut off by the right aligned tracktime.
Title: Foobar2000 format strings
Post by: billcow on 2003-03-18 02:05:38
Actually, that feature was added quietly for .58. I think there was one post about it, but it's on i think the third page of the forum already, so it's been mostly ignored.

The gist of it was that if you use a whole bunch of $char(9)s (which actually is equivilant to inserting a "tab", btw), you can make different colums be different sizes relative to each other.
Title: Foobar2000 format strings
Post by: ranor on 2003-03-18 02:10:31
I just updated my screenshot. Take a look (http://www.redrival.com/fnord/foobar.png). I'm really quite proud of it. 
Title: Foobar2000 format strings
Post by: anza on 2003-03-18 14:46:59
Quote
That's probably because I forgot to tell you to specify the number of characters displayed with $puts(WIDTH,###)

So where should I put the $puts(WIDTH,###)  ? No matter where I put it it still scrolls only one letter

Oh, and I did change the ### to a number
Title: Foobar2000 format strings
Post by: musicmusic on 2003-03-18 16:59:14
subtle colour fader for status bar if anyones interested:

Code: [Select]
$puts(br,255)
$puts(bg,0)
$puts(bb,0)
$puts(fr,0)
$puts(fg,255)
$puts(fb,255)

$rgb(

$add($div($mul(%_time_elapsed_seconds%,$sub($get(fr),$get(br))),%_time_total_seconds%),$get(br)),

$add($div($mul(%_time_elapsed_seconds%,$sub($get(fg),$get(bg))),%_time_total_seconds%),$get(bg)),

$add($div($mul(%_time_elapsed_seconds%,$sub($get(fb),$get(bb))),%_time_total_seconds%),$get(bb)))

This text will fade as you get further into the song.



the colour will fade to the other one as you progress through the song. br = before red, bg = before green etc.
Title: Foobar2000 format strings
Post by: musicmusic on 2003-03-18 22:04:08
Quote
So where should I put the $puts(WIDTH,###)  ? No matter where I put it it still scrolls only one letter

Oh, and I did change the ### to a number

if you cant get his to work, try mine, it looks somewhat more complicated but works for me.

Code: [Select]
////scroller setup

//text to scroll
$puts(scrolltext,%artist% - %title% // )

//length of scroll
$puts(length,10)

////scroller

//check if length greater than string. if so, do not scroll.
$ifgreater($get(length),$len($get(scrolltext)),$get(scrolltext),

//calc char to start from
$puts(from,$add($mod(%_time_elapsed_seconds%,$len($get(scrolltext))),1))

//calc char to end with
$puts(to,$add($mod(%_time_elapsed_seconds%,$len($get(scrolltext))),$get(length)))

//display scroller
$substr($get(scrolltext),$get(from),$get(to))$ifgreater($add($get(to),1),$len($get(scrolltext)),$substr($get(scrolltext),1,$sub($get(to),$len($get(scrolltext)))),))
Title: Foobar2000 format strings
Post by: fenterbug on 2003-03-18 23:58:36
I hate to be the ignorant one here, but where did everyone learn about $puts(), $get(), and $rgb()? They're not documented in the app that I can see...

Oh, and I'm still working on my playlist string, but here's my status bar string. Uses the dancing Kirby that penvzila got from "someone" and the fading color from musicmusic. My only issue is that Kirby makes everything shift when he changes widths.

Code: [Select]
$puts(br,0)
$puts(bg,128)
$puts(bb,0)
$puts(fr,255)
$puts(fg,0)
$puts(fb,0)

// Fading color!!
$puts(rp,$add($div($mul(%_time_elapsed_seconds%,$sub($get(fr),$get(br))),%_time_total_seconds%),$get(br)))
$puts(gp,$add($div($mul(%_time_elapsed_seconds%,$sub($get(fg),$get(bg))),%_time_total_seconds%),$get(bg)))
$puts(bp,$add($div($mul(%_time_elapsed_seconds%,$sub($get(fb),$get(bb))),%_time_total_seconds%),$get(bb)))

// Dancing Kirby!!
913D9A$select($add($mod(%_time_elapsed_seconds%,30),1),'<(^-^)v','<(^-^<)','^(^-^<)','^(^-^)^','<(-.-)>','(>.<)','<(O.<)','<(O.O)>','<(o.O)v','v(o.o)v','^(º.o)v','^(º-º)^','v(O.º)^','v(O.o)>','(>o.o)>','(>-.-)^','^(^.^)^','<(^-^)>','v(^.^)v','(>.<)','<(o.o)>','<(O.o)>','<(o.O)>','<(O.o)>','<(o.O)>','(>.<)','<(º.o)>','<(o.º)>','<(º.o)>','<(º-º)v'
)

// Title!!
$char(9)%artist%' »» '%title% '('%album%'/'$num(%tracknumber%,2)')'

// Progress Bar!!
$char(9)'['
$progress(%_time_elapsed_seconds%,%_time_total_seconds%,100,$rgb($get(rp),$get(gp),$get(bp))$num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),2)'%','-')
']'

// Time
$char(9)'('CC3366%_time_elapsed%/CC3366%_time_total%')'
Title: Foobar2000 format strings
Post by: ZiY0N on 2003-03-19 05:36:43
http://home.attbi.com/~billamral/TAGZ.TXT (http://home.attbi.com/~billamral/TAGZ.TXT)

Awsome documentation for tagz imo.


Thanks bamral, case, death, dibrom, lking, kode54, musicmusic
Title: Foobar2000 format strings
Post by: billcow on 2003-03-19 05:43:47
The dancing kirby originated from someone on the IRC channel the night before .58 was officially released and everybody on the channel was fooling with it's enhanced statusbar.

The original version was significantly simpler than that, but that's where it started from. I can't remember who made the first version.
Title: Foobar2000 format strings
Post by: Dibrom on 2003-03-19 10:58:34
Here's what I've come up for a playlist script:

http://static.hydrogenaudio.org/extra/dibr...gz-1024x768.txt (http://static.hydrogenaudio.org/extra/dibrom/tagz/playlist-tagz-1024x768.txt)

It won't work with the current fb2k (at least not without removing a few elements) since the editarea is limited to 30k characters (yes, this is longer than that), but that's fixed in an upcoming version.

Basically the idea is to have an easily reconfigurable, full featured playlist formatting template.  Most of it is rather self-explainitory if you read the comments.  You can easily change color, justification, padding characters, column width, etc., per "element", which you can also specify as being a column (which will create dividers around the string).  You can even turn off an element if you like, without having to remove all the code manually.  Element ordering can also be changed by simply modifying a number.  Color safe truncation is performed per element if the string being used is longer than the specified allowed length.  There are some other misc things that can be done if you take a look at the code.

Future features will probably include a setup for predefined column widths for certain popular resolutions, along with seamless columns and paddings support for non-monospace fonts based on $char(9).

Oh, and the "elements" I use are completely configurable, you can change them if you like, add more or less, etc.  All you need to do is add a new set of defines following the same conventions as the other, add an entry under the "//element ordering" section, and either add or remove another element rendering block:

Code: [Select]
// --------------------------------------------------------------------------------------- //
// [ELEMENT RENDERING] //

[...bunch of code removed...]

//END IF ACTIVE
,)


There needs to be one of these big blocks of code per element unfortunately (yes, it's rather painful not having a way to repeat "functions" ).

The drawback to this massive script is that it's slow.. heh.  If you have a low end cpu, it's probably not worth using.

Anyway, enjoy or something.  If someone would like to come up with a nice default color formatting scheme for me to implement (this one allows for fancy color setups, but is black and white by default) that'd be cool.  Also, if anyone finds some weird bugs or something, it'd be nice to hear about it.
Title: Foobar2000 format strings
Post by: musicmusic on 2003-03-19 14:33:31
Quote
http://home.attbi.com/~billamral/TAGZ.TXT (http://home.attbi.com/~billamral/TAGZ.TXT)

Awsome documentation for tagz imo.


Thanks bamral, case, death, dibrom, lking, kode54, musicmusic

hehe, didnt know my name was in that.

he may want to add:

$progress2(a,b,c,d,e) - alternate progress slider. $progress2(%_time_elapsed_seconds%,%_time_total_seconds%,20,'#','=') will give #####====== which will progress into #########==
$transition(a,b,c) - text colour transitions. a is string, b is start colour, c is end colour. (use colour codes)
$rgb(a,b,c,d,e,f) - rgb colour codes. a = red, b = green, c = blue, d = selected red, e = selected green, f = selected blue.

dibrom: damn that's crazy! i cut out your coments to get it <30k to try. I would use it but i dont want fixed width font, sadly. And it makes my foobar take ages to redraw when i restore it from the tray
Title: Foobar2000 format strings
Post by: Bamral on 2003-03-19 14:49:47
Quote
he may want to add:

$progress2(a,b,c,d,e) - alternate progress slider. $progress2(%_time_elapsed_seconds%,%_time_total_seconds%,20,'#','=') will give #####====== which will progress into #########==
$transition(a,b,c) - text colour transitions. a is string, b is start colour, c is end colour. (use colour codes)
$rgb(a,b,c,d,e,f) - rgb colour codes. a = red, b = green, c = blue, d = selected red, e = selected green, f = selected blue.


Those tagz functions are "undocumented" at the moment.  So they may produce unexpected behavior, or change behavior with any build.

So...use at your own risk...but they will not make it into official documentation until they are 100% tested and ready to be added.

So, I will wait until then before adding them into TAGZ.TXT (which is only a temporary guide FYI...you may want to save it, if you find it useful)
Title: Foobar2000 format strings
Post by: musicmusic on 2003-03-19 19:34:50
Quote
Those tagz functions are "undocumented" at the moment.  So they may produce unexpected behavior, or change behavior with any build.

So...use at your own risk...but they will not make it into official documentation until they are 100% tested and ready to be added.

ok thanks for the explanation.
Title: Foobar2000 format strings
Post by: Bushwack on 2003-03-19 21:15:31
lol nice work Dibrom

I think we can close this thread now cause Dibrom won. I've made alot of long strings, but that's the first one I've seen that accually slows my computer down

I wonder if it's possible to make a pulgin that generates that string for the user through an interface*, it could be the string formatting default for people that aren't incliend to modify there playlist string themself.

*I say plugin because even though all the modifcation can be done easily at the top, modifying text seems to be beyond 95% of computer users.
Title: Foobar2000 format strings
Post by: Bamral on 2003-03-19 22:31:20
Quote
lol nice work Dibrom

I think we can close this thread now cause Dibrom won. I've made alot of long strings, but that's the first one I've seen that accually slows my computer down

Heh...my thoughts exactly
Title: Foobar2000 format strings
Post by: Yog-Sothoth on 2003-03-20 00:03:56
Hi guys, I'm using this code:
Code: [Select]
808080$num(%_playlist_number%,3) > 800000$padcut($caps($if(%artist%,%artist%,Unknown Artist)),55)    400040 '- ['0080FF$padcut($caps($if(%album%,%album%,Unknown Album)),55)    400040'] -'808080    $num([%tracknumber%],2).0000FF$padcut($caps($if(%title%,%title%,Unknown Title)),55)  808080$padcut_right($caps([%_length%]),6)

And how I can remove this empty spaces between Album name and Title, cause I only can edit, how much signs I can see, but I can't remove spaces. I've done that TAB, and I think, here is a problem.

picture here (200kb) (http://www.cert.vc-pub.com/yog/how.jpg)

Thx

Update: font - Euromode
Title: Foobar2000 format strings
Post by: smok3 on 2003-03-20 00:47:14
my 'update' for 0.58, snapshot:
http://users.volja.net/smoker/pub/foobar05...fg_snapshot.gif (http://users.volja.net/smoker/pub/foobar058_cfg_snapshot.gif)

(config file can be downloaded from my homepage  B) )

edit: @Yog-Sothoth: what font is that?
Title: Foobar2000 format strings
Post by: _io_ on 2003-03-20 11:14:35
Just thought i'd add mine to the list, requires a %quality% tag.

picture (291KB) (http://io.sytes.net/foobar.jpg)
Title: Foobar2000 format strings
Post by: Thadeus on 2003-03-20 23:35:21
And here is my foobar - I especialy like progres bar thx for idea of it

foobar-tags.gif (http://members.lycos.co.uk/thadeus/komp/foobar-tags.gif)

Font: Lucinda ; OS Win98SE


And small question does anybody know where too find char codetable for lucinda - for inserting chars by using $char(9688) it is a small dot seen in my picture above, any idea? I need a music char - note, tune - i don't know exat name. You know sth like these. Thx for any ideas.

Code: [Select]
  |\     |\
0|     O'
Title: Foobar2000 format strings
Post by: ak on 2003-03-20 23:53:33
Quote
I need a music char - note, tune - i don't know exat name.

$char(9834) or $char(9835)

Ah, according to your scetch it's 9834.
Title: Foobar2000 format strings
Post by: Funkstar De Luxe on 2003-03-21 00:03:25
Ok, mine isn't great but I'll post it here just incase anyone finds it interesting ( and in case I loose them again)
Code: [Select]
$num(%_playlist_number%,3)808080| $padcut($if(%artist%,%artist%,'Unknown Artist'),35)$if(%_isplaying%,$char(9835), ) 808080| $padcut($if(%title%,%title%,%_filename%),55) 808080| $padcut($if(%tracknumber%,$num(%tracknumber%,2) )$if(%album%,%album%,'Unknown Album'),40) 808080| $padcut([%genre%],15) 808080|
Code: [Select]
 .$ext(%_filename_ext%)[ • %__bitrate%kbps][ • %__samplerate%Hz]

    '['$progress(%_time_elapsed_seconds%,%_time_total_seconds%,25,»,'=')']  '
Title: Foobar2000 format strings
Post by: Thadeus on 2003-03-21 00:13:19
Quote
$char(9834) or $char(9835)

Ah, according to your scetch it's 9834.

Thx, where can i find such list? Im only getting the one with Asci ahars not windows encoded
Title: Foobar2000 format strings
Post by: Messer on 2003-03-21 00:20:14
Quote
Thx, where can i find such list? Im only getting the one with Asci ahars not windows encoded

Put
Code: [Select]
%_playlist_number% - $char(%_playlist_number%)$char(9)

at the beginning of your playlist formatting string and add at least 65536 tracks  (you can add the same tracks multiple times).
Title: Foobar2000 format strings
Post by: ak on 2003-03-21 11:53:54
...or find the character in charmap and do some hex->dec conversion.
In case you don't have enough tracks available  .
Title: Foobar2000 format strings
Post by: McLone on 2003-03-22 08:13:57
this is what i use.

Features:
- AlbumList: Artist (year) - Album (NumSongs)\Num - Title (Time)
- AlbumList HTTP Streams sorting (not my idea)
- AlbumList Various (%VARIOUS% = 'Yes' must be set)
- Playlist: Detecting modules (directory / tag or filename)
- Playlist: id3v2 plugin support - long strings have higher priority
- Statusbar: stream details, simple progressbar with elapsed/remaining timers

Playlist (font:Courier:8, text#c0c0c0, bg#000000, sel#004040 (rgb, not bgr), frame#808080)
Code: [Select]
666666|666666$num(%_playlist_number%,3)C0C0C0|C0C0C0.$if(%_isplaying%,0000FF>, )
$ifgreater($add($strstr($lower($ext(%_filename_ext%)),xm),
$strstr($lower($ext(%_filename_ext%)),it),
$strstr($lower($ext(%_filename_ext%)),s3m),
$strstr($lower($ext(%_filename_ext%)),mod),
$strstr($lower($ext(%_filename_ext%)),ptm)),0,
//===MODULE===
[C0C0C0|C0C0C0$directory(%_path%) 0080FF|0080FF/ ]
$if(%title%,[C0C0C0|C0C0C0#808000|808000$num(%tracknumber%,2) 0080FF|0080FF- ]
[C0C0C0|C0C0C0%artist% 0080FF|0080FF- ]C0C0C0|C0C0C0%title%,FFFFFF|FFFFFF%_filename_ext%)
$char(9)[C0C0C0|C0C0C0%_length%],
//===MPEG===
$if(%title%,[C0C0C0|C0C0C0
$ifgreater($len($meta(album,2)),0,$iflonger($meta(album,1),$meta(album,2),$meta(album,2),$meta(album,1)),%album%) 0080FF|0080FF- ]
[C0C0C0|C0C0C0#[%disc%/]808000|808000$num(%tracknumber%,2) 0080FF|0080FF- ]
[C0C0C0|C0C0C0$ifgreater($len($meta(artist,2)),0,$iflonger($meta(artist,1),$meta(artist,2),$meta(artist,2),$meta(artist,1)),%artist%) 0080FF|0080FF- ]
C0C0C0|C0C0C0$ifgreater($len($meta(title,2)),0,$iflonger($meta(title,1),$meta(title,2),$meta(title,2),$meta(title,1)),%title%),
FFFFFF|FFFFFF%_filename_ext%' ('0000FFNO TAG')')
$char(9)[C0C0C0|C0C0C0%_length%])


Statusbar
Code: [Select]
//i know this detection is stupid but i wanna see '???'
$ifgreater($strstr($lower($ext(%_filename_ext%)),xm),0, xm,
$ifgreater($strstr($lower($ext(%_filename_ext%)),it),0, it,
$ifgreater($strstr($lower($ext(%_filename_ext%)),s3m),0,s3m,
$ifgreater($strstr($lower($ext(%_filename_ext%)),mod),0,mod,
$ifgreater($strstr($lower($ext(%_filename_ext%)),mpc),0,mpc,
$ifgreater($strstr($lower($ext(%_filename_ext%)),ape),0,ape,
$ifgreater($strstr($lower($ext(%_filename_ext%)),cda),0,cda,
$ifgreater($strstr($lower($ext(%_filename_ext%)),mp3),0,mp3,
$ifgreater($strstr($lower($ext(%_filename_ext%)),mp2),0,mp2,
$ifgreater($strstr($lower($ext(%_filename_ext%)),cue),0,cue,
$ifgreater($strstr($lower($ext(%_filename_ext%)),wav),0,wav,???))))))))))) 0080FF@ [%__bitrate%666666kbps ]
[$cut(%__samplerate%,2)666666kHz ]
$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)
[ 0080FF:: 666666AG $padcut(%__replaygain_album_gain%,5)]
[ 0080FF:: 666666TG $padcut(%__replaygain_track_gain%,5)]
[ 0080FF:: 666666%__extrainfo%]
$char(9)'['$progress(%_time_elapsed_seconds%,%_time_total_seconds%,44, %_time_elapsed% 0080FF
$select($add($mod(%_time_elapsed_seconds%,4),1),'-','\','|','/')
 $div($sub(%_time_total_seconds%,%_time_elapsed_seconds%),60):$num($mod($sub(%_time_total_seconds%,%_time_elapsed_seconds%),60),2) ,'666666=')']'


Tree Hierarchy (%VARIOUS% must be 'Yes')
Code: [Select]
$if($strstr(%_path_raw%,'http://'),'[http streams]',
$if($strstr(%VARIOUS%,'Yes'),'Various Atrists'[ - %album%],
[%artist%][' ('$if2(%year%,$if2(%date%,''))')'][ - %album%]))
|$if(%title%,[$num(%tracknumber%,2) - ][%title%]
['  ('%_length%')'],%_filename%)


Sort Order ('show sub-item counts' set)
Code: [Select]
$if($strstr(%_path_raw%,'http://'),'',$if($strstr(%VARIOUS%,'Yes'),'z'%album%,%artist% %year% %date% %album%))$num(%tracknumber%,3)


Copy Command / foo_textinfo.cfg
Code: [Select]
$if(%title%,[%artist% [ '('$if2(%date%,$if2(%year%,''))') ']- ][%album% - ][#[%disc%/]$num(%tracknumber%,2) - ]%title%,%_filename_ext%)

//or just %_path%


ToDo:
- Bitrate detection => %_playlist_number% color (not my idea though)
- Various detection in playlist
- Not so stupid file type detection
- Dead Stream detection -- maybe by bitrate?
Title: Foobar2000 format strings
Post by: Supachikn on 2003-03-22 11:00:49
http://ruination.net/stuff/fb2ktitle.txt (http://ruination.net/stuff/fb2ktitle.txt)
Title: Foobar2000 format strings
Post by: AlfredSka on 2003-03-22 20:58:59
foobar2000 v0.586
KISS Theory in Action
[Edited on 3-26-03 to make use of $char(9) columns]

Screen Shot: Foobar Screen Shot (http://www.olypen.com/mdpsoul/foobar_screen.jpg)

Playlist: (Font = Sylfaen)
Code: [Select]
$if(%title%,

$if(%tracknumber%,

483100$num(%_playlist_number%,3) - T:$num(%tracknumber%,3) | ,

483100$num(%_playlist_number%,3) - T:000 | )

1E3C00[%artist%]
$repeat($char(9),3)483100[%album%]
$repeat($char(9),2)1E3C00%title%
$repeat($char(9),3)483100[%_length%],

483100$num(%_playlist_number%,3) - T:000 | 
1E3C00$caps(%_filename%))


System Tray:
Code: [Select]
$if(%title%,
[%artist% - ]%title%,
$caps2(%_filename%))


Window Title:
Code: [Select]
$if(%title%,

[$num(%tracknumber%,3) - ]
[%artist% - ]
%title%,

$caps2(%_filename%)) | $caps(%_foobar2000_version%)


Status Bar:
Code: [Select]
$if(%title%,
[%artist% - ][%title%] <> ,
%_filename% <> )

[%__bitrate%kbps ][%__samplerate%Hz]
$if(%__channels%,$ifgreater(%__channels%,2, %__channels%Ch,$ifgreater(%__channels%,1, Stereo, Mono)) ,)

$char(9)
'{'$progress(%_time_elapsed_seconds%,%_time_total_seconds%,30,0000FF'||','|')'}'  %_time_elapsed%


~Alfred
Title: Foobar2000 format strings
Post by: FooBaRaz on 2003-03-23 01:30:33
I'm so clueless..I don't know how to do any of this stuff or where to enter it...
Title: Foobar2000 format strings
Post by: voltron on 2003-03-23 08:34:29
preferences >> title formatting >> help
Title: Foobar2000 format strings
Post by: taezou on 2003-03-23 09:38:45
mine is pretty simple compared to everyone else's

Code: [Select]
$if(%_isplaying%,$puts(maincol,FFFFFF)$puts(sidecol,FFFFFF),$puts(maincol,)$puts(sidecol,F0CAA6))

$get(sidecol)$num(%_playlist_number%,4). BA936A|BA936A|$get(maincol) $padcut($if(%artist%,%artist%,'Unknown Artist'),30) BA936A|BA936A|$get(maincol) $padcut($if(%album%,%album%,'Unknown Album'),25) BA936A|BA936A'|'$get(maincol)$pad_right($if(%tracknumber%,[%disc%/][$num(%tracknumber%,2)],NA),4)BA936A|BA936A'|'$get(maincol) $padcut($if(%title%,%title%,%_filename_ext%),50)  BA936A|BA936A'|' $get(sidecol)$pad_right($if(%_length%,%_length%,0:00),5)


screen shot of it here (http://www.qbix.org/foobar_shot.png)
Title: Foobar2000 format strings
Post by: anza on 2003-03-23 13:54:18
Anyone know how to show total length of an album in the album list? (or why not in somewhere else)
Title: Foobar2000 format strings
Post by: Gaffa on 2003-03-23 15:42:53
Quote
mine is pretty simple compared to everyone else's

screen shot of it here (http://www.qbix.org/foobar_shot.png)

I like it, what is that font called?
Title: Foobar2000 format strings
Post by: taezou on 2003-03-23 17:05:07
Quote
I like it, what is that font called?

it's called mono 07_55, though i modified mine to extend the pipe so there are no vertical gaps.
Title: Foobar2000 format strings
Post by: Skates on 2003-03-23 18:32:10
taezou can you post that modified font or maybe email it to me or something by any chance?
Title: Foobar2000 format strings
Post by: voltron on 2003-03-24 02:01:36
Quote
taezou can you post that modified font or maybe email it to me or something by any chance?

ditto, having trouble finding it. can you post a link or email me a link/file? thanks

voltron (at) attbi (dot) com
Title: Foobar2000 format strings
Post by: opaquefog on 2003-03-24 03:21:23
(http://photo.21cn.com/albums/photos/I/B/O/IBOYIS/1048476213.gif)
Title: Foobar2000 format strings
Post by: opaquefog on 2003-03-24 03:22:51
foobar2000
it's simple
it's good
Title: Foobar2000 format strings
Post by: taezou on 2003-03-24 05:40:47
Quote
taezou can you post that modified font or maybe email it to me or something by any chance?

here's the font (http://www.qbix.org/MONO07_55.zip)
Title: Foobar2000 format strings
Post by: haloeight on 2003-03-24 23:16:29
please forgive my n00b-boobery, but could someone please help me with something?

I have fb2k set to just display the file name of the playing file - I prefer this over tags.

However, when I play a large mp3 with a cue file - what ends up happening is just the file name of the large parent file is displayed for each of the component tracks rather than the tracks being listed as artist-title.

I know that if you leave the name display string unchanged from the default, it displays it properly. And I saw the link to the text file that summarizes the functions of the different strings.

I can't really tell what string I need to use to re-enable the proper display of artist / track names in cue files when playing a large mp3.

Help please?
Title: Foobar2000 format strings
Post by: /\/ephaestous on 2003-03-25 00:12:46
@poorimpulsectrl.

I think what you want is that foobar displays artist - title on CueSheets and filename on the others try this:

$if($strcmp($ext(%_path%,cue)),[%artist% - %title%],%_filename%)

It means if the extension is .cue then show the embedded artist and title tags, else show the filename.
Title: Foobar2000 format strings
Post by: haloeight on 2003-03-25 05:40:38
You kick ass Nephaestous! I'll give it a shot. Thanks.

edit : just tried it and it seems as though it still displays the parent mp3 file instead of the subtrack names for cue files enqueued.
Title: Foobar2000 format strings
Post by: Bushwack on 2003-03-25 08:24:16
well I don't use cue files for my mp3s and so I don't really understand what you're trying to do, but I think /\/ephaestous meant:

$if($strcmp($ext(%_path%),cue),[%artist% - %title%],%_filename%)

give that a try.
Title: Foobar2000 format strings
Post by: kalt on 2003-03-25 13:48:24
I was following that string for another use in my playlist, but I can tell you that it definitely worked for me. Thanks Bushwack!
Title: Foobar2000 format strings
Post by: haloeight on 2003-03-25 19:43:05
Quote
well I don't use cue files for my mp3s and so I don't really understand what you're trying to do, but I think /\/ephaestous meant:

$if($strcmp($ext(%_path%),cue),[%artist% - %title%],%_filename%)

give that a try.

With winamp there is a plugin called mp3cue, which pops up a playlist like window anytime an mp3 that uses a cue file is played. The window displays the artist and track names contained within the cue file. You can click on these tracks as you can in your normal playlist to advance to a particular song, or simply see what the name is of a contained track or what time it starts at in the mix.

I put in the code you gave, and it works! It's now showing the names of tracks contained in the cue file, now I'll just try and add the artist information myself. Thanks again to both you and Nephaestous.
Title: Foobar2000 format strings
Post by: haloeight on 2003-03-25 20:30:53
Two quick questions -

1] What is the code to replace the cursor in the status bar progress graph with the percentage of the song played?

2] What tag do I need to use to extract "Performer" information from a cue file ? I tried %performer% and %_performer% and neither worked. I looked at the text file and there doesn't seem to be anything listed for "Performer" information within cue files.

I've tried looking at the code other people have used here but haven't gotten anything to work right.
Title: Foobar2000 format strings
Post by: ExUser on 2003-03-25 21:03:06
Quote
I looked at the text file and there doesn't seem to be anything listed for "Performer" information within cue files.


Hence, no %performer% tag, and no performer meta-data. There is no performer information. So FB2K can't access it. I figured that would be obvious.

Edit: not meant to be inflammatory. Sorry. 
Title: Foobar2000 format strings
Post by: haloeight on 2003-03-25 21:16:20
Seeing as a] I'm not a programmer and b] it seems people are putting a lot of stuff into their codes that demonstrate knowledge beyond what's readily available in that text file, I thought it worth asking. But sorry if in so doing I terribly inconvenienced your existence.
Title: Foobar2000 format strings
Post by: mgoodgood on 2003-03-29 04:03:03
My playlist config
Quote
$if(%_isplaying%,$puts(maincol,FFFFFF),$puts(maincol,))
$puts(sidecol,FF8000)
$puts(separator,|)

$get(maincol)$if(%_isplaying%,», )' '
$get(maincol)$padcut($if(%artist%,%artist%,'Unknown Artist'),15)

' '$get(sidecol)$get(separator)' '
$get(maincol)$padcut($if(%album%,%album%,'Unknown Album'),25)

' '$get(sidecol)$get(separator)' '
$get(maincol)[$num(%tracknumber%,2).' ']

$if(%title%,%title%,%_filename_ext%)

$char(9)$get(sidecol)$get(separator)
$get(maincol)$padcut_right(%_length%,5)


My status bar config:
Quote
$puts(length,80)
$puts(barcol,808080)

$progress($div($mul($get(length),%_time_elapsed_seconds%),%_time_total_seconds%),
$get(length),$get(length),
$num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),2)'%',
$get(barcol)'|')

$char(9)%_time_elapsed% / %_time_total%


font used is mono0755 from taezou 

screenshot here (http://planet.time.net.my/TiomanIsland/stheng/foobarpreview.PNG)
Title: Foobar2000 format strings
Post by: psyqil on 2003-03-31 01:09:04
Quote
Seeing as a] I'm not a programmer and b] it seems people are putting a lot of stuff into their codes that demonstrate knowledge beyond what's readily available in that text file, I thought it worth asking. But sorry if in so doing I terribly inconvenienced your existence.

Sorry, my internet was down a whole week... 
%track_artist% is what you´re looking for, as in "$if(%track_artist%,%track_artist%,%artist%)"
Title: Foobar2000 format strings
Post by: feelyou on 2003-03-31 14:18:54
$select($add($mod(%_time_elapsed_seconds%,2),1),╭∩╮(︶︿︶)╭∩╮,╭-╮(⌒_⌒)╭-╮)
Title: Foobar2000 format strings
Post by: smok3 on 2003-03-31 21:35:12
how would i do something like:

if title contains noncase sensitive
'*track*'
display
filename.ext
else
title

(to avoid some stupidly named songs...)

i got something like:
Quote
$if($strcmp($substr(%title%,1,5),'Track'),%_filename_ext%,%title% )


which is almost working... (since they usualy START with 'track...')
edit: what i mean is if there is some command to check 'if the string contains some other substring'?
Title: Foobar2000 format strings
Post by: Bushwack on 2003-04-01 01:58:16
smok3 try somthing like:
Quote
$if($strcmp($replace($lower(%title%),'track',),$lower(%title%)),%_filename_ext%,%title% )
Title: Foobar2000 format strings
Post by: smok3 on 2003-04-01 02:29:10
uhmm, well there is no 'lower' or 'replace' in the help file, so iam not sure what is that supposed to do, but i guess i wasnt clear enough, so an example:

if the title read as:
track01 or 01track or TrAcK or zexyTRACK0100 or ...

i would like filename displayed instead of the title... 
Title: Foobar2000 format strings
Post by: penvzila on 2003-04-01 04:51:25
z
Title: Foobar2000 format strings
Post by: haloeight on 2003-04-01 05:15:55
Quote
Quote
Seeing as a] I'm not a programmer and b] it seems people are putting a lot of stuff into their codes that demonstrate knowledge beyond what's readily available in that text file, I thought it worth asking. But sorry if in so doing I terribly inconvenienced your existence.

Sorry, my internet was down a whole week... 
%track_artist% is what you´re looking for, as in "$if(%track_artist%,%track_artist%,%artist%)"

hey thanks psyqil, I just put that in and will see if it will work. I'm getting ? displayed right now for the cue file I'm playing but that may be because the cue file isn't properly written.

edit : *#$%in awesome, psyqil, thanks again, displays everything I want it to now!
Title: Foobar2000 format strings
Post by: Bushwack on 2003-04-01 07:03:52
smok3 $replace and $lower shoud be in the help file, they are in mine anyways:
Quote
- $lower(x), $upper(x) - converts x to in lower/uppercase, eg. "$upper(%title%)"

and ... I swear $replace used to be in the help file ... alright you win that one.
Oh well $replace has worked in every version of foobar I've tried so I'd say it's pretty safe to use it, here's what it does:
Quote
  - $replace(A,B,C,D,E,..) - replaces all occurrences of substring B in string A with C and all occurrences of substring C with D and so on, eg. "$replace(hellohello,hel,k)" displays "kloklo"



As far as I can tell the string I gave you should do what you'd like, but I'll walk you through it anyways.
Quote
$if($strcmp($replace($lower(%title%),'track',),$lower(%title%)),%_filename_ext%,%title% )

working from the inside out:
Quote
$replace($lower(%title%),'track',)

this converts %title% into a lowercase string, then removes (replaces with nothing) all occurances of 'track'.  So if 'track' did not appear in %title% then we still have the lowercase %title% string, if 'track' did appear then we have a different string.
Quote
$strcmp($replace($lower(%title%),'track',),$lower(%title%))

Now we compare the string we just generated to the lowercase %title% string (we could have used $stricmp instead and made the second $lower redundant) and then we use the $if to decide what to display based on the results of the comparison.
Title: Foobar2000 format strings
Post by: penvzila on 2003-04-01 08:08:29
shot (http://www.geocities.com/penvzila/ASSFUCK.txt)
Title: Foobar2000 format strings
Post by: smok3 on 2003-04-01 15:30:12
@bushwalk: tnx, ic what you were trying, i guess replace doesnt work in 0.586 (or iam just to dumb to make it work). 

iam still with:
Quote
//if title exist also check if it doesnt start with 'track'
$if(%title%,
$if($stricmp($substr(%title%,1,5),'track'),%_filename_ext%,%title%)
,%_filename_ext%)

(luckily they start with 'track'  )
Title: Foobar2000 format strings
Post by: sofia on 2003-04-01 17:28:04
playlist text color=007300
playlist bg color,playlist selection color,selected item frame color=000040


title formatting->playlist

[$if(%_isplaying%,FF00FF|00FF00●$num(%_playlist_number%,3).» ,007300|00FF00○$num(%_playlist_number%,3).| )$ifgreater(%tracknumber%,1,
$repeat(' ',$len( %artist%))
$repeat(' ',$len( $abbr([%album%],40))),
[$caps( %artist%)]
$get(bl)$caps($abbr([ %album%],40)))
$if(%title%,
$get(bl)[|$num(%tracknumber%,2)]$get(pl)$caps( %title%),
$get(pl)$caps( %_filename%))$char(9)
$if(%_isplaying%,FF00FF|00FF00«%_length% $num(%__bitrate%,3)kbps,007300|00FF00|%_length% $num(%__bitrate%,3)kbps)]
Title: Foobar2000 format strings
Post by: anza on 2003-04-01 19:24:16
This is something I just came up while playing a little with 0.6b2  It's so great that you can now remove the volume and the total time of selected tracks!

Actually none of this is my own code, I just wrapped up two cool things

If you can't figure out what it does, I'll explain shortly:
1) It scrolls a text of your choice, if it's longer than selected with (the best places are the taskbar or window title IMHO)
2) It uses the (scrolling) text as a progress-bar by changing it's color

Here's the screenshot (http://koti.mbnet.fi/antsau/pic/foobar2k.jpg)

Quote
// Config
$puts(played_color,3333CC)
$puts(pending_color,000000)
$puts(text,
//   text to scroll
$puts(SCROLLTEXT,%artist% - %title%
$ifgreater($len(%artist% - %title%),38, || ,))
//   length of scroll
$puts(LENGTH,39)
//   check if length greater than string. if so, do not scroll.
$ifgreater($get(LENGTH),$len($get(SCROLLTEXT)),$get(SCROLLTEXT),
//   calc char to start from
$puts(FROM,$add($mod(%_time_elapsed_seconds%,$len($get(SCROLLTEXT))),1))
//   calc char to end with
$puts(TO,$add($mod(%_time_elapsed_seconds%,$len($get(SCROLLTEXT))),$get(length)))
//   displayscroller  
$substr($get(SCROLLTEXT),$get(FROM),$get(TO))$ifgreater($add($get(TO),1),$len($get(SCROLLTEXT)),$substr($get(SCROLLTEXT),1,$sub($get(TO),$len($get(SCROLLTEXT)))),)))

// Calculation
$puts(played_percent,$div($mul(%_time_elapsed_seconds%,100),%_time_total_seconds%))
$puts(played_length,$div($mul($len($get(text)),$get(played_percent)),100))
$puts(played_text,$left($get(text),$get(played_length)))
$puts(pending_text,$right($get(text),$sub($len($get(text)),$get(played_length))))
$puts(display_text,$get(played_color)$get(played_text)$get(pending_color)$get(pending_text))

// Display
$get(display_text)

$char(9)
'['%_length%']'
Title: Foobar2000 format strings
Post by: ak on 2003-04-01 20:32:15
Quote
(luckily they start with 'track'   )

Something like this should do also if 'track' is not at the beginnning of title:

$if($strstr($lower(%title%),track),%_filename_ext%,%title%)
Title: Foobar2000 format strings
Post by: smok3 on 2003-04-01 22:03:26
Quote
Quote
(luckily they start with 'track'   )

Something like this should do also if 'track' is not at the beginnning of title:

$if($strstr($lower(%title%),track),%_filename_ext%,%title%)

yup, thats the one, cant belive i didnt saw the strstr thingy  (my latest cfg's are on my page as usual)
Title: Foobar2000 format strings
Post by: smok3 on 2003-04-02 15:42:13
another one: has anyone done a tab distribution based on string lenghts, for example, i have 12 tabs reserved for album and artist, and i want those to be based on $len(%artist%) and $len(%album%)?
(so if the artist string is really short and album is really long then album should get more place) 
Title: Foobar2000 format strings
Post by: nuhi on 2003-04-02 17:10:26
Is there any way to display artist and album only once in current playlist ?
Something like this:

Artist - Album 01 - Track 01
                    02 - Track 02
                    03 - Track 03
                    04 - Track 04
                    05 - Track 05

It could be with storing last album name, and if strings are the same then replace with ' ' so many times as the length of artist+album letters.

I could make this, but i don't know the proper command for storing info so it's not "reseted" with the next song.
Title: Foobar2000 format strings
Post by: smok3 on 2003-04-02 17:27:02
@nuhi
afaik you cant parse stored values to the next 'song', but there is something dumb that could work with some haxoring:

//if tracknumber is smaler than 1 then display album as well
$ifgreater(%tracknumber%,1,%title% - %tracknumber%,ALBUM: %album% - %title% - %tracknumber%)

(will fail as soon as there is no song that will have tracknumber equal to 1 of course...)
Title: Foobar2000 format strings
Post by: nuhi on 2003-04-02 19:37:04
smok3, i can't believe that didn't cross my mind, it's working perfectly, maybe i'll post my playlist preset, it's quite nice now.

Thanx a lot...
Title: Foobar2000 format strings
Post by: rejj on 2003-04-02 19:38:50
I just grabbed fb2k today, and here is what I have come up with so far. Nothing special, but it does the job.
.. and yes, the format string is rather ugly (lots of ifs everywhere).

edit: I made a few minor modifications

Code: [Select]
// Currently playing song's colour
$puts(PC,FFFFFF|00FFFF)

// Playlist number colour
$puts(PNC,D0A590|FFA000)

// Album name colour
$puts(AC,B06540|FFA000)

// Track number colour
$puts(TNC,D0A590|FFA000)

// Song length colour
$puts(LC,D0A590|FFA000)

// Colour for songs that have no tags
$puts(NTC,0000FF)

// Colour for the rest of the text (artist, title)
$puts(TC,00FF00|FFA000)


// playlist number, followed by .
$if(%_isplaying%,$get(PC),$get(PNC))$num(%_playlist_number%,4).

// album name, plus disc number if file has that info, followed by track number
$if(%album%,$if(%_isplaying%,$get(PC),$get(AC))'('%album%$if(%disc%, '['$if(%_isplaying%,$get(PC),$get(TNC))CD%disc%$if(%_isplaying%,$get(PC),$get(AC))']',)$if(%tracknumber%, $if(%_isplaying%,$get(PC),$get(TNC))$num(%tracknumber%,2),)$if(%_isplaying%,$get(PC),$get(AC))')' ,)

// artist - title
$if(%_isplaying%,$get(PC),$get(TC))$if(%artist%,%artist%$if(%_isplaying%,$get(PC),$get(AC)) - ,)
$if(%_isplaying%,$get(PC),$get(TC))$if(%title%,%title%,$if(%_isplaying%,$get(PC),$get(NTC))%_filename%)

// song length, right justified
$char(9)$if(%_isplaying%,$get(PC),$get(LC))%_length%


and here is how it looks (15.6k image):
)
Title: Foobar2000 format strings
Post by: rejj on 2003-04-02 20:48:29
Quote
This is something I just came up while playing a little with 0.6b2

Will the statusbar you pasted only work in 0.6 beta? It doesn't display anything in 0.586 
Title: Foobar2000 format strings
Post by: anza on 2003-04-02 20:51:06
I think it should work also with 0.586.. But at least it works with 0.6beta. I think you should try the beta4 out, as it's damn stable and REALLY cool
Title: Foobar2000 format strings
Post by: nuhi on 2003-04-02 22:21:30
Screenshot (http://www.freewebs.com/nuhi/foobar.jpg) [153kb]

Note:
If you want to achieve «tree like» track listing then your files must contain complete info (artist, album, track number, title).

Status bar preset has some new (foobar 0.6 beta) command:
$ext(%_path%)
It's a file extension info, so if you are using some older version of foobar remove this.

Font: Terminal  (it must be a font with same letter width)

Playlist background color:
R:32
G:32
B:80

Playlist:
$puts(pl,$if(%_isplaying%,CCCCCC|CCCCCC,C08000|C08000))
$puts(bl,804000|804000)
592D00|592D00 $num(%_playlist_number%,3)
$ifgreater(%tracknumber%,1,
$repeat(' ',$len( %artist%))
$repeat(' ',$len( $abbr([%album%],40))),
C08000|C08000[$caps( %artist%)]
$get(bl)$caps($abbr([ %album%],40)))
$if(%title%,
$get(bl)[|$num(%tracknumber%,2)]$get(pl)$caps( %title%),
$get(pl)$caps( %_filename%))$char(9)
$get(pl)%_length%$get(bl)' min '
$get(pl)$num(%__bitrate%,3)$get(bl)' kbps '

Status bar:
$char(9)'|'$progress(%_time_elapsed_seconds%,%_time_total_seconds%,240,%_time_elapsed%666666' '$div($sub(%_time_total_seconds%,%_time_elapsed_seconds%),60):$num($mod($sub(%_time_total_seconds%,%_time_elapsed_seconds%),60),2),'666666|')'|'$char(9)
$ext(%_path%)'|'$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)),)'|'$cut(%__samplerate%,2)'khz'$char(9)
Title: Foobar2000 format strings
Post by: Xecter on 2003-04-02 23:09:01
Playlist:
Code: [Select]
//IF
$if(%_isplaying%,FFFFF$padcut($num(%_playlist_number%,4),4)FFFFFF|$padcut(%_filename%,101)FFFFFF
FFFFFF|FFFFFF
$padcut(%_length%,7)
$padcut(%_length_seconds%s,5)
|FFFFFF
%__bitrate%,


//ELSE
FFFF80|FFFFFF$padcut($num(%_playlist_number%,4),4)FFFFFF|
FFAD5B|FFFFFF$padcut(%_filename%,100) FFFFFF|FFFF00|FFFFFF$padcut(%_length%,7) $padcut(%_length_seconds%s,5)FFFFFF|FFAD5B|FFFFFF
$if(%__bitrate%,$padcut(%__bitrate%,3),???))
FFFFFF
|FFAD5B$if(%__replaygain_track_gain%,%__replaygain_track_gain%, )



And status bar:

Code: [Select]
• 
0000FF
%_time_elapsed%

$progress($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),
100,100,
595959


FF0000
$left($num($div($mul(10000,%_time_elapsed_seconds%),%_time_total_seconds%,),4),2)'.'$right($num($div($mul(10000,%_time_elapsed_seconds%),%_time_total_seconds%,),4),2)'%'



,808080'|')
808080'|' • 408000%_time_remaining% • FF3535'(' %_time_total% ')'
C08000 Track Peak:
$if(%__replaygain_track_peak%,%__replaygain_track_peak%,None) dB
$puts(SB_T,127)
$puts(SB_C,0000FF)

//Blah!
$puts(LB_R,20)
$puts(LB_G,128)
$puts(LB_B,20)
$puts(HB_R,0)
$puts(HB_G,0)
$puts(HB_B,255)
$if($greater(%__bitrate%,$get(SB_T)),
$puts(BR,$div($mul($sub(%__bitrate%,$get(SB_T)),255),$sub(320,$get(SB_T))))
$puts(BR_R,$add($get(LB_R),$div($mul($sub($get(HB_R),$get(LB_R)),$get(BR)),255)))
$puts(BR_G,$add($get(LB_G),$div($mul($sub($get(HB_G),$get(LB_G)),$get(BR)),255)))
$puts(BR_B,$add($get(LB_B),$div($mul($sub($get(HB_B),$get(LB_B)),$get(BR)),255)))
$puts(BR_C,$hex($get(BR_B),2)$hex($get(BR_G),2)$hex($get(BR_R),2))
,$puts(BR_C,$get(SB_C)))$get(BR_C)%__bitrate%kbps



//Tab
$char(9)


//K-k-k-kirby!
913D9A
$select(
$add(
$mod(
%_time_elapsed_seconds%,30),1),
'<(^-^)v',
'<(^-^<)',
'^(^-^<)',
'^(^-^)^',
'<(-.-)>',
'(>.<)',
'<(O.<)',
'<(O.O)>',
'<(o.O)v',
'v(o.o)v',
'^(º.o)v',
'^(º-º)^',
'v(O.º)^',
'v(O.o)>',
'(>o.o)>',
'(>-.)^',
'^(^.^)^',
'<(^-^)>',
'v(^.^)v',
'(>.<)',
'<(o.o)>',
'<(O.o)>',
'<(o.O)>',
'<(O.o)>',
'<(o.O)>',
'(>.<)',
'<(º.o)>',
'<(o.º)>',
'<(º.o)>',
'<(º-º)v')


// Ani Fooooobaar
8000FF={
$get(BR_C)$select($add($mod(%_time_elapsed_seconds%,12),1),
'f',
'fo',
'foo',
'foob',
'fooba',
'foobar',
'fooba',
'foob',
'foo',
'fo',
'f',
' ')
8000FF
}=


These are strings i found here, and I modified them.
Sorry for the length, i like code to be spaced so I can understand what I am doing.
I wrote the 4 digit percentage, comes out like 99.99%, useful for those LONG songs =P
here it is if anyone wants to use it.

Code: [Select]
$left($num($div($mul(10000,%_time_elapsed_seconds%),%_time_total_seconds%,),4),2)'.'$right($num($div($mul(10000,%_time_elapsed_seconds%),%_time_total_seconds%,),4),2)
Title: Foobar2000 format strings
Post by: Schinkentoni on 2003-04-04 13:38:11
Simple one


Code: [Select]
$if(%_isplaying%, 9F9F9F$num(%_playlist_number%,4).   [%artist%]$char(9) 9F9F9F %title% $char(9)  9F9F9F$if(%album%,%album%,)
$char(9) 9F9F9F %__bitrate% kbps $if(%__extrainfo%,%__extrainfo%,)$char(9) 9F9F9F%_length% Min.,000000|000000 $num(%_playlist_number%,4).   [%artist%]$char(9) 000000|000000 %title% $char(9) 000000|000000 $if(%album%,%album%,)
$char(9) 000000|000000 %__bitrate% kbps $if(%__extrainfo%,%__extrainfo%,)$char(9) 000000|000000 %_length% Min.)
Title: Foobar2000 format strings
Post by: ExUser on 2003-04-04 17:24:52
Now that $blend's been fixed, here's my HSL->RGB converter.

Notes:
Variable hue accepts a value from 0 to 359, in "Degrees" if you will.
Variables sat and lum accept values from 0 to 100, in "Percent".
Variable hsl returns the RGB colour code corresponding to your values of hue, sat, and lum, each meaning Hue, Saturation, and Luminosity respectively.

Code: [Select]
$puts(hsl,
$ifgreater($get(hue),300,$blend($rgb(255,0,255),$rgb(255,0,0),$sub($get(hue),300),60),
$ifgreater($get(hue),240,$blend($rgb(0,0,255),$rgb(255,0,255),$sub($get(hue),240),60),
$ifgreater($get(hue),180,$blend($rgb(0,255,255),$rgb(0,0,255),$sub($get(hue),180),60),
$ifgreater($get(hue),120,$blend($rgb(0,255,0),$rgb(0,255,255),$sub($get(hue),120),60),
$ifgreater($get(hue),60,$blend($rgb(255,255,0),$rgb(0,255,0),$sub($get(hue),60),60),
$blend($rgb(255,0,0),$rgb(255,255,0),$get(hue),60)))))))

$puts(hsl,
$ifgreater($get(lum),49,$blend($get(hsl),$rgb(255,255,255),$sub($get(lum),50),50),
$blend($rgb(0,0,0),$get(hsl),$get(lum),50)))

$puts(hsl,$blend($blend(000000,FFFFFF,$get(lum),100),$get(hsl),$get(sat),100))


That's why I was itching to get $blend working: I coded that, then realized: "Hey, it doesn't work. *pout*" Really gave me insight into intuitive ways to do the HSL conversion. It was phun!  B)

EDIT: Anything above/below the ranges shown will default to the highest/lowest value in the range, respectively.

EDIT2: Now, if there was only a macro capability in FB2K or something, so I could actually use this for all my fields in my playlist. *sigh*
Title: Foobar2000 format strings
Post by: billcow on 2003-04-04 23:46:12
HSV->RGB converter

sat and val are in the range 0..256

works like Canar's code - except HSV instead of HSL (difference is that HSV goes from black->color->white with respect to value, where HSL is simply black->color)

Code: [Select]
$puts(hue,$mod($get(hue),360))$if($strchr($get(hue),-),$puts(hue,$add($get(hue),360)),)
$puts(hsv,
$ifgreater($get(hue),300,$blend($rgb(255,0,255),$rgb(255,0,0),$sub($get(hue),300),60),
$ifgreater($get(hue),240,$blend($rgb(0,0,255),$rgb(255,0,255),$sub($get(hue),240),60),
$ifgreater($get(hue),180,$blend($rgb(0,255,255),$rgb(0,0,255),$sub($get(hue),180),60),
$ifgreater($get(hue),120,$blend($rgb(0,255,0),$rgb(0,255,255),$sub($get(hue),120),60),
$ifgreater($get(hue),60,$blend($rgb(255,255,0),$rgb(0,255,0),$sub($get(hue),60),60),
$blend($rgb(255,0,0),$rgb(255,255,0),$get(hue),60)
))))))
$puts(hsv,$blend($rgb(255,255,255),$get(hsv),256,$get(sat)))
$puts(hsv,$blend($rgb(0,0,0),$get(hsv),128,$get(val)))
$puts(hsv,$blend($get(hsv),$rgb(255,255,255),128,$sub($get(val),128)))
$puts(hsv,$substr($get(hsv),1,7)|$substr($get(hsv),2,9))
Title: Foobar2000 format strings
Post by: maus on 2003-04-05 01:40:27
minor update...

Unfortunately, some things like neat displays(and especially sorting) don't function consistently without metadata.

So, I've set aside a dir used for all the fancy stuff.



blue dot = file in "library" dir
red dots = what's playing
green dot = has album, artist, and tracknumber metadata(meaning it can play nice if put in the library dir)

(erm, the special characters didn't come out too well. Replace the "?"s with symbols.)
I really should clean up this code, too...

playlist:
Code: [Select]
$puts(jukedir,I:\sound\final)
$puts(jukedirlength,$len($get(jukedir)))
$puts(songdir,$cut(%_path%,$get(jukedirlength)))
$puts(playchar,$if(%_isplaying%,0600F9?))
$puts(dirchar,$if($strcmp($get(songdir),$get(jukedir)),FAE9E7?, ))
$puts(tagchar,$if(%artist%,$if(%album%,$if(%tracknumber%,C5F2C4?, ))))
$if($strcmp($get(songdir),$get(jukedir))
,
$padcut(
$if(%tracknumber%,$ifgreater(%tracknumber%,1,,$caps2(%artist% - %album%)),%_directoryname%),40)
$pad($get(dirchar),1)
?
$pad($get(playchar),1)
$if(%tracknumber%,$num(%tracknumber%,2) - $caps2(%title%),44553C%_filename%)
,
$padcut($if(%artist%,$if(%album%,$caps2(%artist%) - $caps2(%album%),%_directoryname%),%_directoryname%),40)
?
$pad($get(playchar),1)
$if(%title%,$if(%tracknumber%,$num(%tracknumber%,2) - $caps2(%title%),%_filename%),%_filename%)
)

$char(9)
$pad($get(playchar),1)
?
$pad($get(tagchar),1)
$pad_right(%_length%,7)
$pad_right(%__bitrate%,4)/
$pad_right($num($left(%__samplerate%,2),2),2)
$pad_right(%__channels%,3)
$pad_right($if(%__replaygain_track_gain%,T),1)
$pad_right($if(%__replaygain_album_gain%,A),1)
$pad_right($ext($upper(%_filename_ext%)),4)


system tray:
Code: [Select]
$if(%artist%,%artist% - )$if(%title%, %title%,%_filename%)


window title:
Code: [Select]
%_path%


status bar:
Code: [Select]
'?'$progress(%_time_elapsed_seconds%,%_time_total_seconds%,75,0000FF%_time_elapsed%,?)'?' %_time_elapsed%[ / %_time_total%]


use this search string to sort by path for files outside of library dir, also puts "Various Artists" albums in a more logical position on the playlist

Code: [Select]
$puts(jukedir,I:\sound\final)
$puts(jukedirlength,$len($get(jukedir)))
$puts(songdir,$cut(%_path%,$get(jukedirlength)))
$if($strcmp($get(songdir),$get(jukedir)),
$if($stricmp(%artist%,Various Artists),
1 - %album% - %album% - $num(%tracknumber%,3),
1 - %artist% - %album% - $num(%tracknumber%,3))
,
0 - %_path%
)
Title: Foobar2000 format strings
Post by: moridin on 2003-04-05 14:23:14
Code: [Select]
// playlist nr, filename (ab 44 zeichen nur die ersten 40+... anzeigen)
FFFF80 $num(%_playlist_number%,3).  FFFFFF$if($longer(%_filename%,123456789012345678901234567890123456789012345678901234),$substr(%_filename%,1,50)...,%_filename%)
// Falls %title% länger als filename (wenn z.b. file = track1.mp3)
$if($longer(%title%,%_filename%),  B9C8D9[%title%]  ,)

// rotes zeichen wenn der track gerade abgespielt wird
$if([%_isplaying%],3A35FD????)

// Hier Tab einfügen
$char(9)
// Über-Übergeordnetes Verzeichnis - wenn > 20 zeichen nur 16+...
92C9C9$if($longer($directory(%_path%,3),12345678901234567890),$substr($directory(%_path%,3),1,16)...,$directory(%_path%,3))/

// Übergeordnetes Verzeichnis - wenn > 30 zeichen nur 26+...
FFCD9B$if($longer($directory(%_path%,2),123456789012345678901234567890),$substr($directory(%_path%,2),1,26)...,$directory(%_path%,2))/

// Verzeichnis - wenn länger als 40 Zeichen: abkürzen
B3FFD9$if($longer($directory(%_path%),1234567890123456789012345678901234567890),$abbr($directory(%_path%)),$directory(%_path%))/  

// Format und Bitrate (+blank wenn Länge >9:99)
55AAFF '('$upper($ext(%_path%)) %__bitrate%')'$if($longer(%_length%,1234),,  )

// Länge
[4F4FFF   %_length%]

(http://www.angelfire.com/super/error/images/fb2k.gif)

So, I got a three digit playlist number, the filename (because I got so many audio files and many of them have crappy ID3 Tags and I mostly renamed them so that their filename gives all title information needed) - If ID3 Title info is longer than filename it will be displayed too (which is the case when the filename is something like track01.mp3). Then I have a short red bar after the title of the file which is currently playing. Now comes a tab (rest is right aligned) and then directory name (two dirs up, cut and put a "..." after 16 chars, another dir name (one dir up, cut at 30 chars) and the dir name in which the files are in (current dir, abbreviate when > 40 chars) - the Format (file extension)and bitrate and then the length. Note that I put spaces between format and length when length is not greater that 10 minutes in order to get everything in nice shape : )

I was to lazy to do something about the other strings by now... I will try some of yours.
Title: Foobar2000 format strings
Post by: WavOX on 2003-04-05 17:46:03
SORRY! BLOCKED! 
Title: Foobar2000 format strings
Post by: WavOX on 2003-04-05 17:46:22
SORRY! BLOCKED! 
Title: Foobar2000 format strings
Post by: WavOX on 2003-04-05 17:46:36
Do u still feel that the status bar is insufficient for you even if u are using 0.6 beta? 

The following code swaps between File name and File properties every 4 sec.
Code: [Select]
|$select($add($mod($div(%_time_elapsed_seconds%,4),2),1),

//select to show FILENAME
$ifgreater($len(%_filename_ext%),47,$cut(%_filename_ext%,41)...$ext(%_filename_ext%),%_filename_ext%),

//select to show FILE PROPERTIES, such as bitrate.
[%__bitrate%kbps ][%__samplerate%Hz ]$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)[%__extrainfo%]
)
//end $select


where $div(%_time_elapsed_seconds%,m) = set interval to m seconds,
          $mod(#,n) = set n number of choice to display/ execute.
Title: Foobar2000 format strings
Post by: foosion on 2003-04-07 13:35:45
Here is a display formatting string for use with foo_dbsearch:
Code: [Select]
$ifgreater(%_total_tokens%,%_matched_tokens%,,$puts(INCLUDE,1))

$if(%_arg_nrg%,
$if(%__replaygain_album_gain%,$puts(INCLUDE,),),
$if(%_arg_rg%,
$if(%__replaygain_album_gain%,,$puts(INCLUDE,)),
))

$iflonger($get(INCLUDE),0,
%artist% - ['['[%album% ][#[%disc%/]$num(%tracknumber%,2)]']'] $if2(%title%,%_filename%)
,)


This one makes use of what I called "search arguments". If you include {nrg} in the query, it restricts the results to files without replaygain album info. Likewise, including {rg} restricts results to files that have replaygain album info. Including neither in the query will not affect the search results.
Title: Foobar2000 format strings
Post by: ChS on 2003-04-07 23:33:19
Fairly modified version of khostri's code from first page of this thread:

Screenshot (http://www.apehaus.com/ss/foo4.png)

Font: Sheldon (http://www.apehaus.com/ss/sheldon4.fon)

foobar Config download (http://www.apehaus.com/ss/foobar2000.cfg)

Playlist Font: Sheldon Regular 9pt
Status Bar Font: Microsoft Sans Serif: Regular 8pt
File Info window font: Microsoft Sans Serif Regular 8pt


COLORS ARE RGB
Playlist Text Color: 119 137 151
Playlist BG: 44 55 69
Playlist selection color: 157 175 198
Selected Item Frame: 227 234 240


Code: [Select]
$puts(RED,0000FF)


// playlist numbering
C4B6A4$num(%_playlist_number%,4) '|'

// Red arrow for playing track
$if(%_isplaying%,$get(RED)'[[',)


// artist name with auto-abbreviation enabled
$if(%title%,FFFFFF $padcut($abbr(%artist%,22),22)


// tracknumber
$if(%tracknumber%,$padcut(- $num(%tracknumber%,2) ,5), -  )


// track title
-E2DACF $padcut($if(%title%, %title%,),40) 


// track year
$if(%date%,$padcut( '['%date%']',10),          )


// album with auto-abbreviation
$if(%album%,$padcut($abbr(%album%,32),32),


// if no artist/title tags then shows file name
$padcut('-   ',40)),$padcut(FDFDFD%_filename%,108)'(No tags found) ')


// file type and average bitrate display
:E2DACF[$pad_right($upper($ext(%_filename_ext%)),4)] @ [%__bitrate%kbps] :


//Replaygain display if replaygain values are available
$if2('('%__replaygain_track_gain%')',)  


// track length
    [%_length%]
Title: Foobar2000 format strings
Post by: anza on 2003-04-11 19:39:34
Has anyone yet found a way to put color codes to a scrolling text? For me at least it messes up the formatting totally.

Try it out yourself, the color and the scrolling text are just examples just I put there, if someone gets it to work I'll use my "cool" bit-/samplerate display there:
Quote
//text to scroll
$puts(SCROLLTEXT,0000FF%artist% - %title%)
//length of scroll
$puts(LENGTH,15)
//check if length greater than string. if so, do not scroll.
$ifgreater($get(LENGTH),$len($get(SCROLLTEXT)),$get(SCROLLTEXT),
//calc char to start from
$puts(FROM,$add($mod(%_time_elapsed_seconds%,$len($get(SCROLLTEXT))),1))
//calc char to end with
$puts(TO,$add($mod(%_time_elapsed_seconds%,$len($get(SCROLLTEXT))),$get(length)))
//display scroller 
$substr($get(SCROLLTEXT),$get(FROM),$get(TO))$ifgreater($add($get(TO),1),$len($get(SCROLLTEXT)),$substr($get(SCROLLTEXT),1,$sub($get(TO),$len($get(SCROLLTEXT)))),))
Title: Foobar2000 format strings
Post by: musicmusic on 2003-04-11 22:43:30
anza: always try to keep colour codes outside the function:

Code: [Select]
////scroller variables

//text to scroll
$puts(scrolltext,  %artist% - %title%)

//length of scroll
$puts(length,15)

////make scroller

//check if length greater than string. if so, do not scroll.
$ifgreater($get(length),$len($get(scrolltext)),$get(scrolltext),

//calc char to start from
$puts(from,$add($mod(%_time_elapsed_seconds%,$len($get(scrolltext))),1))

//calc char to end with
$puts(to,$add($mod(%_time_elapsed_seconds%,$len($get(scrolltext))),$get(length)))

//display scroller
0000FF
$substr($get(scrolltext),$get(from),$get(to))$ifgreater($add($get(to),1),$len($get(scrolltext)),$substr($get(scrolltext),1,$sub($get(to),$len($get(scrolltext)))),))



that looks like my scroller, but it wasn't working here so im using my original code.
Title: Foobar2000 format strings
Post by: B on 2003-04-12 00:58:45
OK, finally made my formatting string.

Screenshot (http://bennyx.freeshell.org/foobar2000/foobar2000.png)

Formatting strings (http://bennyx.freeshell.org/foobar2000/foobar2000.txt)

Font used (http://bennyx.freeshell.org/foobar2000/mono0750.ttf)

Not too much colors, the way i like it ..
Title: Foobar2000 format strings
Post by: anza on 2003-04-12 09:03:16
Quote
anza: always try to keep colour codes outside the function:
[...]
that looks like my scroller, but it wasn't working here so im using my original code.

Well I know it I have to keep them away, BUT what I want can't be done like that, as I'd like to have it like this:
(http://koti.mbnet.fi/antsau/foobar/foobar.png)
That's an old pic, but it should clear my needs.
So, the bitrate, samplerate (and if I'll get the scroller to work, number of channels and an indicator for VBR files) and the text is in different color. That means I cant just put the color code before showing the scroller, as it don't work as I want it to.

Here's (http://koti.mbnet.fi/antsau/foobar/fb_statusbar.txt) my formatting for the statusbar (where the scroller would go), so you can have a look and hopefully undestand better what I want.
Title: Foobar2000 format strings
Post by: musicmusic on 2003-04-12 15:53:42
ok now i get what you want, multiple colour codes in the string. it would probably be quite complicated but ill see what i can do.

(your pic dont work here)
Title: Foobar2000 format strings
Post by: LightYears on 2003-04-12 17:18:26
Here's mine, clean and simple
playlist
Code: [Select]
$if(%_isplaying%,$puts(maincol,ff8000),$puts(maincol,0909090))
$puts(sidecol,FF8000)
$puts(separator,|)

$get(maincol)$if(%_isplaying%,>,  )
$if(%artist%, %artist% ,' Unknown Artist ')

$get(sidecol)$get(separator)
$get(maincol)$if(%_isplaying%,)
$if(%album%, %album% ,' Unknown Album ')

$get(sidecol)$get(separator)
$get(maincol)$if(%_isplaying%,)
$num(%tracknumber%,2)

$get(sidecol)$get(separator)
$get(maincol)$if(%_isplaying%,)
$if(%title%, %title% , %_filename_ext% )

$char(9)$get(sidecol)$get(separator)
$get(maincol)$if(%_isplaying%,)
$padcut_right($ifgreater(%_length%,9,%_length%,0%_length%),5)

status bar
Code: [Select]
$abbr(%_filename%,60) | [$upper($ext(%_filename_ext%))[ | $info(extrainfo)][ $info(mpc_profile)][ ''$caps($info(compression))''] | ][$cut($info(samplerate),2) kHz | ]$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,Stereo | ,Mono | )),)[%_time_total% -> %_time_remaining% | ]  '|'$progress(%_time_elapsed_seconds%,%_time_total_seconds%,40,'['$num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),3)'%'']','-')'|'
Title: Foobar2000 format strings
Post by: anza on 2003-04-12 17:38:45
musicmusic, thanks for giving your hand on this one  I tried it but couldn't get it to work. Maybe if I'd look into it even more I could have something done, but it's not so sure  I can do some complex codes with fb's formatting, but that scroller thing is hebrew for me
Oh, weird that the pic won't work, it should...
Title: Foobar2000 format strings
Post by: LPTB on 2003-04-12 18:56:39
Hi, I'm using the following in the playlist however recently (v0.6) I'm getting weird results with _isplaying; Sometimes it marks a couple or even a dozen of files as playing (which is quite impossible), is it the script or perhaps a bug??

Thanks.

Palylist:
Code: [Select]
800000|800000$num(%_playlist_number%,4). 
$if(%_isplaying%,0000FF|0000FF » ,0000FF|0000FF - )
[#$num(%tracknumber%,2) %title%$char(9)|%album%$char(9)|%artist%$char(9)|FFFFFF|FFFFFF'['%__bitrate%kbps $upper($ext(%_filename_ext%))']'|  $pad_right(%_length%, 5)]
Title: Foobar2000 format strings
Post by: musicmusic on 2003-04-12 18:58:54
Quote
musicmusic, thanks for giving your hand on this one  I tried it but couldn't get it to work. Maybe if I'd look into it even more I could have something done, but it's not so sure  I can do some complex codes with fb's formatting, but that scroller thing is hebrew for me
Oh, weird that the pic won't work, it should...

it might be blocked my my hosts file or firewall.

anyway here you go, be wared, its ugly:

Code: [Select]
////scroller variables

//add additional different coloured parts here
$puts(scroll1,%artist%)
$puts(scroll1colour,0000FF)

$puts(scroll2,%title%)
$puts(scroll2colour,00FF00)

$puts(scroll3,%album%)
$puts(scroll3colour,FF0000)

$puts(scroll4,%date%)
$puts(scroll4colour,FF00FF)

//length of scroll
$puts(length,25)

//put additional parts here too
$puts(scrolltext,$get(scroll1)$get(scroll2)$get(scroll3)$get(scroll4))

////make scroller
//check if length greater than string. if so, do not scroll.
$ifgreater($get(length),$len($get(scrolltext)),$get(scrolltext),

//calc char to start from
$puts(from,$add($mod(%_time_elapsed_seconds%,$len($get(scrolltext))),1))

//calc char to end with
$puts(to,$add($mod(%_time_elapsed_seconds%,$len($get(scrolltext))),$get(length)))

$puts(scrolled,$substr($get(scrolltext),$get(from),$get(to)))

$puts(scrolledd,$ifgreater($add($get(to),1),$len($get(scrolltext)),$substr($get(scrolltext),1,$sub($get(to),$len($get(scrolltext)))),)))

$get(scroll1colour)

$ifgreater(
$add($put(scroll1l,$len($get(scroll1))),1),
$get(from),

$substr(
$get(scrolled),0,
$put(scroll1end,$add($sub($get(scroll1l),$get(from)),1))
),)

$puts(partno,2)
$get(scroll$get(partno)colour)

$ifgreater(
$add($put(scroll$get(partno)l,$add($get(scroll$sub($get(partno),1)l),$len($get(scroll$get(partno))))),1),
$get(from),$substr(
$get(scrolled),
$add($get(scroll$sub($get(partno),1)end),1),
$put(scroll$get(partno)end,$add($sub($get(scroll$get(partno)l),$get(from)),1))
),)


$puts(partno,3)
$get(scroll$get(partno)colour)

$ifgreater(
$add($put(scroll$get(partno)l,$add($get(scroll$sub($get(partno),1)l),$len($get(scroll$get(partno))))),1),
$get(from),
$substr(
$get(scrolled),
$add($get(scroll$sub($get(partno),1)end),1),
$put(scroll$get(partno)end,$add($sub($get(scroll$get(partno)l),$get(from)),1))
),)

//copy this and repeat it changing partno
////copy from here
$puts(partno,4)
$get(scroll$get(partno)colour)

$ifgreater(
$add($put(scroll$get(partno)l,$add($get(scroll$sub($get(partno),1)l),$len($get(scroll$get(partno))))),1),
$get(from),
$substr(
$get(scrolled),
$add($get(scroll$sub($get(partno),1)end),1),
$put(scroll$get(partno)end,$add($sub($get(scroll$get(partno)l),$get(from)),1))
),)
////to here


$get(scroll1colour)

$substr(
$get(scrolledd),0,
$put(scroll1endd,$ifgreater(
$get(scroll1l),
$sub($get(length),$get(scroll1l)),
$add($sub($get(length),$get(scroll1l)),1),
$add($get(scroll1l),1)
)))

$puts(partnod,2)
$get(scroll$get(partnod)colour)

$substr(
$get(scrolledd),
$add($get(scroll$sub($get(partnod),1)endd),1),
$put(scroll$get(partnod)endd,
$get(scroll$get(partnod)l)))

$puts(partnod,3)
$get(scroll$get(partnod)colour)

$substr(
$get(scrolledd),
$add($get(scroll$sub($get(partnod),1)endd),1),
$put(scroll$get(partnod)endd,
$get(scroll$get(partnod)l)
))

//again copy this and repeat it changing partno
/////copy from here
$puts(partnod,4)
$get(scroll$get(partnod)colour)

$substr(
$get(scrolledd),
$add($get(scroll$sub($get(partnod),1)endd),1),
$put(scroll$get(partnod)endd,
$get(scroll$get(partnod)l)
))
/////to here


This is for a string with 4 different coloured parts, it needs some simple modifying for more, i made it so that can be done easily. I havn't tested it properly, so there may be problems as the script confuses me in places andi wasn't sure what it was doing. 

Read my comments to work out how to modify it, if you cant work it out post the string you want to scroll and ill do it for you.

Anyway, maybe there could be someway to prevent characters being counted in $pad() etc? E.g. put them in ()'s or something, would prevent the need for scripts like this one.
Title: Foobar2000 format strings
Post by: anza on 2003-04-12 19:16:59
Hey thanks! I'll try that out right away  I believe that I can modify that for my needs now, but I'll let you know if I get some problems.
Title: Foobar2000 format strings
Post by: billcow on 2003-04-13 01:17:15
anza:
another way you might try is to use $transition to give each character it's own "different" color value (if you use both arguments the same they'll be equal). Each character can then be treated as 8 characters (or 15 if you specify the selected color too). That way you can use a much simpler scroll routine.
Title: Foobar2000 format strings
Post by: LPTB on 2003-04-13 10:19:18
Has anyone stumbled uppon this problem?? It's driving me nuts, why does it mark several songs as playing ???? I'm using this playlist style:

Code: [Select]
800000|800000$num(%_playlist_number%,4). 
$if(%_isplaying%,0000FF|0000FF » ,0000FF|0000FF - )
[#$num(%tracknumber%,2) %title%$char(9)|%album%$char(9)|%artist%$char(9)|FFFFFF|FFFFFF'['%__bitrate%kbps $upper($ext(%_filename_ext%))']'|  $pad_right(%_length%, 5)]


Thanks.
Title: Foobar2000 format strings
Post by: Jan S. on 2003-04-13 11:52:07
Screenshot (http://qas.stanstrup.dk/foo_playlist.png)

Code: [Select]
//    configure the colors
$puts(WHITE,FFFFFF|FFFFFF)
$puts(RED,0000FF|0000FF)
$puts(GREY,535353|535353)
$puts(GREEN,218D3D|218D3D)
$puts(YELLOW,03DED9|03DED9)

//--------------------------------------------------------------

$get(WHITE)$num(%_playlist_number%,3).
$if(%_isplaying%,$get(RED)»  ,)

$if(%title%,

$get(WHITE)$padcut($if(%band%,[%band%] ,$if(%artist%,[%artist%],'Unknown')),20)

646464
$ifgreater($len(%album%),50,

$padcut(['['$cut(%album%,40)[... #[%CD% - ]$num(%tracknumber%,2)]'] '],60),
$padcut(['['$cut(%album%[ #[%CD% - ]$num(%tracknumber%,2)],55)'] '],60))


$get(WHITE)%title%
,$get(WHITE)%_filename%)
$if(%_isplaying%,$get(RED)  «,)

//Lossy Formats
$if($stricmp($ext(%_filename_ext%),mpc),    $get(YELLOW)• ,
$if($stricmp($ext(%_filename_ext%),ogg),    $get(YELLOW)• ,
$if($stricmp($ext(%_filename_ext%),mp3),    $get(YELLOW)• ,

//Lossless Formats
$if($stricmp($ext(%_filename_ext%),shn),    $get(GREEN)• ,
$if($stricmp($ext(%_filename_ext%),ape),    $get(GREEN)• ,
$if($stricmp($ext(%_filename_ext%),flac),    $get(GREEN)• ,    )))))
)

[%_length%]
Title: Foobar2000 format strings
Post by: Ayaka on 2003-04-13 14:57:05
Code: [Select]
// Configure
$puts(width,30)
$puts(sprit,|)
$puts(album_sprit,'-')

$puts(plno_color,9A9A9A|9A9A9A)
$puts(sprit_color,7EBABE|7EBABE)
$puts(artist_color,CCCCCC|CCCCCC)
$puts(album_color,2620BE|2620BE)
$puts(album_sprit_color,CCCCCC|CCCCCC)
$puts(title_color,$if(%_isplaying%,FEAD96|FEAD96,CCCCCC|CCCCCC))
$puts(trno_color,$if(%_isplaying%,FEAD96|FEAD96,6A956A|6A956A))
$puts(time_color,CCCCCC|CCCCCC)
//  To here


$puts(width_album_sprit,$add($mul($len($get(album_sprit)),2),2))
$puts(width_max,$sub($get(width),$get(width_album_sprit)))
$puts(width_used,$add($len($cut(%album%,$get(width_max))),$get(width_album_sprit)))
$puts(width_remainder,$sub($get(width),$get(width_used)))
$if($stricmp($mod($get(width_remainder),2),1),
$puts(width_l,$div($get(width_remainder),2))
$puts(width_r,$add($div($get(width_remainder),2),1)),
$puts(width_l,$div($get(width_remainder),2))
$puts(width_r,$div($get(width_remainder),2))
)

// Showing playlist no
$get(plno_color)$num(%_playlist_number%,3) $get(sprit_color)$get(sprit)

// If %tracknumber% is 1,%Artist% is showed.
$if($stricmp(%tracknumber%,1),
$if(%artist%,$get(artist_color)$padcut(%artist%,$get(width))
,$repeat(' ',$get(width))
)
)

// If %tracknumber% is 2, Showing same as larger 3.
$if($stricmp(%tracknumber%,2),
$repeat(' ',$get(width))
)

// If %tracknumber% is 3, Showing %album%.
$if($stricmp(%tracknumber%,3),
$if(%album%,
$repeat(' ',$get(width_l))
$get(album_sprit_color)$get(album_sprit)
$get(album_color)$cut(%album%,$get(width_max))
$get(album_sprit_color)$get(album_sprit)
$repeat(' ',$get(width_r))
,$repeat(' ',$get(width))
)
)

// If %tracknumber% is greater than 3, Showing only %title%.
$ifgreater(%tracknumber%,3,
$repeat(' ',$get(width)),)

// If the track has not %tracknumber%,
$if(%tracknumber%,,$repeat(' ',$get(width)))

// draw %title%
$get(sprit_color)$get(sprit)
$get(trno_color)
$if(%tracknumber%,$num(%tracknumber%,2),--)
: 
$get(title_color)$if(%title%,%title%,%_filename%)
$char(9) $get(time_color)$pad_right(%_length%,5)


Screenshot (http://lysithea.tripod.co.jp/temp/f2k_s.png)

btw,Japanise characters has double-width of alphabet.
so If I use $padcut() or other functions to cut the letters, Japanese characters are showed too widely.
Screenshot (http://lysithea.tripod.co.jp/temp/f2k_s2.png)
Anyone knows how I can fix this problem?
If there is no solution, I hope this problem will be fixed in ver0.6...
Title: Foobar2000 format strings
Post by: Mafioso on 2003-04-14 17:49:48
Screenshot (http://brokenliquid.student.utwente.nl/~mafioso/foobar2000.jpg)

Code: [Select]
EBEBEB|EBEBEB$num(%_playlist_number%,4) | 
$if($strcmp(%tracknumber%,1),FFFFFF|FFFFFF)
$if($strcmp(%tracknumber%,1),$puts(spacer,-),$puts(spacer, ))

$if(%tracknumber%,$num(%tracknumber%,2),  ) |

$cut(%artist%,30)$repeat($get(spacer),$sub(30,$len(%artist%))) |
$cut(%title%,30)$repeat($get(spacer),$sub(30,$len(%title%))) |
$if(%date%,$padcut(%date%,4),    ) |
$cut(%album%,30)$repeat($get(spacer),$sub(30,$len(%album%))) |
$padcut(%genre%,12) |
$padcut_right(%_length%,7) |
Title: Foobar2000 format strings
Post by: DotNoir on 2003-04-14 20:21:05
I'd like to use Mafiosos code, but I have a problem that I have the ID3v2 reader enabled and I have usually 01/something in my tracknumber field, so I can't get the code to work like it is supposed to do... I'm such a noob with all this taggings and I can't think how I can make it understand that 01/## field...

Thanks for help in advance

/DotNoir
Title: Foobar2000 format strings
Post by: anza on 2003-04-14 20:36:19
Change this line:

$if(%tracknumber%,$num(%tracknumber%,2),  ) |

to this:

$if(%tracknumber%,$cut($num(%tracknumber%,2),2),  ) |

It should help
Title: Foobar2000 format strings
Post by: DotNoir on 2003-04-14 20:55:58
Now I have this in my playlist code :
Code: [Select]
$num(%_playlist_number%,5) | 
$if($strcmp(%tracknumber%,1),FFFFFF|FFFFFF)
$if($strcmp(%tracknumber%,1),$puts(spacer,-),$puts(spacer, ))

$if(%tracknumber%,$cut($num(%tracknumber%,2),2), ) |

$cut(%artist%,30)$repeat($get(spacer),$sub(30,$len(%artist%))) |
$cut(%title%,30)$repeat($get(spacer),$sub(30,$len(%title%))) |
$cut(%album%,30)$repeat($get(spacer),$sub(30,$len(%album%))) |
$padcut_right(%_length%,7) |


The problem isn't that it won't show the tracknumbers in the left right... I didn't explain it too good in my previous post... The problem is that it doesn't change it to white and put the -------'s in the playlist...  Like this:
Playlist (http://koti.mbnet.fi/exapathy/playlist.jpg)

edit: please post links to large images.

edit: Sorry. I was thinking about it, but (of course) hadn't read the rules... 
Title: Foobar2000 format strings
Post by: Mafioso on 2003-04-14 21:15:09
Replace this:
Code: [Select]
$if($strcmp(%tracknumber%,1),FFFFFF|FFFFFF)
$if($strcmp(%tracknumber%,1),$puts(spacer,-),$puts(spacer, ))


with this:
Code: [Select]
$if($or($strcmp(%tracknumber%,1),$strcmp($strchr(%tracknumber%,01/),1)),FFFFFF|FFFFFF)
$if($or($strcmp(%tracknumber%,1),$strcmp($strchr(%tracknumber%,01/),1)),$puts(spacer,-),$puts(spacer, ))


.. I didn't try this, but i guess it's right.
Title: Foobar2000 format strings
Post by: DotNoir on 2003-04-14 21:19:20
Sorry to spam like this  It seems that my problem is that I have both
TRACKNUMBER = 1 and
TRACKNUMBER = 01/## in the tag... This seems to cause the problem... Didn't realize it before...

Now I just have to reformat every tag so that it has either 1 or 01/## in it... I tried and it now works with either of those, but not with both 

Thanks guys!

Oh, and thanks to Mafioso for the code...

/DotNoir (forever a noob, forever greatful)
Title: Foobar2000 format strings
Post by: rejj on 2003-04-14 22:46:45
Quote
Now I just have to reformat every tag so that it has either 1 or 01/## in it...

I'd suggest you do it so the tracknumber field only has numbers. You'll find pretty much everyone else does this, so your formatting will work with files you get from someone else, and files you share won't break other people's formatting.
Title: Foobar2000 format strings
Post by: amppa on 2003-04-14 22:57:49
Edited away
It still needs some modification..
Title: Foobar2000 format strings
Post by: superdumprob on 2003-04-15 01:05:19
I've only just started playing about with the format strings, so please bear with me.

I've "borrowed" () code from others in this forum and I extend my thanks to all in this thread.

Code: [Select]
$if(%_isplaying%,$get(RED) # ,$if($info(replaygain_track_peak), 

$get(BLUE)#, #))

$pad_right(%_length%,8)


That's the code I use which is right-justified. The problem I have is that when I have tracks greater than 9:59 in length, the '#'s don't line up anymore. I thought $pad_right would fix it, but it didn't. Can anyone offer any assistance?

Also, in the "visualisation thread" apach posted a little bit of code which makes a "spinner".

Quote
Code: [Select]
$select($add($mod(%_time_elapsed_seconds%,4),1),'-','\','|','/')


I wish to use this in the place of red '#'s when a file is playing. I inserted the code but it just displayed a red '-' which didn't rotate. Is it possible to use this code to full effect in the playlist? And finally, is it possible to make it spin any faster? I thought changing the four to a lower value would would, but one didn't seem to...

Many thanks
Title: Foobar2000 format strings
Post by: DotNoir on 2003-04-15 02:53:55
Quote
Quote
Now I just have to reformat every tag so that it has either 1 or 01/## in it...

I'd suggest you do it so the tracknumber field only has numbers. You'll find pretty much everyone else does this, so your formatting will work with files you get from someone else, and files you share won't break other people's formatting.

Well, yes, I know. It's just that... I was using Winamp before and it shows ID3v2 tags. I have been tagging most of my MP3s whit ID3v2 tag and have the tracknuber set as "tracknumber/total number of tracks" which I've found out to be very informative. Somehow  And now you must realize that I have tagged almost all of my 10000 MP3s... So, well... My problem is quite "big"  Basically my problem is caused by the ID3v2 tag reader plug-in, but I must use it because ID3v1 has limitations to the lenght of the field... Not all of my songs have the comlete name of the song in the title of ID3v1 tag. And so on... Now I've retagged all my #1 tracks, so the code by Mafioso is working like a charm... When I get to know this code better, I'll start tweaking it to my own needs and might be posting my own format strings... Let's see

Also... Using this in the code :
Code: [Select]
$if($or($strcmp(%tracknumber%,1),$strcmp($strchr(%tracknumber%,01/),1)),FFFFFF|FFFFFF)
$if($or($strcmp(%tracknumber%,1),$strcmp($strchr(%tracknumber%,01/),1)),$puts(spacer,-),$puts(spacer, ))

Makes more than only the 01/## white... It seems that if I have for example 02 as a tracknumber it makes it white... Some screenshots :
Playlist (http://koti.mbnet.fi/exapathy/playlistteleks.jpg)

TAG 1 (http://koti.mbnet.fi/exapathy/teleks1.jpg)
TAG 2 (http://koti.mbnet.fi/exapathy/teleks2.jpg)


Another sample of playlist (http://koti.mbnet.fi/exapathy/allwhite.jpg)
And a tag... (http://koti.mbnet.fi/exapathy/tracknuberformatting.jpg)

Sorry to keep bothering you like this...
Title: Foobar2000 format strings
Post by: Mafioso on 2003-04-15 03:05:15
I don't use that crapy *blegh* ID3v2 tags, so I couldn't test it. But I will look for the problem.

[edit]

I found this is working much better:
Code: [Select]
$if($strcmp($num(%tracknumber%,2),'01'),FFFFFF|FFFFFF)
$if($strcmp($num(%tracknumber%,2),'01'),$puts(spacer,-),$puts(spacer, ))


I didn't test it with ID3v2, but I think it wil work.
Title: Foobar2000 format strings
Post by: DotNoir on 2003-04-15 07:38:23
Thanks a million! Now it's working properly  Sorry about being such a bother though...
Title: Foobar2000 format strings
Post by: superdumprob on 2003-04-15 10:03:11
OK, well I'll my post quicker to read then.  I've read through the help and I can't find it. How do I get "%_length%" to display mm:ss all the time instead removing the leading 0 when a song is less than 10 minutes long?

Thanks again, sorry for my impatience
Title: Foobar2000 format strings
Post by: Moneo on 2003-04-15 11:09:10
Quote
How do I get "%_length%" to display mm:ss all the time instead removing the leading 0 when a song is less than 10 minutes long?

Think!

$num($div(%_length_seconds%,60),2):$num($mod(%_length_seconds%,60),2)
Title: Foobar2000 format strings
Post by: superdumprob on 2003-04-15 11:50:26
Thanks Moneo, sorry, I would have thought but I was a bit busy...  I will do next time.
Title: Foobar2000 format strings
Post by: Skibbi on 2003-04-15 12:58:25
Hi,
Code: [Select]
////////////////////
////   Config   ////
////////////////////
// Colors
$puts(plnum_col,$if(%_isplaying%,A7A7A7|363636,A7A7A7|363636))
$puts(artist_color,$if(%_isplaying%,0000FF|DFAF00,999999|343434))
$puts(title_color,$if(%_isplaying%,0000FF|DFAF00,000000|343434))
$puts(album_color,$if(%_isplaying%,0000FF|DFAF00,000000|343434))
$puts(date_color,$if(%_isplaying%,0000FF|DFAF00,000000|343434))
$puts(track_color,$if(%_isplaying%,0000FF|DFAF00,000000|343434))

// Spacers
$puts(album_spacer, | )
$puts(track_spacer, : )
$puts(tag_spacer,$if(%artist%,$if(%title%,* ,  )))

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

//////////////////
////   Tags   ////
//////////////////
// Artist
$if(%artist%,
$puts(artist,$get(artist_color)%artist%),
$puts(artist,$get(artist_color)$caps2($padcut(%_filename%,$sub($strchr(%_filename%,-),2)))))

// Title
$if(%title%,
$puts(title,$get(title_color)%title%),
$puts(title,$get(title_color)$caps2($substr(%_filename%,$add($strchr(%_filename%,-),2),$len(%_filename%)))))

// Album
$if(%album%,
$puts(album,$get(album_color)%album%),
$puts(album,$get(album_color)$if($strcmp($strchr($directory(%_path%),-),0),
$directory(%_path%),
$substr($directory(%_path%),$add($strchr($directory(%_path%),-),2),$len($directory(%_path%))))))

// Date
$if($stricmp($get(display_date),1),$if(%date%,$puts(date,$get(date_color)'('%date%')'),$puts(date,$get(date_color)'('----')')))

// Tracknumber
$if(%tracknumber%,
$puts(tracknum,$get(track_color)$num(%tracknumber%,2)),
$puts(tracknum,$get(track_color)--))

//////////////////////////////////
////   Display artist info   ////
/////////////////////////////////
// Playlist number
$if($stricmp($get(display_playlist_no),1),$get(plnum_col)$pad_right(%_playlist_number%,4). )

$padcut($get(artist) *$get(album) $get(date)*,120)
$get(album_spacer)
$get(tracknum)
$get(track_spacer)
$get(title)

///////////////////////////////
////   Display file info   ////
//////////////////////////////
$char(9)
$transition(
$if($stricmp($get(display_file_info),1),
$pad_right($get(tag_spacer),1)
$pad_right($upper($right(%_filename_ext%,3)),3) $pad_right(%__bitrate%/$div(%__samplerate%,1000),6)
$pad_right($if(%__replaygain_track_gain%,T, ),2)
$pad_right($if(%__replaygain_album_gain%,A, ),1)
)
$if($stricmp($get(display_time),1),$pad_right(%_length%,7)),
880000,DAAD00)

(http://copam.ath.cx/files/fb2k.png)
Title: Foobar2000 format strings
Post by: superdumprob on 2003-04-15 14:59:04
I like your windows style Skibbi, what is it?
Title: Foobar2000 format strings
Post by: Mafioso on 2003-04-15 16:30:53
I made a new statusbar code:
Code: [Select]
////////////////////////
// Config .....
/////////

// Colors
$puts(color_bar_played,0000A8)
$puts(color_bar,525252)
$puts(color_txt,525252)
$puts(color_red,0000A8)

$puts(color_bitrate,
$ifgreater(%__bitrate%,0,$rgb(255,0,0),)
$ifgreater(%__bitrate%,64,$blend(000000,0000FF,$sub(%__bitrate%,64),192),)
$ifgreater(%__bitrate%,256,0000FF,)
)

// ..
$puts(lenght_bar,60)
$puts(timeleft2flash,11)


////////////////////////
// Real work ...
/////////

//
$puts(color_rem_time,$ifgreater($get(timeleft2flash),%_time_remaining_seconds%,$select($add($mod(%_time_elapsed_seconds%,2),1),$get(color_red),$get(color_txt)),$get(color_txt)))

//
'['$get(color_txt)$lower($ext(%_filename_ext%)) -
$get(color_bitrate)$if($strcmp(%__extrainfo%,VBR),$char(177))%__bitrate%$get(color_txt)kbps
-
$get(color_txt)$if(%__channels%,$ifgreater(%__channels%,2,%__channels%,$ifgreater(%__channels%,1,Stereo,Mono)),)
']'
---
'['$get(color_txt)%artist% - $get(color_txt)%title%']'
---
'['$get(color_txt)#%tracknumber% - $get(color_txt)%album% - $get(color_txt)%date%']'
    
'['$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,$get(lenght_bar),$get(color_bar_played)|,$get(color_bar)|)']'
---
'['$get(color_txt)%_time_total% /$get(color_rem_time) %_time_remaining%']'

    
'['$get(color_txt)$if(%_ispaused%,puased,playing)']'


I know the code is a bit messy, but it works.
The remaining time starts flashing in the +/- last 10 secconds. Tis still isn't exact, and I'll work on that.

screenshot (http://brokenliquid.student.utwente.nl/~mafioso/foobar2000_2.jpg)

I've also added red a Red > and < in the playlist, to indicate which file is playing:
Code: [Select]
EBEBEB|EBEBEB$num(%_playlist_number%,4) 

$if(%_isplaying%,0000A8|0000A8>EBEBEB|EBEBEB,|)

$if($strcmp($num(%tracknumber%,2),'01'),FFFFFF|FFFFFF)
$if($strcmp($num(%tracknumber%,2),'01'),$puts(spacer,-),$puts(spacer, ))

$if(%tracknumber%,$num(%tracknumber%,2),  ) |

$cut(%artist%,30)$repeat($get(spacer),$sub(30,$len(%artist%))) |
$cut(%title%,30)$repeat($get(spacer),$sub(30,$len(%title%))) |
$if(%date%,$padcut(%date%,4),    ) |
$cut(%album%,30)$repeat($get(spacer),$sub(30,$len(%album%))) |
$padcut(%genre%,12) |
$padcut_right(%_length%,7)
$if(%_isplaying%,0000A8|0000A8<EBEBEB|EBEBEB,|)
Title: Foobar2000 format strings
Post by: Skibbi on 2003-04-15 20:48:38
Quote
I like your windows style Skibbi, what is it?

It's called Dragon Style. I guess I've downloaded it from http://www.themexp.org (http://www.themexp.org) but I'am not sure.
Title: Foobar2000 format strings
Post by: FooBaRaz on 2003-04-16 01:59:37
can anyone make me a playlist format string with the artist, file name, bitrate, and length but pretty? lol...i like all these but i d/l a lot of singles and the albums are really messed up...thanks...
Title: Foobar2000 format strings
Post by: voltron on 2003-04-16 02:09:56
are all your files tagged correctly?
Title: Foobar2000 format strings
Post by: FooBaRaz on 2003-04-16 02:10:51
no, what is a good tag editor?
Title: Foobar2000 format strings
Post by: nexus on 2003-04-16 08:18:43
Hi there, here's mine:

(http://www.olani.com/nexus/nexusfb2kwin.jpg)

playlist:
Quote
// -------------  playlist ------------------- //

$if(%_isplaying%,ff9900|000000$char(9835),$char(32))
$char(32)

$if($num(%_playlist_number%,4),$if(%_isplaying%,ff9900|000000,)
$abbr($num(%_playlist_number%,4)).$char(32)ffffff|000000)

$if(%artist%,$if(%_isplaying%,ff9900|000000,)
$padcut(%artist%,24)$char(32)$char(7)$char(32)ffffff|000000)

$if(%title%,$if(%_isplaying%,ff9900|000000,)
$abbr(%title%,70)ffffff|000000)

// track time

$char(9)$if(%_length%,$if(%_isplaying%,ff9900|000000,)
$abbr(%_length%,5)ffffff|000000)

$char(32)
$if(%_isplaying%,ff9900|000000$char(17),$char(32))


here's foobar on my desktop (transparent). (http://www.olani.com/nexus/nexusfb2k.jpg)
Title: Foobar2000 format strings
Post by: Schinkentoni on 2003-04-16 10:23:54
When I use e.g. nexus' format string, $char(xx) is displayed as  and $padcut(xx) is displayed with 3 or 4 "blanks".
I have beta20 and Win98SE. What's wrong?
Title: Foobar2000 format strings
Post by: Ghim on 2003-04-16 10:50:34
Nexus> I think it's a cool "typeset"
What's the font you used ??

Could you give your complete code and not just the playlist one ?

thx
Title: Foobar2000 format strings
Post by: Bushwack on 2003-04-16 11:07:25
Quote
here's foobar on my desktop (transparent). (http://www.olani.com/nexus/nexusfb2k.jpg)

wow I've seen alot of different playlist strings and alot of screen shots, many of which are much more technical, but this is the first one that I accually like the look of.  Now if you just got rid of that fat ugly blue bar along the top you'd have something that might be worth unminimising foobar for.

Nice Job.

PS please share what font you're using.
Title: Foobar2000 format strings
Post by: Atlantis on 2003-04-16 11:30:38
Quote
I made a new statusbar code...

Hi Mafioso,
great status bar!!!

I've "tweaked" your status bar code (some error like "puased" and missing spaces )
Hope you like it.

Code: [Select]
$puts(color_bar_played,0000A8)
$puts(color_bar,525252)
$puts(color_txt,525252)
$puts(color_red,0000A8)
$puts(color_bitrate,
$ifgreater(%__bitrate%,0,$rgb(255,0,0),)
$ifgreater(%__bitrate%,64,$blend(000000,0000FF,$sub(%__bitrate%,64),192),)
$ifgreater(%__bitrate%,256,0000FF,)
)
$puts(lenght_bar,120)
$puts(timeleft2flash,11)
$puts(color_rem_time,$ifgreater($get(timeleft2flash),%_time_remaining_seconds%,$select($add($mod(%_time_elapsed_seconds%,2),1),$get(color_red),$get(color_txt)),$get(color_txt)))
'['$get(color_txt)$lower($ext(%_filename_ext%)) -
$get(color_bitrate)$if($strcmp(%__extrainfo%,VBR),$char(177))%__bitrate%$get(color_txt) kbps -
$get(color_txt)$if(%__channels%,$ifgreater(%__channels%,2,%__channels%,$ifgreater(%__channels%,1,stereo,mono)),)
']' -
'['$get(color_txt)%artist% - $get(color_txt)%title%']' - '['$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,$get(lenght_bar),$get(color_bar_played)|,$get(color_bar)|)']' - '['$get(color_txt)%_time_total% /$get(color_rem_time) %_time_remaining%']' '['$get(color_txt)$if(%_ispaused%,paused,playing)']'


BTW = On long filenames (like "Peter Gabriel - The Man that loved the Earth / The Hand that sold Shadows" the playtime bar configured to 120 | goes out of the info area: is it possible to dinamically adapt the lenght of that value ?

Bye & thanks for the statusbar again
Title: Foobar2000 format strings
Post by: Mafioso on 2003-04-16 14:46:40
Puased .. damn I've to watch my typin'

and it's nice you like the status bar.

the progress bar is over the tech info because of its centered (by that TAB). You could remove the tab, but that it isn't centerd anymore. A other solution is to check the artist+title name. something like this:
Code: [Select]
$puts(lenght_bar,$sub(100,$len(%artist%' - '%title)))

that is you are using a monospaced font.

If you are using a NON-monospaced font you want to have something like this:
Code: [Select]
$puts(lenght_bar,$sub(160,$mul(2,$len(%artist%' - '%title))))


You may have to tweak those values

[Edit]
I've also changed
Code: [Select]
$puts(color_rem_time,$ifgreater($get(timeleft2flash),%_time_remaining_seconds%,$select($add($mod(%_time_elapsed_seconds%,2),1),$get(color_red),$get(color_txt)),$get(color_txt)))
into
Code: [Select]
$puts(color_rem_time,$ifgreater($get(timeleft2flash),%_time_remaining_seconds%,$select($add($mod(%_time_remaining_seconds%,2),1),$get(color_red),$get(color_txt)),$get(color_txt)))
to make sure the remaining time starts flashing at 0:10.
Title: Foobar2000 format strings
Post by: smok3 on 2003-04-16 17:23:35
my latest/greatest:
snap: http://users.volja.net/smoker/pub/foobar20...2000_beta20.png (http://users.volja.net/smoker/pub/foobar2000_beta20.png)
(progress bar and other active numbers were moved to window title to avoid 'blinking')
(cfg file is on my home page, scroll to bottom...)  B)
Title: Foobar2000 format strings
Post by: anza on 2003-04-16 17:26:46
The same things as usual:
1) The first dot is red if the file is mp3pro (has a custom %mp3% tag), white for mp3 and as a new feature it's green for mpc files.
2) The second dot is red if the file hasn't got replaygain_track_gain, otherwise it's white.

The progress-bar in the status bar changes it's length like this:
1) when the file is 99kbps or less, it gets one '=' longer.
2) if the file is 10 minutes or more long, it's one '=' shorter and when it's played for 10:00 or more it's shortened even one '=' more.
This way it fits always perfectly where it belongs. This code isn't perfectly optimized, but it works, and so I think I won't make it any clearer.

Notes:
1) The code's are made for MY needs and so the colouring of text according to the bitrate of the files is for MY files, the length of the status-bar is for MY config etc etc.
2) The files aren't very well commented, and never won't be. The code from other people isn't changed much, and that's why there still is most of their comments there

(http://koti.mbnet.fi/antsau/foobar/pic/foobar.png)
[foobar on my desktop (http://koti.mbnet.fi/antsau/foobar/pic/foobar_desktop.png)]
[formatting strings (http://koti.mbnet.fi/antsau/foobar)]
Title: Foobar2000 format strings
Post by: nexus on 2003-04-16 17:53:34
Hi all, thanks for the comments, my settings are:

I post it as new replay, with all my latest changes.

http://www.hydrogenaudio.org/forums/index....=300#entry84879 (http://www.hydrogenaudio.org/forums/index.php?act=ST&f=27&t=4899&st=300#entry84879)
Title: Foobar2000 format strings
Post by: Stefoufou on 2003-04-16 18:46:11
My first attempt

Playlist
Quote
$puts(separator,$if(%_isplaying%,DC0C35|FFFFFF|>,- ))
887B81|FFFFFF$num(%_playlist_number%,4)'|'
0500C4|FFFFFF$get(maincol)$padcut_right($if(%tracknumber%,$num(%tracknumber%,2),'  '),2)887B81|FFFFFF'|'
DC0C35|FFFFFF$get(maincol)$if(%_isplaying%,|> ,  )
$get(maincol)$padcut($if(%artist%,%artist%,'Unknown Artist'),25)' '
0500C4|FFFFFF$get(sidecol)$get(separator)' '
383838|FFFFFF$get(mancol)$padcut($if(%album%,%album%,'Unknown Album'),30)' '
0500C4|FFFFFF$get(sidecol)$get(separator)' '
883904|FFFFFF$if(%title%,%title%,%_filename_ext%)' '
$char(9)$get(sidecol)
58B7FC|FFFFFF'['$get(maincol)$padcut_right($if(%date%,%date%,'~~~~'),4)']'
'['$get(maincol)$padcut_right(%__bitrate%,3)']'
887B81|FFFFFF$get(maincol)$padcut_right(%_length%,5)


Status Bar
Quote
'['$padcut($caps2(%artist%),24)']'
'['$padcut($caps2(%album%),25)']'
'['$padcut($caps2(%title%),25)']'
'['$progress(%_time_elapsed_seconds%,%_time_total_seconds%,20,'o','~')']'
'['%_time_elapsed%[ / %_time_total%]']'


Screenshot (http://membres.lycos.fr/stefoufou/foobar.png)
Title: Foobar2000 format strings
Post by: ssamadhi97 on 2003-04-16 19:57:37
Quote
Screenshot (http://membres.lycos.fr/stefoufou/foobar.png)

The Clash - London Calling?

Awesome, one of my favourite albums ever.  *gives it a spin*
Title: Foobar2000 format strings
Post by: sauzer on 2003-04-16 21:33:59
My Cheep Creates PlayList format strings.

(http://www.geocities.co.jp/PowderRoom-Rose/8246/PLImage.Jpg)

playlist

Quote
$if(%title%,%title%,%filename%) || FF1117[%artist%]000000 || 000000%album%[[%disc%/] - $num(%tracknumber%,2)]


Playlist selection color : #858585
Title: Foobar2000 format strings
Post by: Stefoufou on 2003-04-17 06:28:35
Quote
Quote
Screenshot (http://membres.lycos.fr/stefoufou/foobar.png)

The Clash - London Calling?

Awesome, one of my favourite albums ever.  *gives it a spin*

i ve edited both my screenshot and code

yes the clash is wonderful  i very like gun of brixton because this song reminber me my winter holidays
Title: Foobar2000 format strings
Post by: saratoga on 2003-04-17 07:40:22
Stefoufou:

I tried your playlist and a few others.  All of them only display the year in about 1 in 100 songs.   

They worked fine in .586.  Any idea why they don't in .6?
Title: Foobar2000 format strings
Post by: anza on 2003-04-17 09:57:21
Quote
Stefoufou:

I tried your playlist and a few others.  All of them only display the year in about 1 in 100 songs.  

They worked fine in .586.  Any idea why they don't in .6?

Are you ABSOLUTELY sure that the files have the year stored in metadata? It's still the same %date% used, nothing has changed.. Or maybe you have the year stored in %year%, try using it instead of %date%?
Title: Foobar2000 format strings
Post by: Schinkentoni on 2003-04-17 11:05:04
new one for me, similar to smok3

Code: [Select]
$$if(%_isplaying%,0000BF|0000BF$num(%_playlist_number%,4)000000|000000|0000BF|0000BF%artist%949494..............................................................................
..............................................................................$repeat($char(9),3)FF8000|FF8000000000|000000|0000BF|0000BF%title%A6A6A6|A6A6A6$if(%album%, **%album%**,)949494.................................................................................
.................................................................................$repeat($char(9),7)FF8000|FF8000000000|000000|0000BF|0000BF$padcut(%__bitrate% kbps $if(%__extrainfo%,%__extrainfo%,),12) FF8000|FF8000000000|000000|0000BF|0000BF$num($div(%_length_seconds%,60),2):$num($mod(%_length_seconds%,60),2) Min.,0000BF|0000BF$num(%_playlist_number%,4)000000|000000|[%artist%]..............................................................................
..............................................................................$repeat($char(9),3)000000|000000|%title%A6A6A6|A6A6A6$if(%album%, **%album%**,)949494.................................................................................
.................................................................................$repeat($char(9),7)000000|000000|$padcut(%__bitrate% kbps $if(%__extrainfo%,%__extrainfo%,),12) 000000|000000|$num($div(%_length_seconds%,60),2):$num($mod(%_length_seconds%,60),2) Min.)



Playlist font: mono 0755
Title: Foobar2000 format strings
Post by: Stefoufou on 2003-04-17 17:11:28
Quote
Stefoufou:

I tried your playlist and a few others.  All of them only display the year in about 1 in 100 songs.  

They worked fine in .586.  Any idea why they don't in .6?

i have not any problems... and i havent got no solutions for you :/
the code works perfectly with my foobar
Title: Foobar2000 format strings
Post by: DotNoir on 2003-04-18 19:06:06
OK... Here's my modification to Mafiosos code... Using :
Playlist font : Sheldon at 8
Playlist text color : 00040
Playlist background color : 808080
Playlist selection color : 8080C3

Code: [Select]
//DotNoirs playlist modified from Mafiosos list. Lacks all comments and is a "work in progress" 

$puts(x,Unknown Artist)
$puts(y,Unknown Album)

$if(%_isplaying%,> > > |,$num(%_playlist_number%,5) |)

$if($strcmp($num(%tracknumber%,2),'01'),FFFFFF|FFFFFF)
$if($strcmp($num(%tracknumber%,2),'01'),$puts(spacer,-),$puts(spacer, ))

$if(%tracknumber%,$cut($num(%tracknumber%,2),2),00) |

$cut($caps2($if2(%artist%,$get(x))),30)$repeat($get(spacer),$sub(30,$len($if2(%artist%,$get(x))))) |

$cut($caps2($if2(%album%,$get(y))),40)$repeat($get(spacer),$sub(40,$len($if2(%album%,$get(y))))) |

$cut($caps2($if2(%title%,%_filename%)),35)$repeat($get(spacer),$sub(35,$len($if2(%title%,%_filename%)))) |

$padcut_right(%_length%,7) |

$if(%_isplaying%,< ,)


Things still to do :
-Make the played track change the color (I know how to do this, but haven't done yet  )
-Make the album and artist disappear after the first track in playlist (have been studying this thread, so shouldn't be too hard to do...)
-Write status bar and title bar codes...

Screenshot :
My current playlist (http://koti.mbnet.fi/exapathy/fooplaylist.jpg)
Title: Foobar2000 format strings
Post by: thetrivialstuff on 2003-04-19 21:22:35
ok, here's mine:
Code: [Select]

$if(%__replaygain_track_gain%,
$if(%__replaygain_album_gain%,
$if(%_isplaying%,908000|908000,408000|408000),
$if(%_isplaying%,800000|800000,000000|000000)
),
$if(%_isplaying%,800080|800080,707070|707070)
)


$num(%_playlist_number%,3).
 ['['%album% [D%disc%]#$num(%tracknumber%,2)']'  ]
[$if2(%artist%,%performer%) - ]$if2(%title%,%_filename_ext%)
 000000|000000%__samplerate%'Hz' %__channels%'-channel'
$num(%__bitrate%,3)'kbps' $ext(%_filename_ext%)
 $if($or($stricmp('w',$left(%_path%,1)),$stricmp('r',$left(%_path%,1))),'?')
$if($stricmp('M:\!Mounted CD',$left(%_path%,14)),'??')
    000000|000000%_length%


that Mounted CD thing probably won't be much use off my system, but basically i have a folder that i copy songs to when I regain interest in them after putting them on CD.. since a lot of this just shows whether tracks have replaygain info or not, I needed to mark those songs somehow to avoid wasting the effort of scanning them twice. I also needed to mark stuff on cd (the if string compare w or r bit), to make sure it didn't get inadvertently removed from the database by a 'remove dead entries'.

I also made a sorting string that might be of interest:
Code: [Select]
[ÿ$directory(%path%,8) ][ÿ$directory(%path%,7) ][ÿ$directory(%path%,6) ]
[ÿ$directory(%_path%,5) ][ÿ$directory(%_path%,4) ][ÿ$directory(%_path%,3) ]
[ÿ$directory(%_path%,2) ][ÿ$directory(%_path%,1)] %_filename_ext%

it does a real 'sort by file path' (groups directories and sub-dirs rather than scattering them all over the place). the little y-like character is character 255, to ensure that directories get sent below the files... make it a ! or a space or something if you want directories first. and yea i know there's probably a much more efficient way to do that with repeat functions, but I figured since cd's only allow 8 sub-dirs (if you're not cheating) it didn't matter much :P

on that note, can anyone tell me why the output of
Code: [Select]
$put(blah,8)
$repeat(
$put(
blah,$sub($get(blah),1)
)
,7)

is '87777777' and not '87654321'? is this a bug or am I just dumb? :P
Title: Foobar2000 format strings
Post by: Bushwack on 2003-04-19 22:07:54
Quote
on that note, can anyone tell me why the output of
Code: [Select]
$put(blah,8)
$repeat(
$put(
blah,$sub($get(blah),1)
)
,7)

is '87777777' and not '87654321'? is this a bug or am I just dumb?

Sadly that's the programmed behaviour, if the output was '87654321' then string formatting would be extemly powerful (ie: pretty much a complete programming language) unfortunatly most people are not capable of taming such power so string formatting has been limited.
Title: Foobar2000 format strings
Post by: thetrivialstuff on 2003-04-19 22:35:42
nuts
Title: Foobar2000 format strings
Post by: Curi0us_George on 2003-04-19 22:44:29
Quote
on that note, can anyone tell me why the output of
Code: [Select]
$put(blah,8)
$repeat(
$put(
blah,$sub($get(blah),1)
)
,7)

is '87777777' and not '87654321'? is this a bug or am I just dumb?

Because "$sub" returns the difference of the two arguments.  It doesn't modify the first argument.
Title: Foobar2000 format strings
Post by: thetrivialstuff on 2003-04-19 22:50:12
Quote
Quote
on that note, can anyone tell me why the output of
Code: [Select]
$put(blah,8)
$repeat(
$put(
blah,$sub($get(blah),1)
)
,7)

is '87777777' and not '87654321'? is this a bug or am I just dumb? :P

Because "$sub" returns the difference of the two arguments.  It doesn't modify the first argument.

but that's what the $put is for.. why doesn't the $put take the output of the $sub and stick it in the variable blah?
Title: Foobar2000 format strings
Post by: Curi0us_George on 2003-04-19 22:53:02
I think Peter said something about that a while back.  Variables are only asigned the first time.  They cannot be reassigned.  i.e. blah will always be 8.
Title: Foobar2000 format strings
Post by: DotNoir on 2003-04-20 10:46:05
OK... now this is getting a bit ready =) Still lacking comments ;P

My current playlist (http://koti.mbnet.fi/exapathy/Currentplaylist.jpg)

Code: [Select]
//DotNoirs playlist modified from Mafiosos list. Lacks all comments and is a "work in progress" 

$puts(x,Unknown Artist)
$puts(y,Unknown Album)

$if($strcmp($num(%tracknumber%,2),'01'),FFFFFF|FFFFFF)
$if($strcmp($num(%tracknumber%,2),'01'),$puts(spacer,-),$puts(spacer, ))

$if(%_isplaying%,4000400080FF)

$if(%_isplaying%,> > > | ,$num(%_playlist_number%,5) | )

$ifgreater(%tracknumber%, 1,$repeat( ,30)| ,$cut($caps2($if2(%artist%,$get(x))),30)$repeat($get(spacer),$sub(30,$len($if2(%artist%,$get(x)))))| )

$ifgreater(%tracknumber%, 1,$repeat( ,30)| ,$cut($caps2($if2(%album%,$get(y))),30)$repeat($get(spacer),$sub(30,$len($if2(%album%,$get(y)))))| )

$if(%tracknumber%,$cut($num(%tracknumber%,2),2),00) :

$cut($caps2($if2(%title%,%_filename%)),35)$repeat($get(spacer),$sub(35,$len($if2(%title%,%_filename%))))|

$padcut_right($num($div(%_length_seconds%,60,60),2):$num($div(%_length_seconds%,60),2):$num($mod(%_length_seconds%,60),2),8) |

'['$pad_right(%__bitrate%/$div(%__samplerate%,1000),6)']'

$if(%_isplaying%,< ,)
Title: Foobar2000 format strings
Post by: kode54 on 2003-04-20 13:35:54
Quote
I think Peter said something about that a while back.  Variables are only asigned the first time.  They cannot be reassigned.  i.e. blah will always be 8.

Actually, the limitation is that $put() will store the evaluated results, not the enclosed script code, so it will not be re-evaluated for every repetition. I don't think Peter intends to open the script system to any recursive functions or looping whatsoever.
Title: Foobar2000 format strings
Post by: nexus on 2003-04-21 01:02:53
(http://www.olani.com/nexus/0623win.png)

Playlist:

Quote
// ------------- playlist ------------------- //
// -------- courier new, bold, 9 ------- //

$puts(plscol,ff9900|000000)
$puts(plsabb,ffffff|000000)

$if(%_isplaying%,$get(plscol)$char(9835),$char(32))$char(32)

$if($num(%_playlist_number%,4),$if(%_isplaying%,$get(plscol),)
$abbr($num(%_playlist_number%,4)).$char(32)$get(plsabb))

$if(%artist%,$if(%_isplaying%,$get(plscol),)
$padcut(%artist%,24)$get(plsabb))

$if(%title%,$if(%_isplaying%,$get(plscol),)
$char(32)$char(7)$char(32)$abbr(%title%,70)$get(plsabb))

$char(9)$if(%_length%,$if(%_isplaying%,$get(plscol),)
$abbr(%_length%,5)$get(plsabb))

$char(32)$if(%_isplaying%,$get(plscol)$char(17),$char(32))


Status Bar:

Quote
// ------------- status ------------------- //
// --------- tahoma, bold, 8 ---------- //

$puts(stscol,4f4f2f)
$puts(dtime,$get(stscol)

$if2(-%_time_remaining%,%_time_elapsed%))

$substr(%_foobar2000_version%,11,12)
$substr(%_foobar2000_version%,13,15).
$substr(%_foobar2000_version%,22,24)$char(32)

$upper($ext(%_filename_ext%))|

$if($strstr(%_path_raw%,'cdda://'),'Audio CD'|,)
$if($strstr(%_path_raw%,'http://'),'Stream'|)
%__bitrate%k|$div(%__samplerate%,1000)k|

$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,
$ifgreater(%__channels%,1,$char(8734),'o')),)

$puts(povl,$sub(32,$len($get(stscol))))
$puts(pbar,$get(stscol)$char(5)$progress2(%_time_elapsed_seconds%,
%_time_total_seconds%,$get(povl),$char(9608),$char(9620))$char(5)
$num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),2)'%')
$if(%_time_total_seconds%,$puts(pbdis,$get(pbar)),)

$char(32)$get(stscol)$char(9)$get(pbdis)$char(9)$get(dtime)$char(32)


Windows Title:

Quote
$char(9738)$char(32)
%artist% - %title%


System Tray:

Quote
%title%



Copy Command:

Quote
%artist% - %title%


Playlist Text Color: White
Playlist Background Color: Black
Playlist Selection Color: RGB: 243,243,243
Selected Item Frame Color: RBG: 236,233,216
File Info Font: Courier New, Style: Regular, Size: 10
Transparency: about 15%

I'm Using the Unicode Version v0.6.23 with WindowsXP Pro.
:-)

Enjoy Everybody.

foobar2000 0.6.23 on my desktop, with transparency (http://www.olani.com/nexus/0623full.png)
Title: Foobar2000 format strings
Post by: Max on 2003-04-21 16:02:36
I have an Question:

Ive made this Status Bar with an few TitleFormatings from this thread but i have an Problem:

Code: [Select]
// Ani Fooooobaar
8000FF=>
$get(BR_C)$select($add($mod(%_time_elapsed_seconds%,12),1),
'f',
'fo',
'foo',
'foob',
'fooba',
'foobar',
'fooba',
'foob',
'foo',
'fo',
'f',
' ')
8000FF
<=
// -------------  tech info ------------------- //

// file extension if any
$puts(EXT,$upper($ext(%_filename_ext%)))

// store tech info in TD variable
$puts(TD,$char(3)4f4f2f$char(3)

// display extenstion if any

$ifgreater($len($get(EXT)),0,$get(EXT)|,)

// stream
$if($strstr(%_path_raw%,'http://'),'stream|')

// CD
$if($strstr(%_path_raw%,'cdda://'),'Compact Disc Digital Audio',)

// MPC file - get profile
$if($stricmp($get(EXT),'MPC'),
$cut($substr(%__mpc_profile%,2,$sub($len(%__mpc_profile%),1)),10)|
,)

// Ogg file - get codec
$if($stricmp($get(EXT),'OGG'),%__codec%|,)

// bitrate
[%__bitrate%k|]

// samplerate in kHz
[$div(%__samplerate%,1000)k|]

// number of channels
$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,
$ifgreater(%__channels%,1,$char(8734),'o')),)
$char(3)$char(3))$char(9)

// -----------  end of tech info ---------------- //

// ---------------  done - display status bar ------------------//

$char(32)$get(TD)$char(9)$get(PR)$char(9)$get(RT)$char(32)    
$char(9)
'{'$progress(%_time_elapsed_seconds%,%_time_total_seconds%,30,0000FF'||','|')'}'  %_time_elapsed%


The Problem is that the "// -------------  tech info ------------------- //" moves with the "// Ani Fooooobaar"

How can i stop that?
Title: Foobar2000 format strings
Post by: Frank Bicking on 2003-04-21 16:53:48
Change it to:
Code: [Select]
// Ani Fooooobaar
8000FF=>
$get(BR_C)$select($add($mod(%_time_elapsed_seconds%,12),1),
'f',
'fo',
'foo',
'foob',
'fooba',
'foobar',
'fooba',
'foob',
'foo',
'fo',
'f',
)
8000FF
<=
E3DFE0
$get(BR_C)$select($add($mod(%_time_elapsed_seconds%,12),1),
'oobar',
'obar',
'bar',
'ar',
'r',
,
'r',
'ar',
'bar',
'obar',
'oobar',
'foobar')
E3DFE0

// -------------  tech info ------------------- //

// file extension if any
$puts(EXT,$upper($ext(%_filename_ext%)))

// store tech info in TD variable
$puts(TD,$char(3)4f4f2f$char(3)

// display extenstion if any

$ifgreater($len($get(EXT)),0,$get(EXT)|,)

// stream
$if($strstr(%_path_raw%,'http://'),'stream|')

// CD
$if($strstr(%_path_raw%,'cdda://'),'Compact Disc Digital Audio',)

// MPC file - get profile
$if($stricmp($get(EXT),'MPC'),
$cut($substr(%__mpc_profile%,2,$sub($len(%__mpc_profile%),1)),10)|
,)

// Ogg file - get codec
$if($stricmp($get(EXT),'OGG'),%__codec%|,)

// bitrate
[%__bitrate%k|]

// samplerate in kHz
[$div(%__samplerate%,1000)k|]

// number of channels
$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,
$ifgreater(%__channels%,1,$char(8734),'o')),)
$char(3)$char(3))$char(9)

// -----------  end of tech info ---------------- //
$char(9)
// ---------------  done - display status bar ------------------//

$char(32)$get(TD)$char(9)$get(PR)$char(9)$get(RT)$char(32)
$char(9)
'{'$progress(%_time_elapsed_seconds%,%_time_total_seconds%,30,0000FF'||','|')'}'  %_time_elapsed%

Just change the E3DFE0 to your window color.
Title: Foobar2000 format strings
Post by: flloyd on 2003-04-22 00:12:55
DotNoir, I love that you were able to get foobar to only show the album and artist on the first song. Please keep us updated as you change your settings. Thanks.
Title: Foobar2000 format strings
Post by: anishbenji on 2003-04-22 03:33:59
Here is my foobar setup

Title: Foobar2000 format strings
Post by: nuhi on 2003-04-22 19:53:20
I updated my tree like playlist.
Font Terminal on both, playlist and status bar, a MUST.

//Playlist
$puts(pl,$if(%_isplaying%,CCCCCC|CCCCCC,F0A300|F0A300))
$puts(bl,620000|620000)
$get(bl)$if(%_isplaying%,$char(16),$char(32))
$ifgreater(%tracknumber%,1,
$repeat(' ',$len( %artist%))
$repeat(' ',$len( $abbr([%album%],40))),
F0A300|F0A300[$caps( %artist%)]
$get(bl)$caps($abbr([ %album%],40)))
$get(bl)$if(%title%,
$if(%tracknumber%,$ifgreater(%tracknumber%,1,$char(258)'-',$char(194)'-'))
[$num(%tracknumber%,2)]$get(pl)$caps( %title%),
$get(pl)$caps( %_filename%))
$char(9)
$get(bl)$get(pl)%_length%$get(bl)'min'
$get(bl)$char(322)$get(pl)$num(%__bitrate%,3)$get(bl)'kbps'
$get(bl)$char(322)$get(pl)$cut(%__samplerate%,2)$get(bl)'khz'
$get(bl)$if(%_isplaying%,$char(17),$char(32))

//Status Bar
$char(9)620000$char(368) %_time_elapsed%
$progress(%_time_elapsed_seconds%,%_time_total_seconds%,100,$char(355),
$char(368)) $div($sub(%_time_total_seconds%,%_time_elapsed_seconds%),60)
:$num($mod($sub(%_time_total_seconds%,%_time_elapsed_seconds%),60),2) $char(368)
$char(9)$if(%_ispaused%,paused,playing) $if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)),) $ext(%_path%)
Title: Foobar2000 format strings
Post by: stripe on 2003-04-22 20:14:45
I have all my music organized into directories by artist, and wanted to have some kind of visual clue to differentiate between artists... ideally it would just alternate colors between artists or have some kind of separation bar, but this is the best I could come up with:
Code: [Select]
$put(x,$right($mul($len(%_directoryname%),3),1))$get(x)$get(x)$get(x)$get(x)$get(x)

stripe
Title: Foobar2000 format strings
Post by: DotNoir on 2003-04-22 20:51:47
Quote
DotNoir, I love that you were able to get foobar to only show the album and artist on the first song. Please keep us updated as you change your settings. Thanks.

Well... This wasn't my own thing... Sobody said how to do it in this thread and I thought that it was cool, so I built the playlist on that...  But thanks for the comments.
Title: Foobar2000 format strings
Post by: igorsanches on 2003-04-22 20:57:35
Ok, here's my stuff... (keep it simple stupid!)

screenshot: here (http://pf.mine.nu:1234/or/foobar.gif)

note: 'b' indicates low bitrate and 's' low samplerate, |unknown| for missing fields

Quote
PLAYLIST:
$put(isplaying_color,FFFFFF|FFFFFF)
$put(normal_color,AAAAAA|000000)
$put(title_color,DDDDDD|000000)
$put(accepted_color,00DDDD|000000)
$put(bad_color,0000DD|000000)

$if(%_isplaying%,$get(isplaying_color),$get(normal_color))

%_playlist_number%: 

$if(%title%,

$if(%artist%,%artist%,$get(bad_color)|unknown|)
$if(%_isplaying%,$get(isplaying_color),$get(normal_color))
-
$if(%album%,%album%,$get(bad_color)|unknown|)
$if(%_isplaying%,$get(isplaying_color),$get(normal_color))
-
$if(%_isplaying%,,$get(title_color))
$if(%tracknumber%,$num(%tracknumber%,2),$get(bad_color)|?|)
$if(%_isplaying%,$get(isplaying_color),$get(normal_color))
$if(%_isplaying%,,$get(title_color))
-
%title%
,
$get(bad_color)%_filename%
$if(%_isplaying%,$get(isplaying_color),$get(normal_color)))

$char(9)
$ifgreater(%__bitrate%,170,,
$ifgreater(%__bitrate%,128,$get(accepted_color),$get(bad_color))b)
$ifgreater(%__samplerate%,44000,,$get(bad_color)s)
$if(%_isplaying%,$get(isplaying_color),$get(normal_color))

[$if(%_isplaying%,$get(isplaying_color),)%_length%]


COPY COMMAND:
$if(%title%,

$if(%artist%,%artist%,|unknown|)
-
$if(%album%,%album%,|unknown|)
-
$if(%tracknumber%,$num(%tracknumber%,2),|?|)
-
%title%
,%_filename%)



SYSTEM TRAY:
$if(%title%,

$if(%artist%,%artist%,|unknown|)
-
$if(%album%,%album%,|unknown|)
-
$if(%tracknumber%,$num(%tracknumber%,2),|?|)
-
%title%
,%_filename%)


WINDOW TITLE:
$if(%title%,

%title%
-
$if(%tracknumber%,$num(%tracknumber%,2),|?|)
-
$if(%album%,%album%,|unknown|)
-
$if(%artist%,%artist%,|unknown|)
,%_filename%)


STATUS BAR:
[%__codec%]
[ %__bitrate%Kbps [%__extrainfo%]]
[ $div(%__samplerate%,1000)KHz]
$if(%__channels%,
$ifgreater(%__channels%,2,
%__channels%ch,
$ifgreater(%__channels%,1,'(stereo)','(mono)')) ,)

$char(9)
$if(%_time_total_seconds%,'('
$div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%)'%)',)  
[%_time_elapsed%][ / %_time_total%]
Title: Foobar2000 format strings
Post by: Bushwack on 2003-04-22 21:25:40
stripe what you'll want to do is hash the %artist% or %_directoryname% or $replace(%_path%,\%_filename_ext%,))  field depending on your music collection.

Check out this (http://www3.telus.net/abush2/random_album_string.txt) sorting string or this (http://www.hydrogenaudio.org/forums/index.php?act=ST&f=27&t=7603&view=old&) thread to see a simple way to hash a field, sould be easy to modify to fit your needs.
Title: Foobar2000 format strings
Post by: stripe on 2003-04-23 00:31:37
Bushwack: thanks, but is there no way to make it alternate between just two colors?  I'm not sure if I fully understood the code in the threads you provided but it looked like just a much more complicated way of doing what I did with my one line of code.  Since there's no way to carry over variables the only way of doing truly alternating colors seems like it would need to somehow figure out where each directory was with reference to an absolute alphabetical ordering of all the directories... but I doubt that is possible either.  This would much easier if there were just one variable that carried over from previous entries.

(my situation is that I have all my songs organized by artist into directories, and all those directories in one big one)

Also, my 700mhz computer scrolls noticeably slower if more code is used in the playlist...

stripe/ben
Title: Foobar2000 format strings
Post by: TurinsRevenge on 2003-04-23 02:50:43
Not elegant, but if you added a number or specific character to either the track's tech info or the directory name you could change color based on that:

i.e. Red on R, green on G

c:\music\rolling_stones_R\
c:\music\mozart_G\
c:\music\Black_Sabbath_R\

later, if you add a new directory in the middle, you'd have to change the letter of 1 directory name

You'd also be able to strip it out easily since it's always the last 2 characters.

Not pretty, and very crude, but it would only be one small $if statement to detect and change color
Title: Foobar2000 format strings
Post by: Bushwack on 2003-04-23 06:24:52
Sorry I didn't see the alternate between just two colours part.  Hashing the atrist field will give you an unique colour for every artist, but I can't think of a way to alternate between only 2 colours.
Title: Foobar2000 format strings
Post by: pootify on 2003-04-23 06:27:33
foobar screenshot (http://charlie.mg2.org/foodesk.png) (high res)

not so much programming innovation, just clean color scheme. also made slight modification to just show artist - title if no album info is present, instead of the (imho) ugly "???" tag. the playlist code is modified from ranor's, the status bar is someone else's in this thread . also took out the mp3pro indication code since i didn't have any mp3pros, hee. i was going for slim.

Code: [Select]
//PLAYLIST
//make playlist number black if playing
$if(%_isplaying%,000000|000000>>>>,FFFFFF|FFFFFF$num(%_playlist_number%,3).)

0000FF|0000FFù

// if playing make orange
$if(%_isplaying%,
// artist
27ABFF|27ABFF%artist%
// separator
0000FF|0000FF ù

//show album and track if tags exist else just show title
$if(%album%,
// album
27ABFF|27ABFF %album% '('%date%')'
// separator
0000FF|0000FF ù
// title
27ABFF|27ABFF $num(%tracknumber%,2).,) 27ABFF|27ABFF%title%
// length
$char(9)27ABFF|27ABFF%_length%,

// else if not playing make black and white
// artist
000000|000000%artist%

$if(%album%,
// separator
0000FF|0000FF ù
//show album and track if tags exist else just show title
000000|000000$if(%album%,$abbr(%album%,30),) $if(%date%,'('%date%')'
// separator
0000FF|0000FF ù ,)
// title
FFFFFF|FFFFFF
$if(%tracknumber%,$num(%tracknumber%,2). ,),0000FF|0000FF ù )FFFFFF|FFFFFF%title%
// length
$char(9)FFFFFF|FFFFFF%_length%)


playlist background color - R: 103 G: 126 B: 100
playlist selection color - R: 132 G: 156 B: 128
selected item frame - black
playlist font - lime (you can find it in the earlier pages of this thread)

oh, and i used the ° symbol in the track progress bar because i think that looks neater
Title: Foobar2000 format strings
Post by: maus on 2003-04-23 11:14:25
Quote
but is there no way to make it alternate between just two colors?  I

Sure there is

$mod(%_playlist_number%,2)




So, you could do something like:
Code: [Select]
$if($strcmp($mod(%_playlist_number%,2),1),$rgb(0,255,0)green!,$rgb(0,0,255)blue!)
Title: Foobar2000 format strings
Post by: superdumprob on 2003-04-24 13:57:07
Playlist:

Code: [Select]
//playlist number

$num(%_playlist_number%,3)000080|000080'|'

//general info

%artist% 000080|000080'['%album% 000080|000080'#'$num(%tracknumber%,2)000080|000080']' %title%

//playing/replaygain check

$char(9)$if(%_isplaying%,04CDDD|04CDDD ● ,$if($info(replaygain_track_peak),4080FF|4080FF ● ,0044D2|0044D2 ● ))

//compression format

[$upper($pad_right($ext(%_filename_ext%),4))

//bitrate

$pad_right($info(bitrate),4)  

//length mm:ss

$num($div(%_length_seconds%,60),2):$num($mod(%_length_seconds%,60),2)]


Status Bar:

Code: [Select]
$upper($ext(%_filename_ext%)) 
[%__bitrate%kbps ][%__samplerate%Hz]
$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,Stereo,Mono)),)

$char(9)
000080'['$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,30,'●',)
000080'|:B|'
$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,30,,808080'●')000080']'

'['-%_time_remaining%000080']'


All fonts: Tahoma, Regular, 8. (Windows 2000 Unicode version)
Playlist Font Colour: RGB 221,221,221
Playlist Background Colour: RGB 128,128,128
Playlist Selection Colour: 170,170,170
Playlist Selection Item Frame Colour: RGB 0,0,0

Well that's mine, try it out, see what you think. I'll see if I can get a picture posted in a bit...

EDIT: The '●'s are filled circles, unicode character 25CF. I don't think $char() unicode characters work in the status bar. THey don't seem to for that character anyway.
Title: Foobar2000 format strings
Post by: Rommel on 2003-04-25 00:57:55
updated (more simple)

playlist:
Code: [Select]
$if(%_isplaying%,0080FF|000000$num(%_playlist_number%,3).  %artist%  '['%album% - ''%date% - CD%disc%#$num(%tracknumber%,2) - $pad_right(%_length%,5)']'  %title%,808080$num(%_playlist_number%,3).  %artist%  808080'['%album% - ''%date% - CD%disc%#$num(%tracknumber%,2) - $pad_right(%_length%,5)']'  %title%)


status bar:
Code: [Select]
 %artist% - %title%    '['$upper($ext(%_filename_ext%))[ - %__bitrate%kbps][ - %__extrainfo%][ - %__channels%ch][ - $div(%__samplerate%,1000)kHz]']'   '['$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,50,|,C0C0C0|)']'   '['[%_time_elapsed%]/[%_time_total%]']'


screenshot (http://www.stupidario.com/img/fb2k_v06.png)
Title: Foobar2000 format strings
Post by: Max on 2003-04-25 02:01:24
Quote
foobar screenshot (http://charlie.mg2.org/foodesk.png) (high res)

Whats the name of the Programm where you can see, CPU temp and Down/Up stream Etc. you have on your Desktop??


Thx a Lot
Title: Foobar2000 format strings
Post by: TurinsRevenge on 2003-04-25 02:23:12
The ones I know of are Samurize and CoolMon.  They're both free. If you have Norton System Works, then  System Doctor can also do it.  I've used all three and they're all very good.  I prefer Samurize closely followed by CoolMon and then System Doctor.

But looking at your screen shot, you already seem to have one of them
Title: Foobar2000 format strings
Post by: Max on 2003-04-25 02:34:34
Quote
The ones I know of are Samurize and CoolMon.  They're both free. If you have Norton System Works, then  System Doctor can also do it.  I've used all three and they're all very good.  I prefer Samurize closely followed by CoolMon and then System Doctor.

But looking at your screen shot, you already seem to have one of them

???
Title: Foobar2000 format strings
Post by: penvzila on 2003-04-25 04:11:07
How do you make only the window content transparent?
Title: Foobar2000 format strings
Post by: smok3 on 2003-04-25 08:07:55
Quote
???

http://coolmon.arsware.org/ (http://coolmon.arsware.org/)
Title: Foobar2000 format strings
Post by: cyborg on 2003-04-25 08:32:14
I have a problem. I tried to make the status bar show songs codec (Vorbis, MP3, Musepack, etc) and it worked, but not in APE files. My format string is supposed to show the songs codec and if the decoder doesn't report it, then it shows the songs file extension. Here is my format string:

Status bar:

$puts(extension,$upper($ext(%_filename_ext%)))
$puts(packer,$caps2($info(codec)))
$abbr($if(%album%,%album%,Unknown album),69) <> [$if($get(packer),$get(packer),$get(extension)) ] [0000FF[%__bitrate%] kbps] [FF0000$div(%__samplerate%,1000).$substr(%__samplerate%,3,3) kHz] 6C00D9$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)[%__extrainfo%] <> %_time_elapsed% <> $num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),1) '%'

When I play APE files, it doesn't show the codec or the file extension, why not? Have I made something wrong or is it a bug in fb2k? I'm using foobar2000 v0.6 in Win98SE.
Title: Foobar2000 format strings
Post by: TurinsRevenge on 2003-04-25 09:05:02
Quote


The bottom right hand side text is similar to what Samurize or CoolMon could provide.

Samurize (http://www.samurize.com)
Title: Foobar2000 format strings
Post by: pootify on 2003-04-25 11:22:00
yep, it's coolmon. but comment on my foobar scheme! heh
Title: Foobar2000 format strings
Post by: Max on 2003-04-25 15:22:31
THX
Title: Foobar2000 format strings
Post by: Max on 2003-04-25 15:56:38
Playlist:

Code: [Select]
$puts(separator,$if(%_isplaying%,DC0C35|8000FF=->,- ))
D7C148|FFFFFF$num(%_playlist_number%,4)FFFFFF'|'
48C5D7|FFFFFF$get(maincol)$padcut_right($if(%tracknumber%,$num(%tracknumber%,2),'XX'),2)887B81|FFFFFFFFFFFF'|'
0000F4|FFFFFF$get(maincol)$if(%_isplaying%,DC0C35|8000FF=-> ,  )
$get(maincol)$padcut($if(%artist%,%artist%,'Unknown Artist'),50)' '
0500C4|FFFFFF$get(sidecol)$get(separator)' '
EACD44|FFFFFF$get(mancol)$padcut($if(%album%,%album%,'Unknown Album'),70)' '
0500C4|FFFFFF$get(sidecol)$get(separator)' '
0000F4|FFFFFF$if(%title%,%title%,%_filename_ext%)' '
$char(9)$get(sidecol)
42D22D|FFFFFF0000F4|FFFFFF'|'42D22D|FFFFFF$get(maincol)$padcut_right($if(%date%,%date%,'0000'),4)
0000F4|FFFFFF'|'42D22D|FFFFFF$get(maincol)$num(%__bitrate%,3)0000F4|FFFFFF'|'42D22D|FFFFFF$upper($ext(%_path%))0000F4|FFFFFF'|'42D22D|FFFFFF$get(maincol)$padcut_right(%_length%,5)


Staus Bar:

Code: [Select]
// Ani Fooooobaar
8000FF
$get(BR_C)$select($add($mod(%_time_elapsed_seconds%,12),1),
'R',
'Ri',
'Rip',
'RipR',
'RipRE',
'RipREX',
'RipRE',
'RipR',
'Rip',
'Ri',
'R',
)
8000FF

0000FF
$get(BR_C)$select($add($mod(%_time_elapsed_seconds%,12),1),
'ipREX',
'pREX',
'REX',
'EX',
'X',
,
'X',
'EX',
'REX',
'pREX',
'ipREX',
'RipREX')
E3DFE0
// -------------  tech info ------------------- //
// file extension if any
$puts(EXT,$upper($ext(%_filename_ext%)))
// store tech info in TD variable
$puts(TD,$char(3)4f4f2f$char(3)
// display extenstion if any
$ifgreater($len($get(EXT)),0,$get(EXT)|,)
// stream
$if($strstr(%_path_raw%,'http://'),'stream|')
// CD
$if($strstr(%_path_raw%,'cdda://'),'Compact Disc Digital Audio',)
// MPC file - get profile
$if($stricmp($get(EXT),'MPC'),
$cut($substr(%__mpc_profile%,2,$sub($len(%__mpc_profile%),1)),10)|
,)
// Ogg file - get codec
$if($stricmp($get(EXT),'OGG'),%__codec%|,)
// bitrate
[%__bitrate%k|]
// samplerate in kHz
[$div(%__samplerate%,1000)k|]
// number of channels
$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,
$ifgreater(%__channels%,1,$char(8734),'o')),)
$char(3)$char(3))
// -----------  end of tech info ---------------- //
// ---------------  done - display status bar ------------------//
$char(32)$get(TD)$char(9)$get(PR)$char(9)$get(RT)$char(32)
$char(9)
'{'$progress(%_time_elapsed_seconds%,%_time_total_seconds%,30,0000FF'|','l')'}'  %_time_elapsed%
Title: Foobar2000 format strings
Post by: anza on 2003-04-25 19:18:36
My new formatting on my site (http://koti.mbnet.fi/antsau/foobar/).
Looks like this:
(http://koti.mbnet.fi/antsau/foobar/pic/foobar.png)
Title: Foobar2000 format strings
Post by: leland on 2003-04-25 23:24:59
skibbi - i shamelessly stole your code, but when I have albums of different length titles,  the pipes between album and song names don't appear...

years don't come up either. they're in my id3 tags, too...

I think I'll need to go through the documentation now... ;-) I know, I know RTFM. In any event, just wanted to pay the compliment and say I liked it a lot; as well as the one playlist that highlighted the first track of every album in the playlist...pretty sweet idea

now to go do it
Title: Foobar2000 format strings
Post by: superdumprob on 2003-04-26 00:55:51
Cyborg:

Quote
I have a problem. I tried to make the status bar show songs codec (Vorbis, MP3, Musepack, etc) and it worked, but not in APE files. My format string is supposed to show the songs codec and if the decoder doesn't report it, then it shows the songs file extension. Here is my format string:

Status bar:

$puts(extension,$upper($ext(%_filename_ext%)))
$puts(packer,$caps2($info(codec)))
$abbr($if(%album%,%album%,Unknown album),69) <> [$if($get(packer),$get(packer),$get(extension)) ] [0000FF[%__bitrate%] kbps] [FF0000$div(%__samplerate%,1000).$substr(%__samplerate%,3,3) kHz] 6C00D9$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)[%__extrainfo%] <> %_time_elapsed% <> $num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),1) '%'

When I play APE files, it doesn't show the codec or the file extension, why not? Have I made something wrong or is it a bug in fb2k? I'm using foobar2000 v0.6 in Win98SE.


I'm not sure why but instead of using $puts() for the extension and codec, if you just put them in the corresponding $if() string it works fine. Maybe it has something to do with using...

Code: [Select]
$if($caps2($info(codec)),$caps2($info(codec)),$upper($ext(%_filename_ext%)))


...instead of...

Code: [Select]
$if($info(codec),$caps2($info(codec)),$upper($ext(%_filename_ext%)))


The latter of which works. It displays "APE" now at least (as there doesn't appear to be a codec=~ field put in by the mac encoder i used to test one file for you! tee hee) and it does actually make the string slightly shorter which is the whole idea of $puts() as far as i can tell. Oh well. Enjoy.
Title: Foobar2000 format strings
Post by: nexus on 2003-04-26 08:53:33
Ok guys, that's what i'm using right now, for now i like it...
few code changes since my last post...

(http://www.olani.com/nexus/v06finalwin.png)

Playlist
Quote
// ------------- playlist ------------------- //
// -------- courier new, bold, 9 ------- //

$puts(plscol,ff9900|000000)
$puts(plsabb,ffffff|000000)

$if(%_isplaying%,$get(plscol)$char(9835),$char(32))$char(32)

$if($num(%_playlist_number%,4),$if(%_isplaying%,$get(plscol),)
$abbr($num(%_playlist_number%,4)).$char(32)$get(plsabb))

$if(%artist%,$if(%_isplaying%,$get(plscol))
$padcut(%artist%,24)$get(plsabb))

$if(%artist%,,%_filename%)
$if(%title%,,)

$if(%title%,$if(%_isplaying%,$get(plscol),)
$char(32)$char(7)$char(32)$abbr(%title%,70)$get(plsabb))

$char(9)$if(%_length%,$if(%_isplaying%,$get(plscol),)
$abbr(%_length%,5)$get(plsabb))

$char(32)$if(%_isplaying%,$get(plscol)$char(17),$char(32))


System Tray
Quote
%title%
$if(%title%,,%_filename%)


Windows Title
Quote
$char(9738)$char(32)
%artist% - %title%
$if(%artist%,,%_filename%)
$if(%title%,,)$char(32)
$if(%year%,'('%year%')')


Status Bar
Quote
// ------------- status ------------------- //
// --------- tahoma, bold, 8 ---------- //

$puts(stscol,4f4f2f)
$puts(dtime,$get(stscol)

$if2(-%_time_remaining%,%_time_elapsed%))

$substr(%_foobar2000_version%,11,12)
$substr(%_foobar2000_version%,13,15)
$if($substr.(%_foobar2000_version%,22,24),)$char(32)

$upper($ext(%_filename_ext%))|

$if($strstr(%_path_raw%,'cdda://'),'Audio CD'|,)
$if($strstr(%_path_raw%,'http://'),'Stream'|)
%__bitrate%k|$div(%__samplerate%,1000)k|

$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,
$ifgreater(%__channels%,1,$char(8734),'o')),)

$puts(povl,$sub(32,$len($get(stscol))))
$puts(pbar,$get(stscol)$char(5)$progress2(%_time_elapsed_seconds%,
%_time_total_seconds%,$get(povl),$char(9608),$char(9620))$char(5)
$num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),2)'%')
$if(%_time_total_seconds%,$puts(pbdis,$get(pbar)),)

$char(32)$get(stscol)$char(9)
$if(%year%,$char(32)$char(39)$right(%year%,2))
$get(pbdis)$char(9)$get(dtime)$char(32)


Copy Command
Quote
%artist% - %title%
$if(%artist%,,%_filename%)
$if(%title%,,)


Playlist Text Color: White
Playlist Background Color: Black
Playlist Selection Color: RGB: 243,243,243
Selected Item Frame Color: RBG: 236,233,216
File Info Font: Courier New, Style: Regular, Size: 10
Transparency: About 15%

Windows XP Pro, foobar2000 v0.6 final.

And check this HI-RES image of foobar on my desktop !!! (Click Here) (http://www.olani.com/nexus/v06finalfull.png)
Title: Foobar2000 format strings
Post by: Dr. Strangelove on 2003-04-26 17:17:57
nexus, I love your strings and have pretty much based all my foobar strings from yours.  One thing I did notice and you may want to change is that when a song is 10:00 or longer, the time shows up merely as "1".  I just changed the line:
Code: [Select]
$char(9)$if(%_length%,$if(%_isplaying%,$get(plscol),)
$abbr(%_length%,5)$get(plsabb))
to
Code: [Select]
$char(9)$if(%_length%,$if(%_isplaying%,$get(plscol),)
$abbr(%_length%,6)$get(plsabb))


Everything is great now!  Thanks for the great strings guys!
Title: Foobar2000 format strings
Post by: nexus on 2003-04-27 02:44:58
thanks dude    I changed it too.
btw, i just removed this line from the title window:
Quote
$if(%year%,'('%year%')')

i think it's better now, anyway i can see the year at the left side of the progress bar
Title: Foobar2000 format strings
Post by: cyborg on 2003-04-27 10:14:35
Thank you for your help, superdumprob!
Title: Foobar2000 format strings
Post by: c-a on 2003-04-27 11:19:11
This is what I'm using for now. The code is mostly edited stuff grabbed from this forum.
Also tested with 2 byte languages, works fine.

Screenshot (http://home.abs.or.kr/~cynthia/myfoo.png)

Playlist

Code: [Select]
// Can be used with almost any type of font
// Recommended Asian Fonts : MS PGothic 8 (Japanese) , Gulim 8 (Korean)
// Recommended Western Fonts : Verdana 7 , Tahoma 8 , Arial 8 , MS Sans Serif 8
// PLAYLIST FONT DOES NOT HAVE TO BE MONOTYPED

$puts(opchar,808080 '[')
$puts(clchar,808080']')

// Show play status indicator (Note)
$if(%_isplaying%,AA00FF$char(9835),000000$char(9835))

// Playlist number
$get(opchar)00FFFF$num(%_playlist_number%,4)$get(clchar)

// Show directory information (I prefer sorting albums by directory than ID3)
$get(opchar)00FFAA%_directoryname%$get(clchar)

// For those guys who like sorting albums by ID3 more than directories,
// add slashes to the lines that show the directory info
// $get(opchar)00FFAA$if(%album%,%album%,Unknown Album)$get(clchar)

// Artist info
FFFF00 $if(%artist%,%artist%,'Unknown Artist')

// The dash
808080 -

FFFFFF  $if(%title%,%title%,%_filename%)

// Align right and the length
$char(9)00FFAA%_length%


Window Title
Code: [Select]
$puts(bar, | )

// Get filetype capitalize, show bitrate
$upper($ext(%_filename_ext%))$char(32)$num(%__bitrate%,3)k$get(bar)

// Show fileinfo - if no ID3, returns error
$if(%title%,$if(%artist%,%artist%,No Artist) | $if(%tracknumber%,$num(% tracknumber%,2) . ,)%title% | $if(%album%,%album%,No Album) | ,No ID3 - %_filename_ext%)


Status Bar
Code: [Select]
// Song information presets -  EDIT THESE TO CUSTOMIZE
// --------------------------------------------------------------------
// bar is the seperator
$puts(bar, | )

// Status bar presets - EDIT THESE TO CUSTOMIZE
// --------------------------------------------------------------------
// pastcolor is the color of the beads already passed
// leftchar is the character for the beads already passed
// futurecolor is the color of the beads to be played
// rightchar is the character for the beads to be played
// present is the color of the indication numbers
// sepl is the encloser on the left end of the bar
// sepr is the encloser on the right end of the bar
// plen is the total number of beads
// --------------------------------------------------------------------

$puts(pastcolor,AAAAAA)
$puts(leftchar,•)
$puts(futurecolor,0000FF)
$puts(rightchar,•)
$puts(present,000000)
$puts(sepl,838383 '[')
$puts(sepr,838383 ']')
$puts(plen,40)

// Status bar variants
$puts(time_elap_tot, %_time_elapsed%[ / %_time_total%])
$puts(time_percent,$num([$div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%)],2))
$puts(past_time,$div($mul(%_time_elapsed_seconds%,$get(plen)),%_time_total_seconds%))

// Get filetype capitalize, show bitrate
000000$upper($ext(%_filename_ext%))$char(32)$num(%__bitrate%,3)k$get(bar)

// Show fileinfo - if no ID3, returns error
$if(%title%,$if(%artist%,%artist%,No Artist)$get(bar)$if(%tracknumber%,$num(% tracknumber%,2) . ,)%title%$get(bar)
// For those who prefer ID3 album sorting
//$if(%album%,%album%,No Album)
%_directoryname%$get(bar),000000No ID3 - %_filename_ext%$get(bar)%_directoryname%)
    
// Played time / Total time indicator
$if2(%_time_elapsed%,%_time_elapsed%) [/ %_time_total%]

// Status bar
$get(sepl)$get(pastcolor)$repeat($get(leftchar),$get(past_time))$get(present)$get(time_percent)$get(color_black)$get(futurecolor)$repeat($get(rightchar),$sub($get(plen),$get(past_time)))$get(sepr)


The System tray and Copy command codes are the defaults. Still don't know why people find those features useful.
Title: Foobar2000 format strings
Post by: upNorth on 2003-04-30 19:33:08
To make my playlist display like I want it, I need an extra tag (in addition to 'ARTIST') for 'Various Artists' albums and 'DJ compilations'. The two option I've come by so far are 'PERFORMER' and 'ALBUM ARTIST'.
The first one is an option in Foorbar's built in tagger and is the one I've been using. I'm not really into tagging, but is both 'safe', or is there better solutions?

I've also got an iRiver IMP-400 portable player, and I don't want to make files incompatible with it. It supports: ID3 V1 Tag, ID3 V2 2.0 and ID3 V2 3.0. It's ok if it can't display all the info, as long as it doesn't corrupt the whole tag display.
Title: Foobar2000 format strings
Post by: upNorth on 2003-05-08 11:06:53
My playlist config is based on Ayaka's config from this thread (http://www.hydrogenaudio.org/forums/index.php?act=ST&f=27&t=4899&st=250&).
Screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/desktop.jpg) of foobar2000 on my desktop.
How to make it work as intended (http://www.stud.ntnu.no/~mortek/foobar2000/Notes.txt)
Forgot this in the notes: Monospaced font needed. I use the "Lime" font that I found somewhere in this thread.
Playlist formatting (http://www.stud.ntnu.no/~mortek/foobar2000/Playlist.txt)
Status Bar formatting (http://www.stud.ntnu.no/~mortek/foobar2000/StatusBar.txt)
Window Title formatting (http://www.stud.ntnu.no/~mortek/foobar2000/WindowTitle.txt)
Btw: This is a work in progress, and some of the comments in the code, has not been updated with the latest changes.
I mostly listen to complete albums and it's customized for this.
Title: Foobar2000 format strings
Post by: Ayaka on 2003-05-08 15:36:35
My format needed means to judge single files.
I judege playlist style by file extentions now.
Screenshot (http://lysithea.tripod.co.jp/temp/f2k_2.gif)

Code: [Select]
// Start Configure
//          width of left frame
$puts(album_width,30)
//          character between frames
$puts(sprit,|)
//          character to clip %album%
$puts(album_sprit,-)

//          in playing, space of both side of %tracknumber% are changed into this
$puts(trackno_l,E7E7E7|E7E7E7-)
$puts(trackno_r,E7E7E7|E7E7E7-)

//          width for %album%,if files are not ZIP or RAR
$puts(album_cut_width,30)

//          colors, (need not )
$puts(plno_color,CCCCCC|DADADA)
$puts(sprit_color,7EBABE|7EBABE)
$puts(artist_color,CCCCCC|CCCCCC)
$puts(album_color,2620BE|2620BE)
$puts(album_sprit_color,CCCCCC|CCCCCC)
$puts(title_color,CCCCCC|DADADA)
$puts(trno_color,9A9A9A|AAAAAA)
$puts(time_color,CCCCCC|DADADA)

// End Configure


// Process for %tracknumber%
$puts(trno,
//          in playing, space is changed to <trackno_l>
$if(%_isplaying%,$get(trackno_l),' ')
$get(trno_color)
//          change %tracknumber% into double figures,and if it's empty, change to '--'
$if(%tracknumber%,$num(%tracknumber%,2),--)

//          in playing, : is changed to <trackno_l>
$if(%_isplaying%,$get(trackno_r),666666|666666:)' '
)
// End process for %tracknumber%


// Centering %album%
//          calculate width of fixed format
//          <album_sprit> x2 (both sides) + 2 (spaces for margin)
$puts(width_album_sprit,$add($mul($len($get(album_sprit)),2),2))
//          calculate max width of %album%. <album_width> - <album_sprit>
$puts(width_max,$sub($get(album_width),$get(width_album_sprit)))
//          calculate used space. if %album% is over <width_max>, cut it with $cut()
//          used width is length of (cut) %album% and fixed format
$puts(width_used,$add($len($cut(%album%,$get(width_max))),$get(width_album_sprit)))
//          calculate no-used width. <album_width> - used width.
$puts(width_remainder,$sub($get(album_width),$get(width_used)))

//          Apportion remainder width to right and left. Judge '0.5' width $mod().
$if($stricmp($mod($get(width_remainder),2),1),
$puts(width_l,$div($get(width_remainder),2))
$puts(width_r,$add($div($get(width_remainder),2),1))
,
$puts(width_l,$div($get(width_remainder),2))
$puts(width_r,$div($get(width_remainder),2))
)
// End centering


// Showing playlist number
$get(plno_color)$num(%_playlist_number%,3) $get(sprit_color)$get(sprit)

// If file is RAR or ZIP, go to neat format
//          checking file extension.(%_path_raw% of archive is started from "unpack//")
$if($stricmp($substr(%_path_raw%,1,6),unpack),
//          get file extension. (characters from 10 to 12 of %_path_raw% is file ext)
$if($or($stricmp($substr(%_path_raw%,10,12),rar),$stricmp($substr(%_path_raw%,10,12),zip)),


// If %tracknumber% is 1,%Artist% is shown
$if($stricmp(%tracknumber%,1),
$if(%artist%,$get(artist_color)$padcut(%artist%,$get(album_width))
//          if %tracknumber% is empty, fill up with spaces
,$repeat(' ',$get(album_width))
)
)

// If %tracknumber% is 2, Showing same as larger 3.
$if($stricmp(%tracknumber%,2),
$repeat(' ',$get(album_width))
)

// If %tracknumber% is 3, Showing %album%.
$if($stricmp(%tracknumber%,3),
$if(%album%,
$repeat(' ',$get(width_l))
$get(album_sprit_color)$get(album_sprit)
$get(album_color)$cut(%album%,$get(width_max))
$get(album_sprit_color)$get(album_sprit)
$repeat(' ',$get(width_r))
//          if %tracknumber% is empty, fill up with spaces
,$repeat(' ',$get(album_width))
)
)


// If %tracknumber% is greater than 3, Showing only %title%.
// (Don't forget , in use $ifgreater())
$ifgreater(%tracknumber%,3,
$repeat(' ',$get(album_width))
,)

//          if %tracknumber% is empty, fill up with spaces
$if(%tracknumber%,,$repeat(' ',$get(album_width)))

// right frame is for all tr no.
$get(sprit_color)$get(sprit)$get(sprit)
$get(trno)
$get(title_color)$if(%title%,%title%,%_filename%)
$char(9) $get(time_color)$pad_right(%_length%,5)

// end of $if() ZIP or RAR
)


// , of first $if(), start normal format
,


$if(%artist%,$get(artist_color)$padcut(%artist%,$get(album_width))
//          if %tracknumber% is empty, fill up with spaces
,$repeat(' ',$get(album_width))
)

$get(sprit_color)$get(sprit)$get(sprit)
$get(trno)
$get(title_color)
[$cut(%album%,$get(album_cut_width)) - ]
$if(%title%,%title%,%_filename%)

$char(9) $get(time_color)$pad_right(%_length%,5)

// end of first $if()
)
Title: Foobar2000 format strings
Post by: saratoga on 2003-05-09 01:40:47
Stupid question:

When ever I use a playlist, it never preserves the background color from the pic.  How do I make my background anything but white?
Title: Foobar2000 format strings
Post by: AlfredSka on 2003-05-09 09:10:38
Quote
Stupid question:

When ever I use a playlist, it never preserves the background color from the pic.  How do I make my background anything but white?

You're probably looking in the Title Formatting preference page.  Instead go to Display and select the "Playlist Background Color" button.
Title: Foobar2000 format strings
Post by: SNYder on 2003-05-09 14:33:40
Quote
foobar screenshot (http://charlie.mg2.org/foodesk.png) (high res)

not so much programming innovation, just clean color scheme. also made slight modification to just show artist - title if no album info is present, instead of the (imho) ugly "???" tag. the playlist code is modified from ranor's, the status bar is someone else's in this thread . also took out the mp3pro indication code since i didn't have any mp3pros, hee. i was going for slim.

Code: [Select]
//PLAYLIST
//make playlist number black if playing
$if(%_isplaying%,000000|000000>>>>,FFFFFF|FFFFFF$num(%_playlist_number%,3).)

0000FF|0000FFù

// if playing make orange
$if(%_isplaying%,
// artist
27ABFF|27ABFF%artist%
// separator
0000FF|0000FF ù

//show album and track if tags exist else just show title
$if(%album%,
// album
27ABFF|27ABFF %album% '('%date%')'
// separator
0000FF|0000FF ù
// title
27ABFF|27ABFF $num(%tracknumber%,2).,) 27ABFF|27ABFF%title%
// length
$char(9)27ABFF|27ABFF%_length%,

// else if not playing make black and white
// artist
000000|000000%artist%

$if(%album%,
// separator
0000FF|0000FF ù
//show album and track if tags exist else just show title
000000|000000$if(%album%,$abbr(%album%,30),) $if(%date%,'('%date%')'
// separator
0000FF|0000FF ù ,)
// title
FFFFFF|FFFFFF
$if(%tracknumber%,$num(%tracknumber%,2). ,),0000FF|0000FF ù )FFFFFF|FFFFFF%title%
// length
$char(9)FFFFFF|FFFFFF%_length%)


playlist background color - R: 103 G: 126 B: 100
playlist selection color - R: 132 G: 156 B: 128
selected item frame - black
playlist font - lime (you can find it in the earlier pages of this thread)

oh, and i used the ° symbol in the track progress bar because i think that looks neater

i like your set up a lot, but it comes in all screwed up when i just copy and paste what you pasted in your post.  could u just strait out copy and paste what you have in foobar into a post here for the playlist and status bar.

and yes i downloaded and installed the LIME font
Title: Foobar2000 format strings
Post by: nuhi on 2003-05-09 20:00:10
here is tha' stuff, i mean THE stuff

screenshot (copy and paste the link in a new window)
http://www.freewebs.com/nuhi/capture.jpg (http://www.freewebs.com/nuhi/capture.jpg)

Playlist Background:
R:0
G:36
B:72

You must use TERMINAL FONT on both, playlist and status bar code !

Playlist
::::::::

Code: [Select]
$puts(bl,808080|808080)$puts(gl,4F4F00|4F4F00)$puts(sl,482400|482400)
$puts(pl,$if(%_isplaying%,808080|808080,4F4F00|4F4F00))
$puts(space,$len($longest(%artist%,%album%)))
//playlist number
$get(bl)$ifgreater(%_playlist_number%,9,$ifgreater(%_playlist_number%,99,
%_playlist_number%,$get(gl)'0'$get(pl)%_playlist_number%),$get(gl)'00'$get(pl)%_playlist_number%)$get(gl)$char(322)'  '
//beginning of $if(%title...
$if(%title%,$if(%tracknumber%,
$if($strcmp(%tracknumber%,1),'    '$repeat(' ',$get(space)))
$get(bl)$if($strcmp(%tracknumber%,2),[$caps( %artist%   )]$repeat(' ',$sub($len(%album%),$len(%artist%))))
$if($strcmp(%tracknumber%,3),
$get(gl) $char(340)'-'$get(bl)[$caps(%album%)$get(gl)'Ä']
$repeat('Ä',$sub($len(%artist%),$len(%album%))))
$ifgreater(%tracknumber%,1,
$ifgreater(%tracknumber%,2,
$ifgreater(%tracknumber%,3,'    '$repeat(' ',$get(space)),),),)
$get(gl)$if($strcmp(%tracknumber%,1),'Ú',$if(
$strcmp(%tracknumber%,3),$char(313),$char(258)))
//tracknumber
$get(pl)$ifgreater(%tracknumber%,9,
[$num(%tracknumber%,1)],$get(gl)'0'$get(pl)[$num(%tracknumber%,1)])
$get(gl)$if(%tracknumber%,$ifgreater(%tracknumber%,1,'´',$char(380)))' '
$get(pl)[$caps(%title%)],
//end of $if(%title...
$get(pl)[$caps( %artist% )]$get(gl)[$char(322)' '$caps(%album%)' '$char(322)' ']$get(pl)[$caps(%title% )]),
$get(pl)$caps( %_filename%))$char(9)
//TAG missing info (delete next 3 rows if you don't like it)
$get(sl)$if(%artist%,,$get(gl)'artist '$char(355)' ')$if(%album%,,$get(gl)'album '$char(355)' ')$if(%tracknumber%,,$get(gl)'tracknumber '$char(355)' ')$if(%title%,,$get(gl)'title '$char(355)' ')
'TAG missing'$char(9)
//song tech info
$transition(    %_length%'min',482400|482400,4F4F00|4F4F00)
$get(pl)$char(322)
$transition($num(%__bitrate%,3)'kbps   ',4F4F00|4F4F00,482400|482400)


Status Bar
::::::::::::

Code: [Select]
$char(9)623100%_time_elapsed%'...Ü'
$transition($progress(%_time_elapsed_seconds%,%_time_total_seconds%,100,$char(355),
$char(368)),623100,402000)402000'Ü...'$div($sub(%_time_total_seconds%,%_time_elapsed_seconds%),60)
:$num($mod($sub(%_time_total_seconds%,%_time_elapsed_seconds%),60),2)
$char(9)$if(%_ispaused%, paused,playing) $if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)),) $ext(%_path%) $cut(%__samplerate%,2)'khz'
Title: Foobar2000 format strings
Post by: Nivo on 2003-05-12 08:15:31
I like that one a lot nuhi, but somehow the chars are not displayed correctly for me.. can you (or somebody else) tell me how to find these?
Thanks
Title: Foobar2000 format strings
Post by: ExUser on 2003-05-12 08:45:01
Quote
You must use TERMINAL FONT on both, playlist and status bar code !

I'm not sure if the Terminal font is UTF-8 compatible. IIRC, it was meant to reproduce the standard DOS character set. Just an advisory for people who want to use it.
Title: Foobar2000 format strings
Post by: nuhi on 2003-05-12 13:13:56
Have you changed font to Terminal on playlist and status bar ?
Nivo if you could send me a screenshot here or on mail nuhi@softhome.net
so that i can see what's the problem.
Maybe it's those which I didn't decoded from sign to $Char(*) code.

Edit: You can access all characters for a specific font in Character Map program.
Just type charmap in Run section of windows and run it.

Canar which font do you recommend so others don't have any issues ?
Title: Foobar2000 format strings
Post by: Nivo on 2003-05-12 16:21:46
Nihu, i think it depends on the pc you're using or something like that.... i just tried it on a different pc and it looked quite different then again, with other caracters not showing up.

However, i can fix it with your charmap tip... have been looking for that for a while now, so double thanks 
Title: Foobar2000 format strings
Post by: nuhi on 2003-05-12 16:45:58
 ok

next time i'll post a proper version,with Terminal encoded chars, without that $char(*) thingy.
It will work then but it cannot be pasted on forum though, there will be a link to it in a text file.
I think i saw it earlier someone else did it.
Title: Foobar2000 format strings
Post by: Nivo on 2003-05-12 16:50:02
yeah, much easier that way 
well.. for me at least.. tho i do get the hang of this editing this way 
Title: Foobar2000 format strings
Post by: GeekK on 2003-05-12 18:05:34
Quote
Quote
foobar screenshot (http://charlie.mg2.org/foodesk.png) (high res)

not so much programming innovation, just clean color scheme. also made slight modification to just show artist - title if no album info is present, instead of the (imho) ugly "???" tag. the playlist code is modified from ranor's, the status bar is someone else's in this thread . also took out the mp3pro indication code since i didn't have any mp3pros, hee. i was going for slim.

[CODE]

<snip>

i like your set up a lot, but it comes in all screwed up when i just copy and paste what you pasted in your post.  could u just strait out copy and paste what you have in foobar into a post here for the playlist and status bar.

and yes i downloaded and installed the LIME font

Same here.... 

I absolutely want to use your wonderful colors and layout 'cause I think they're the coolest ones around (no kiddin'  (w00t) )

And yes - I also installed the Lime-font (installed it in Control panel -> Fonts)

Let us know! 
Title: Foobar2000 format strings
Post by: GoWaN on 2003-05-13 19:47:19
This is my desktop:
image (146kB) (http://ciberia.ya.com/gowan/foobar2000/imagenes/miescritorio3.htm)
And here my config:
foobar.cfg (http://ciberia.ya.com/gowan/files/foobar2000.cfg.zip)

They are based on other's configs. 
Title: Foobar2000 format strings
Post by: foosion on 2003-05-16 22:36:02
[!--sizeo:10--][span style=\"font-size:12pt;line-height:100%\"][!--/sizeo--]Statusbar Arcade Productions presents[/size]

[!--sizeo:14--][span style=\"font-size:12pt;line-height:100%\"][!--/sizeo--]---=== PACMAN 4 Foobar2000 ===---[/size]

created by samadhi97 & foosion

(http://www.stud.uni-karlsruhe.de/~uzbs/fb2k/pacman/pacman.png)

Code: [Select]
// options
$puts(pac_pillcount,100)
$puts(pacc_gone,B0B0B0)
$puts(pacc_pill,FFFFFF)
$puts(pacc_pacman,FF0000)
$puts(pacc_ghost,0000FF)

// sprites
$puts(pac_gone,'•')
$puts(pac_pill,'•')
$puts(pac_munch0,'C')
$puts(pac_munch1,'O')
$puts(pac_ghost,'í°°ì')

// computation starts here

$puts(pac_pacpos,$div($add($mul(%_time_elapsed_seconds%,$get(pac_pillcount)),$div(%_time_total_seconds%,2)),%_time_total_seconds%))

$puts(pac_ghostpos,$div($add($mul($sub(%_time_elapsed_seconds%,$div(%_time_total_seconds%,2)),2,$sub($get(pac_pillcount),3)),$div(%_time_total_seconds%,2)),%_time_total_seconds%))

'['
$ifgreater($get(pac_ghostpos),-1,
// display ghost
$get(pacc_gone)$repeat($get(pac_gone),$get(pac_ghostpos))
$get(pacc_ghost)$get(pac_ghost)
$get(pacc_gone)$repeat($get(pac_pill),$sub($get(pac_pacpos),3,$get(pac_ghostpos)))
,
// do not display ghost
$get(pacc_gone)$repeat($get(pac_gone),$get(pac_pacpos))
)
// display pacman
$get(pacc_pacman)$get(pac_munch$mod(%_time_elapsed_seconds%,2))
// display pills
$get(pacc_pill)$repeat($get(pac_pill),$sub($get(pac_pillcount),$get(pac_pacpos)))
']'
font: Verdana, 8pt
Title: Foobar2000 format strings
Post by: ssamadhi97 on 2003-05-17 00:29:01
Use $puts(pacc_pacman,00FFFF) (instead of $puts(pacc_pacman,FF0000) ..) for the maximum degree of authenticity 

only one rule for ya: Enjoy! 

The Legend returns! Will he manage to escape the Ghost?
Title: Foobar2000 format strings
Post by: pootify on 2003-05-18 04:28:02
For those of you asking about this this setup (http://charlie.mg2.org/foodesk.png):

Hmm.. I did straight copy and paste, can't imagine why it got messed up? I'll try again:

PLAYLIST BACKGROUND COLOR: Hue 75, Sat 28, Lum 106 / Red 103, Green 126, Blue 100
PLAYLIST SELECTION COLOR: Hue 74, Sat 30, Lum 134 / Red 132, Green 156, Blue 128
SELECTED ITEM FRAME: Black
Playlist font is Lime, of course

PLAYLIST
Code: [Select]
//make playlist number black if playing
$if(%_isplaying%,000000|000000>>>>,FFFFFF|FFFFFF$num(%_playlist_number%,3).)

0000FF|0000FFù

// if playing make orange
$if(%_isplaying%,
// artist
27ABFF|27ABFF%artist%
// separator
0000FF|0000FF ù

//show album and track if tags exist else just show title
$if(%album%,
// album
27ABFF|27ABFF %album% '('%date%')'
// separator
0000FF|0000FF ù
// title
27ABFF|27ABFF $num(%tracknumber%,2).,) 27ABFF|27ABFF%title%
// length
$char(9)27ABFF|27ABFF%_length%,

// else if not playing make black and white
// artist
000000|000000%artist%

$if(%album%,
// separator
0000FF|0000FF ù
//show album and track if tags exist else just show title
000000|000000$if(%album%,$abbr(%album%,30),) $if(%date%,'('%date%')'
// separator
0000FF|0000FF ù ,)
// title
FFFFFF|FFFFFF
$if(%tracknumber%,$num(%tracknumber%,2). ,),0000FF|0000FF ù )FFFFFF|FFFFFF%title%
// length
$char(9)FFFFFF|FFFFFF%_length%)

STATUS BAR
Code: [Select]
004D00'('%_time_elapsed%')' $progress($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),100,25,000000$num($div($mul(100,%_time_elapsed_seconds%),%_time_total_seconds%),2)'%',808080'°')808080'°' 408000'(-'%_time_remaining%')'0CB407 '('%_time_total%')' 

$puts(SB_T,127)
$puts(SB_C,0000FF)

$puts(LB_R,20)
$puts(LB_G,128)
$puts(LB_B,20)
$puts(HB_R,0)
$puts(HB_G,0)
$puts(HB_B,255)

$if($greater(%__bitrate%,$get(SB_T)),
$puts(BR,$div($mul($sub(%__bitrate%,$get(SB_T)),255),$sub(320,$get(SB_T))))
$puts(BR_R,$add($get(LB_R),$div($mul($sub($get(HB_R),$get(LB_R)),$get(BR)),255)))
$puts(BR_G,$add($get(LB_G),$div($mul($sub($get(HB_G),$get(LB_G)),$get(BR)),255)))
$puts(BR_B,$add($get(LB_B),$div($mul($sub($get(HB_B),$get(LB_B)),$get(BR)),255)))
$puts(BR_C,$hex($get(BR_B),2)$hex($get(BR_G),2)$hex($get(BR_R),2))
,
$puts(BR_C,$get(SB_C)))

$get(BR_C)%__bitrate%kbps
Title: Foobar2000 format strings
Post by: GeekK on 2003-05-18 11:26:36
Quote
For those of you asking about this this setup (http://charlie.mg2.org/foodesk.png):

Hmm.. I did straight copy and paste, can't imagine why it got messed up? I'll try again:

Thanks a lot, Pootify!

Works perfectly now! 
Title: Foobar2000 format strings
Post by: Melomane on 2003-05-19 20:50:13
(http://membres.lycos.fr/guerradomenico/my%20foobar.gif)
800*600
album name / n° track  is red when replaygain is not apply.
album with various artist display name of artist in playlist and "various artist" in album list (required tag "va=various artists")

playlist: background color rvb 255/255/249 , selection 128/136/168 text and item frame: black

$num(%_playlist_number%,3)$if(%_isplaying%,0000FF|0000FF -> ,  |  )
800000$caps(%artist%) -
$if(%title%,' ['
$if(%__replaygain_album_peak%,,
$if(%__replaygain_album_gain%,,0000FF))
[%album%[ #[%disc%/]
$if(%__replaygain_track_peak%,,
$if(%__replaygain_track_gain%,,0000FF))
$num(%tracknumber%,2)]'] ']
800000%title%
,800000%_filename_ext%)
$char(9) |
$iflonger(%_length%,4,%_length%,%_length%¨ )
_________________________________________________
statusbar:

$if(%_ispaused%,0000FF PAUSE,
[$upper($ext(%_filename_ext%))  ][%__bitrate% Kbps                  ][%__samplerate%Hz ]$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)[ %__extrainfo%]   
$select($add($mod(%_time_elapsed_seconds%,4),1),'-','\','|','/'))   
// setting
$puts(count,115)
$puts(gone,'|')
$puts(c_gone,808080)
$puts(pill,'|')
$puts(c_pill,FFFFFF)
$puts(cursor0,-%_time_remaining%)
$puts(cursor1,-%_time_remaining%)
$puts(c_cursor,C10000)
// computation
$puts(pos,$div($add($mul(%_time_elapsed_seconds%,$get(count)),$div(%_time_total_seconds%,2)),%_time_total_seconds%))
'{'
// display gone
$get(c_gone)$repeat($get(gone),$get(pos))
// display cursor
$get(c_cursor)$get(cursor$mod(%_time_elapsed_seconds%,2))
// display pills
$get(c_pill)$repeat($get(pill),$sub($get(count),$get(pos)))
'}'
%_time_elapsed% / %_time_total%
_______________________________________
album list
tree:
[GENRE-ARTIST-ALBUM]$if($strcmp($substr(%genre%,1,4),Jazz),Jazz,$if($strcmp($substr(%genre%,1,9),Classical),Classical,Modern))|$if2(%va%,%artist%)|[%album%][  { %date% }]$if($strcmp($substr(%genre%,1,4),Jazz),$substr(%genre%,5,40),$if($strcmp($substr(%genre%,1,9),Classical),$substr(%genre%,10,40),[ - %genre% ]))|%title%$if(%va%,  -- $caps(%artist%),)
sorting:
[GENRE-ARTIST-ALBUM]$if2(%va%,%artist%)|%album%|$num(%disc%,9)|$num(%tracknumber%,9)
Title: Foobar2000 format strings
Post by: rincewind1013 on 2003-05-20 03:12:11
Hi, I'm working on the albumlist

My music is laid out like this
[Drive]:\music\[Letter of Alphabet]\[Artist]\[Album]\(if multiple CDs)[CD #]
Example:
E:\music\B\Bob Dylan\Blonde on Blonde
E:\music\B\Bob Dylan\The Essential Bob Dylan\CD 2

Currently, I have

Code: [Select]
Tree Hierarchy:
$iflonger($directory(%_path%,3), 1, [$directory(%_path%,3)] [$directory(%_path%,2)], [$directory(%_path%,2)]) | $directory(%_path%,1)

Sorting Order:
$iflonger($directory(%_path%,3), 1, $directory(%_path%,3) - $directory(%_path%,2) - $directory(%_path%,1) - %_filename%, $directory(%_path%,2) - $directory(%_path%,1) - %_filename% )


This works fine for situations like the first example, but for the 2nd example, it doesn't look as nice
My aim is to have something like this for the album list

Code: [Select]
Bluebottle Kiss
Bob Dylan
|-Blonde On Blonde
|-The Essential Bob Dylan
  |-CD1
  |-CD2
Boilermaker


Does anyone have any idea how to do that?

If I try this for the Tree Hierarchy
Code: [Select]
Tree Hierarchy:
$iflonger($directory(%_path%,3), 1, [$directory(%_path%,3)] | [$directory(%_path%,2)], [$directory(%_path%,2)]) | $directory(%_path%,1)

I get a syntax error, because of the '|' in the 3rd argument of the $iflonger statement

Any help?
Title: Foobar2000 format strings
Post by: sramov on 2003-05-20 14:47:39
First, I'm from Croatia so my english is bed, if you find something wrong I'm sorry.
I love minimalism, so I came up with this:

TITLE FORMATTING

playlist:
Code: [Select]
$num(%_playlist_number%,4). [%album%] - [%artist%] - $num(%tracknumber%,2). [%title%][    %_length%]


system tray:
Code: [Select]
[%artist%] - [%title%]


window title:
Code: [Select]
[%artist%] - [%title%] - %_foobar2000_version%


status bar:
Code: [Select]
[%artist%] - [%title%] <> [%__bitrate%kbps ][%__samplerate%S/s ]$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)[%__extrainfo%]    $select($add($mod(%_time_elapsed_seconds%,4),1),'-','\','|','/')    '['$progress(%_time_elapsed_seconds%,%_time_total_seconds%,15,'#','=')']' %_time_elapsed%[ / %_time_total%]


COLORS (RGB)

playlist text color: 0 0 0
playlist background color: 255 255 255
playlist selection color: 130 165 190
selected item color: 50 100 125

Here is the screenshot (http://free-zd.hinet.hr/ramov/desktop.png)
Title: Foobar2000 format strings
Post by: Blinky on 2003-05-20 16:31:23
Foobar! (http://www.warwick.ac.uk/~esunm/foobar.png) (60kb), it's pretty minimal but with some snazzy colouring.

Apologies for the horribly messy code, tried to clear it up but I kept breaking it so in the end I left it

Playlist:
Code: [Select]
// initialise:

// line colours: blend (between selected colours) for albums, random (between selected colours) for single tracks
$puts(c_line,$blend(FFDDDD|DDFFDD,FF0000|00FF00,$if(%tracknumber%,%tracknumber%,$mod($rand(),21)),20))

// check for replay gain
$puts(c_rg,$if(%__replaygain_track_gain%,,0000FF|0000FF)$if(%album%,$if(%__replaygain_album_gain%,,0000FF|0000FF),))

// field lengths
$puts(p_art,30)
$puts(p_tit,30)

// cut-off field lengths
$puts(p_artsub,$sub($get(p_art),3))
$puts(p_titsub,$sub($get(p_tit),3))

// playing colour
$puts(c_play,FFFFFF|FFFFFF)

// separator colour
$puts(c_sep,CCCCCC|CCCCCC)

// colour based on playing status
$puts(c,$if(%_isplaying%,$get(c_play),$get(c_line)))

// column separators
$puts(s_art,$get(c_sep)$if(%tracknumber%,$ifgreater(%tracknumber%,1,$char(9474),$char(9500)),$char(9474))$get©)
$puts(s_tit,$get(c_sep)$if(%tracknumber%,$ifgreater(%tracknumber%,1,$char(9474),$char(9508)),$char(9474))$get©)
$puts(s_len,$get(c_sep)$char(9474)$get©)


// display:

// playlist numbers
$pad_right(%_playlist_number%,4)$char(32)

// artist/album
$get(s_art)$char(32)
$if(%tracknumber%,$ifgreater(%tracknumber%,1,$ifgreater(%tracknumber%,2,$pad($char(32),$get(p_art)),$ifgreater($get(p_art),$len($char(32)%album%),$pad($char(32)%album%,$get(p_art)),$padcut($char(32)%album%,$get(p_artsub))..$char(32))),$ifgreater($get(p_art),$len(%artist%),$padcut(%artist%$char(32)$get(c_sep)$repeat($char(9472),$get(p_art)),$add($get(p_art),15)),$padcut(%artist%,$get(p_artsub))..$char(32))),$ifgreater($get(p_art),$len(%artist%),$padcut(%artist%,$get(p_art)),$padcut(%artist%,$get(p_artsub))..$char(32)))

// title
$get(s_tit)$char(32)$get(c_rg)
$if(%title%,$ifgreater($get(p_tit),$len(%title%),$pad(%title%,$get(p_tit)),$padcut(%title%,$get(p_titsub))..$char(32)),$ifgreater($get(p_tit),$len(%_filename%),$pad(%_filename%,$get(p_tit)),$padcut(%_filename%,$get(p_titsub))..$char(32)))

// length, have to get colour afterwards as right-aligned
$get(s_len)
$char(9)$get©%_length%

Status bar:
Code: [Select]
// initialise:

// size of progress bar
$puts(size,50)

// proportion of song elapsed out of progress bar size
$puts(elapsed,$div($mul(%_time_elapsed_seconds%,$get(size)),%_time_total_seconds%))


// display:

// artist/title info
$if(%title%,[%artist% - ]%title%,%_filename%)

// right align
$char(9)

// time elapsed/total
  %_time_elapsed% / %_time_total%

// progress bar
|$transition($repeat(|,$get(elapsed)),000000,A00000)
808080$repeat(|,$sub($sub($get(size),1),$get(elapsed)))|

Fonts:
Playlist: Lucida Console 8pt
Status bar: Tahoma 8pt

Colours (RGB):
Text: 205 205 205
Background: 0 0 0
Selection: 0 0 0
Frame: 50 160 50

Basically this huge lump of code gives a nice colour blending between tracks on an album, while single tracks get random colours chosen from those used for blending. In my set-up, the tracks are all shades of blue, selecting tracks turns them a shade of green. The currently playing track is white and tracks with no replay-gain (track or album if applicable) are shown in red. Any field that's too long to be shown gets cropped and '..' added to the end so you know there's some missing. Just take a look at the picture for a better idea
Title: Foobar2000 format strings
Post by: Anacific on 2003-05-21 17:55:55
Quote
Foobar! (http://www.warwick.ac.uk/~esunm/foobar.png) (60kb), it's pretty minimal but with some snazzy colouring.

That is very cool, exactly what I was looking for
Title: Foobar2000 format strings
Post by: sramov on 2003-05-22 20:26:37
Here is the slightly modified setup, hope you like it:

TITLE FORMATTING

playlist:
Code: [Select]
$num(%_playlist_number%,4). [%album%] - [%artist%] - $num(%tracknumber%,2). [%title%][    %_length%]


system tray:
Code: [Select]
[%artist%] - [%title%]


window title:
Code: [Select]
[%artist%] - [%title%] - %_foobar2000_version%


status bar: (modified)
Code: [Select]
[%artist%] - [%title%] @ [%__bitrate%kbps ][%__samplerate%S/s ]$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)[%__extrainfo%]  '['$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,16,000000'=',666666'=')']' %_time_elapsed%[ / %_time_total%]


COLORS (RGB)

playlist text color: 0 0 0
playlist background color: 255 255 255
playlist selection color: 130 165 190
selected item color: 50 100 125

FONT

tahoma, 8pt

screenshot (http://free-zd.hinet.hr/ramov/desktop2.png)
Title: Foobar2000 format strings
Post by: CJC on 2003-05-25 01:27:24
Pootify, where can I find that Lime font?
Title: Foobar2000 format strings
Post by: pootify on 2003-05-25 02:43:55
Lime font:

http://www.desktopian.org/bb/ (http://www.desktopian.org/bb/)

right side, under Additional, "Blackbox font pack (for Windows)"
Title: Foobar2000 format strings
Post by: nuhi on 2003-05-25 10:08:14
Here, fixed it, and made it more tolerant to bad Tags.

Enjoy 

Screenshot (http://www.freewebs.com/nuhi/foobar/index.html)

Code & Instructions (http://www.freewebs.com/nuhi/foobar/code.zip)
Title: Foobar2000 format strings
Post by: Jan S. on 2003-05-25 14:08:00
This doesn't work (http://fb2k-plugins.hydrogenaudio.org/test/bad_foo.png) at all for me. 
Title: Foobar2000 format strings
Post by: airblaster on 2003-05-25 20:45:16
It only works if you use the font "Terminal".


btw, does anyone know if there is a way to inser newlines in the playlist?
I didn't find any information about this....
Title: Foobar2000 format strings
Post by: fctk on 2003-05-25 20:55:38
this is my string:

Code: [Select]
//messaggi di errore
$puts(artist,0000FF'[NO ARTIST]')
$puts(album,0000FF'[NO ALBUM]')
$puts(date,0000FF'[NO DATE]')
$puts(tracknumber,0000FF'[CHECK TRACKNUMBER]')
$puts(title,0000FF'[NO TITLE]')
$puts(genre,0000FF'[NO GENRE]')
$puts(comment,0000FF'[CHECK COMMENT]')
$puts(rated,0000FF'[RATED]')
$puts(replaygained,0000FF'[REPLAYGAINED]')
$puts(extension,0000FF'[WRONG EXTENSION]')
$puts(#,0000FF'[CHECK CHARACTER #]')

//indice numerico playlist a quattro cifre
C08000$num(%_playlist_number%,4)

//di ciascun tag ne è verificata l'esistenza e quindi è visualizzato, altrimenti relativo errore
$if(%artist%,808080%artist%,$get(artist))

$if(%album%,408000%album%,$get(album))

$if(%date%,'('000080%date%')',$get(date))

$if(%tracknumber%,0080FF%tracknumber%,$get(tracknumber))

$if(%title%,%title%,$get(title))

$if(%genre%,,$get(genre))

//se il tracknumber ha più di 2 cifre da' errore; nel caso in cui ci sia il tracknumber sia composto di due cifre verifica che il suo valore sia maggiore di 10, altrimenti da un messaggio di errore
$ifgreater($len(%tracknumber%),2,$get(tracknumber),$if($strcmp($len(%tracknumber%),2), $ifgreater(10,%tracknumber%,$get(tracknumber),),))

//controlla la valutazione
$if($strcmp(%rating%,1),$get(rated),)

//controlla il replaygain
$if(%__replaygain_track_gain% OR %__replaygain_track_peak% OR %__replaygain_album_gain% OR %__replaygain_album_peak%,$get(replaygained),)

//controlla l'estensione
$if($strcmp($right(%_filename_ext%,4),'.mpc'),,$get(extension))

//controlla che non ci siano caratteri #
$if($strcmp($strchr(%title%,#),0),,$get(#))

$char(9)

//controlla che il commento abbia lunghezza 10
$if($strcmp($len(%comment%),10),%comment%,$get(comment))

//durata traccia
%_length%
Title: Foobar2000 format strings
Post by: Jan S. on 2003-05-25 21:11:36
Quote
It only works if you use the font "Terminal".


btw, does anyone know if there is a way to inser newlines in the playlist?
I didn't find any information about this....

That's what I did.
Title: Foobar2000 format strings
Post by: Auric on 2003-05-25 22:07:23
I didn't notice anyone showing their album list format strings, so I figured I'd reply with mine.  Basically, I wanted all of my game, anime, and movie soundtracks to display and sort only by the album, while everything else should be sorted by artist.  Ideally, album would be a branch of the hierarchy under album, but I couldn't get the | to work inside of the if statement, so I just set one branch to "artist - album."

Tree hierarchy:
Quote
%genre%|$ifgreater($strstr(%genre%,'Game'),0,,$ifgreater($strstr(%genre%,'Soundtrack'),0,,$ifgreater($strstr(%genre%,'Anime'),0,,%artist%' - ')))%album%|%title%


Sorting order:
Quote
%genre%|$ifgreater($strstr(%genre%,'Game'),0,,$ifgreater($strstr(%genre%,'Soundtrack'),0,,$ifgreater($strstr(%genre%,'Anime'),0,,%artist%)))|%album%|$num(%disc%,9)|$num(%tracknumber%,9)|%_filename_ext%
Title: Foobar2000 format strings
Post by: picmixer on 2003-05-26 23:41:05
So far the Lime font is the only one I found that produces these nie dots instead of the ù's show in some strings in this thread.  However the only problem I hav with it is that Foobar does not want to set it to a larger font size than 8.  Would like to do that though.  Does anyone know a sollution to this?

Here is my playlist string, wich is a modified version of pootify's and Skibby's in one.  The coding is probably not the most elegant, but it works fine for me:


////////////////////
////  Config  ////
////////////////////
// Colors
$puts(plnum_col,$if(%_isplaying%,11118E|363636,B0B0B0|363636))
$puts(artist_color,$if(%_isplaying%,11118E|DFAF00,000000|000000))
$puts(title_color,$if(%_isplaying%,11118E|BFAF00,FFFFFF|FFFFFF))
$puts(album_color,$if(%_isplaying%,11118E|DFAF00,000000|000000))
$puts(date_color,$if(%_isplaying%,11118E|DFAF00,000000|000000))
$puts(track_color,$if(%_isplaying%,11118E|DFAF00,FFFFFF|FFFFFF))

// Spacers
$puts(album_spacer,')')
$puts(track_spacer,*)
$puts(tag_spacer, ù )
// Additional options
// 1 = true, 0 = false
$puts(display_playlist_no,1)
$puts(display_date,1)
$puts(display_file_info,1)
$puts(display_time,1)
/////////////////////////
////  End config  ////
/////////////////////////



//////////////////
////  Tags  ////
//////////////////
// Artist
$if(%artist%,
$puts(artist,$get(artist_color)%artist%),
$puts(artist,$get(artist_color)$caps2($padcut(%_filename%,$sub($strchr(%_filename%,-),2)))))

// Title
$if(%title%,
$puts(title,$get(title_color)%title%),
$puts(title,$get(title_color)$caps2($substr(%_filename%,$add($strchr(%_filename%,-),2),$len(%_filename

%)))))

// Album
$if(%album%,
$puts(album,$get(album_color)%album%),
$puts(album,$get(album_color)$if($strcmp($strchr($directory(%_path%),-),0),
$directory(%_path%),
$substr($directory(%_path%),$add($strchr($directory(%_path%),-),2),$len($directory(%_path%))))))

// Date
$if($stricmp($get(display_date),1),$if(%date%,$puts(date,$get(date_color)'('%date%')'),))

// Tracknumber
$if(%tracknumber%,
$puts(tracknum,$get(track_color)$num(%tracknumber%,2).  ),)


//////////////////////////////////
////  Display artist info  ////
/////////////////////////////////

//make playlist number black if playing
$if(%_isplaying%,000000|000000>>>>,FFFFFF|FFFFFF$num(%_playlist_number%,3).) 

ù $get(artist) ù $get(album)$get(date) ù $get(tracknum)
$get(title)

///////////////////////////////
////  Display file info  ////
//////////////////////////////
$char(9)
$transition(
$if($stricmp($get(display_file_info),1),
$pad_right($get(tag_spacer),1)
$pad_right($upper($right(%_filename_ext%,3)),3) $pad_right(%__bitrate%/$div(%__samplerate%,1000),6)
$pad_right($if(%__replaygain_track_gain%,T, ),2)
$pad_right($if(%__replaygain_album_gain%,A, ),1)
)
$if($stricmp($get(display_time),1),$pad_right(%_length%,7)),
11118E|11118E,000000|000000)



Playlist Background Colour:  24  53  107
Playlist Text Colour:  142  17  17
Selection colour:  0  64  128
Selected Item Frame:  Black


Thanks Pootify and Skibby fotr those nice setups.
Title: Foobar2000 format strings
Post by: L.King on 2003-05-27 00:30:38
Quote
However the only problem I hav with it is that Foobar does not want to set it to a larger font size than 8.

artwitz's fonts are bitmap fonts, not true type, they only contain one size

bitmap fonts can contain multiple sizes but you'd have to draw every character for every size, the characters of true type fonts are rendered rather than pre-made and can therefore be of multiple sizes
Title: Foobar2000 format strings
Post by: picmixer on 2003-05-27 00:32:40
Thanks, that about explains it.
Title: Foobar2000 format strings
Post by: nyarlathotep on 2003-05-27 15:07:24
my strings, simple and fast:

Playlist #1: basic

//simple complet
- $num(%_playlist_number%,3) : [%artist%]   $if(%title%,[[%disc%/]- $num(%tracknumber%,2) : ]%title%,%_filename_ext%)      [- %album%]   $if(%_isplaying%,00FFFF|FFFFFF)[%_length%]

sorry, cant write the (alt+tab)

Playlist #2: if you listen only to full albums (ie: tracks from different albums must not be mixed; track 1 from each album must be in the playlist; for following tracks from the same album, artist and album are hidden except when playing or selected with cursor)

//albums entiers uniquement
$ifgreater(%tracknumber%,1,$if(%_isplaying%,00FFFF|FFFFFF>| ,B58C8E|FFFFFF)%artist% - %album% -,$if(%_isplaying%,00FFFF|FFFFFF>| )%artist% - %album% -)
$if(%_isplaying%,,)
$if(%title%,- [[%disc%/]$num(%tracknumber%,2) : ]%title%,%_filename_ext%)
$char(9)$if(%_isplaying%,00FFFF|FFFFFF%_length% <|,%_length%)

colors:
playlist background 162 52 151 (otherwise ,B58C8E must be changed to the same color as the background)
playlist selection 160 240 120
font: whatever, maybe you'll need to put some spaces in the appropriate areas...

Status bar:

[%artist% - ]$if(%title%,[[[%disc%/]$num(%tracknumber%,2)]] : %title%,%_filename_ext%) [- %album%] | $ext(%_path%) @ [%__bitrate%kbps - ][%__samplerate%S/s ]$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)[%__extrainfo%]    %_time_elapsed%[ / %_time_total%]
Title: Foobar2000 format strings
Post by: fctk on 2003-05-27 18:56:06
does someone know a way to show in foobar2000 the tag type used in a song? (already know how to do this with replaygain and bitrate, but can't find any doc on tag type)

thx
Title: Foobar2000 format strings
Post by: Daelus on 2003-05-27 23:08:33
Here's my "ByAlbum"-Playlist script :

Screenshot (http://membres.lycos.fr/daelus/foobar/ByAlbum.png)

use Lucinda Console Font, 9pt
Playlist text : Black (0,0,0)
Playlist Background : 180,178,204
Playlist Selection : 10,36,106

Playlist Script (http://membres.lycos.fr/daelus/foobar/ByAlbum.txt)

and have fun with yours albums
Title: Foobar2000 format strings
Post by: picmixer on 2003-05-28 00:44:46
Am still looking for a TTF(sizeable) Font that will allow me do display a dot in the vertical middle of the line.  Similar to Pootify's setup.  Would anyone know where to find one, or how else to achieve this?
Title: Foobar2000 format strings
Post by: TomG on 2003-05-28 16:03:54
Hello there, complete noob here, downloaded foobar yesterday and I must say it sounds amazing with my revo. I love it! Much better than winamp.

I had a go at a string and I must add that it is based on one I found in this post but I can't remember whos so my apologies  , feel free to speak out if its yours!

Here goes

Quote
0080FF

$if(%_isplaying%,000000|000000)$if(%_ispaused%,F94FCE|F94FCE)$num(%_playlist_number%,4). FF8000

$if(%_isplaying%,000000|000000)$if(%_ispaused%,F94FCE|F94FCE)[%artist% 808080- ]

$if(%_isplaying%,000000|000000)$if(%_ispaused%,F94FCE|F94FCE)$if(%title%,['['0080FF

$if(%_isplaying%,000000|000000)$if(%_ispaused%,F94FCE|F94FCE)%album% [#[%disc%/]$num(%tracknumber%,2)]'808080] ']FF8000

$if(%_isplaying%,000000|000000)$if(%_ispaused%,F94FCE|F94FCE)%title%,%_filename_ext%)

$if(%_isplaying%,000000|000000)$if(%_ispaused%,F94FCE|F94FCE)[ %_length%]


Its all spaced out purely for ease of editing.

It works well I think and I like it, it changes colour on pause and the track thats playing is black, although the second square bracket on the album name [album] refuses to change colour, I've tried everything I can think of and it either messes up the whole string or has no effect whatsoever. Any ideas!?

Let us know what you think

Thanks

Tom
Title: Foobar2000 format strings
Post by: Jan S. on 2003-05-29 16:49:22
Quote
Here's my "ByAlbum"-Playlist script :

Screenshot (http://membres.lycos.fr/daelus/foobar/ByAlbum.png)

use Lucinda Console Font, 9pt
Playlist text : Black (0,0,0)
Playlist Background : 180,178,204
Playlist Selection : 10,36,106

Playlist Script (http://membres.lycos.fr/daelus/foobar/ByAlbum.txt)

and have fun with yours albums

This is the best script I've seen so far. With a translation and some minor adjustments this will be my favourite.
Title: Foobar2000 format strings
Post by: spase on 2003-05-29 18:05:04
Quote
Quote
Here's my "ByAlbum"-Playlist script :

Screenshot (http://membres.lycos.fr/daelus/foobar/ByAlbum.png)

use Lucinda Console Font, 9pt
Playlist text : Black (0,0,0)
Playlist Background : 180,178,204
Playlist Selection : 10,36,106

Playlist Script (http://membres.lycos.fr/daelus/foobar/ByAlbum.txt)

and have fun with yours albums

This is the best script I've seen so far. With a translation and some minor adjustments this will be my favourite.

i agree... well done Daelus
Title: Foobar2000 format strings
Post by: Jan S. on 2003-05-29 23:03:22
Based on Daelus' script.
* Fixed width
* Translated
* Displays different fields at the side (artist, disc nr., format, replaygain)
* uses %_filename% instead of %_path% for tracks without tags
* pads zero on tracknumber
* added %__compression%
* removed lines after title
Screenshot (http://fb2k-plugins.hydrogenaudio.org/test/foobar_playlist2.png)
Script (http://fb2k-plugins.hydrogenaudio.org/test/foo_album_playlist.txt)
Title: Foobar2000 format strings
Post by: colapesce on 2003-05-29 23:08:33
Great 
Title: Foobar2000 format strings
Post by: Gaffa on 2003-05-30 00:52:55
I just had to try  Screenshot (http://home19.inet.tele.dk/stokholm/foobar.png) Script (http://home19.inet.tele.dk/stokholm/script.txt)
I made it from scratch, looking at Daelus' screenshot. Fixed width also, like Jan's.
Title: Foobar2000 format strings
Post by: PYROTAK on 2003-05-30 00:57:38
what font are u using there gaffa?

mine has a bunch fo question marks all over it!
Title: Foobar2000 format strings
Post by: Gaffa on 2003-05-30 01:32:26
Quote
what font are u using there gaffa?

Just "Courier New".

By the way, I forgot to add some %_isplaying% modification.

Edit 1:
I couldn't sleep anyway: Screenshot 1 (http://home19.inet.tele.dk/stokholm/foobar1.png) (Script (http://home19.inet.tele.dk/stokholm/script1.txt)), Screenshot 2 (http://home19.inet.tele.dk/stokholm/foobar2.png) (Script (http://home19.inet.tele.dk/stokholm/script2.txt))

The first script could be optimized

Edit 2:
So I cleaned up the second one: Script (http://home19.inet.tele.dk/stokholm/script2a.txt). Edit 3: And made a somewhat cleaned up mixture: Script (http://home19.inet.tele.dk/stokholm/script3.txt).
Title: Foobar2000 format strings
Post by: AlfredSka on 2003-05-30 01:58:16
Daelus script + Jan S mod has me by the balls.  I love it, thanks you two!
Title: Foobar2000 format strings
Post by: PYROTAK on 2003-05-30 02:34:23
now i feel stupid, no matter what my formatting doesn't come out right on jans or gafas script....

instead of having cool lines or whatever  i have a bunch of stupid questionmarks....

im so confused....

EDIT: ok, when i copy your script, i get a bunch the strange characters that you use like "||" or "||=" turn into "??" so how do i get those cool characters....
Title: Foobar2000 format strings
Post by: PYROTAK on 2003-05-30 02:48:31
idoes it have to do with the fact that im using beta 10 which seems tobe ascii only, and not unicode....i think it might!
Title: Foobar2000 format strings
Post by: nuhi on 2003-05-30 11:00:57
Updated...

Shot (http://www.freewebs.com/nuhi/foobar/)

Code (http://www.freewebs.com/nuhi/foobar/code.zip)

p.s. it is not based on Daelus script...you can see my previous posts.
Title: Foobar2000 format strings
Post by: picmixer on 2003-05-30 16:22:21
@nuhi

The link to your code does not seem to work.  Maybe you could just copy and paste it here.  Looks very nice.
Title: Foobar2000 format strings
Post by: Jan S. on 2003-05-30 16:51:37
Updated to split large album titles into 2 lines.
See my last post for script and screenshot.
Title: Foobar2000 format strings
Post by: [wo@m] on 2003-05-31 01:29:20
hi,
is it possible to display :
1- "track number in playlist/total tracks in playlist", like "0008/2561" for example.
2-  "total album lenght" in the AlbumList, like "Thievery Corporation - DJ Kicks (56:13)"

thanks
Title: Foobar2000 format strings
Post by: nuhi on 2003-05-31 05:36:26
My previous link to code is:

"http://www.freewebs.com/nuhi/foobar/code.zip"

you need to paste it to new window...damn this free web site.
Thanx picmixer.
Title: Foobar2000 format strings
Post by: AlfredSka on 2003-05-31 08:04:35
Quote
Updated...

Shot (http://www.freewebs.com/nuhi/foobar/)

Code (http://www.freewebs.com/nuhi/foobar/code.zip)

p.s. it is not based on Daelus script...you can see my previous posts.

nuhi - I am really enjoying your code, but unless I bump the terminal font (as specified by your file) down to size 6 (too small for my eyes), it is fairly bold, and not as pretty as your screenie.  Are you really using a different font?
Title: Foobar2000 format strings
Post by: nuhi on 2003-05-31 13:52:28
Maybe it's because i'm using 800*600 resolution on my ancient 15" monitor...

Ok, gonna change it...updating

15:14: Updated

Font now is Lucida Console, report me any bugs or disslikes...thanx

"http://www.freewebs.com/nuhi/foobar/code.zip"

(script reports if you miss a certain TAG so that you can ad it to a file intead of blaiming "the code"  )
Title: Foobar2000 format strings
Post by: Melomane on 2003-05-31 14:41:50
Based on Daelus' / Jan S. script.
Work on win 98 , 800*600 resolution, font andale mono 8 or all mono fonts (not use terminal!).
Code (http://membres.lycos.fr/guerradomenico/notepadfoobar.html)
Big Image (http://membres.lycos.fr/guerradomenico/notepadfoobar.gif)

(http://membres.lycos.fr/guerradomenico/smallnotepadfoobar.gif)

Modified
See next message
Title: Foobar2000 format strings
Post by: Jan S. on 2003-05-31 15:19:17
Melomane, could you make a real-size screenshot (and link to it; not post it directly)?
It's hard to see how good it is otherwise.
Title: Foobar2000 format strings
Post by: AlfredSka on 2003-05-31 20:01:40
Quote
Maybe it's because i'm using 800*600 resolution on my ancient 15" monitor...
Ok, gonna change it...updating
15:14: Updated
Font now is Lucida Console, report me any bugs or disslikes...thanx

So far so good, looks terrific.  Thanks for the update.
Title: Foobar2000 format strings
Post by: KDC on 2003-06-01 02:08:06
I'm using nuhi's code and I have two problems:

1. CD's with less than 4 tracks don't show all the info I want.  It's probably unavoidable, but I thought I'd mention it.
2. I have a CD where the first song starts at 13 so the other tracks aren't in the playlist.  This ends up removing the Artist, Album, etc. info.  Might be unavoidable too.
Title: Foobar2000 format strings
Post by: anza on 2003-06-01 09:50:28
KDC, might that second album be Korn's Follow the Leader? Why don't you just change the tracknumbers with the "auto track numbers" feature of the masstagger? This way 13 -> 1, 14 -> 2 etc.. Or then just rip the 12 first tracks and add them to your playlist?  After all, as they're only 5 seconds of silence (if it's the Korn's album) their file sizes will be quite small.
Title: Foobar2000 format strings
Post by: Garf on 2003-06-01 10:35:17
Quote
Based on Daelus' / Jan S. script.
Work on win 98 , 800*600 resolution, font andale mono 8 or all mono fonts (not use terminal!).

Nice, though I had some issues:

1) the spinner makes the status bar move, I replaced it:

$select($add($mod(%_time_elapsed_seconds%,3),1),'>  ',' > ','  >'))   

2) untagged files display is b0rk

3) any way to left align the track list?

4) how to make distance between MPC xxkbps and xxx Hz smaller?
Title: Foobar2000 format strings
Post by: Jan S. on 2003-06-01 11:14:48
Quote
2) untagged files display is b0rk


4) how to make distance between MPC xxkbps and xxx Hz smaller?

2)
Howso?

4)
Quote
[%__bitrate% Kbps                  ]

Remove some spaces here.
Title: Foobar2000 format strings
Post by: Garf on 2003-06-01 11:41:30
Quote
Quote
2) untagged files display is b0rk

2)
Howso?

You don't see anything...
Title: Foobar2000 format strings
Post by: Jan S. on 2003-06-01 12:14:15
The only time when you should see nothing is if you have %tracknumber% but not the rest that is needed for a nice display. If tracknumber is not found it will display the %_filename%.
Last line in the script:
Quote
$if(%tracknumber%,,%_filename%)

Maybe you should use %title% instead of %tracknumber% here.
Title: Foobar2000 format strings
Post by: tama on 2003-06-01 12:22:04
my format string based on nuhi's kickass design

uses %various%, %disc%, %discname%, %lasttrack%, %version%, %bonustrack%, %lyrics% tags
-doesn't leave a gap if no disc number or name is present

screenshot (http://www.wn.com.au/con-eden/screen.png)

script (http://www.wn.com.au/con-eden/playlist.txt)

Edit:
has no error detection for missing tags 
Title: Foobar2000 format strings
Post by: Lefungus on 2003-06-01 13:33:34
These scripts would be perfect if there could be a way to make them work with albums which have less than 4 Tracks.
I don't know how to force the formatting for each album to be 4 lines even if there are less tracks
Title: Foobar2000 format strings
Post by: JEN on 2003-06-01 13:36:48
Quote
my format string based on nuhi's kickass design

uses %various%, %disc%, %discname%, %lasttrack%, %version%, %bonustrack%, %lyrics% tags
-doesn't leave a gap if no disc number or name is present

screenshot (http://www.wn.com.au/con-eden/screen.png)

script (http://www.wn.com.au/con-eden/playlist.txt)

Edit:
has no error detection for missing tags 

@ tama

Can you show me how you got your status bar like that?  I think its cool
Title: Foobar2000 format strings
Post by: tama on 2003-06-01 13:50:30
the status bar i have at the moment was posted by foosion on page 15 of this thread
Title: Foobar2000 format strings
Post by: Jan S. on 2003-06-01 14:05:28
Quote
the status bar i have at the moment was posted by foosion on page 15 of this thread

page number depends on how you have "Number of posts to show for each topic page" set up in your "board settings".
Title: Foobar2000 format strings
Post by: tama on 2003-06-01 14:08:37
lol i see
don't think it will be a problem for most users

edit:
though i could be wrong...
Title: Foobar2000 format strings
Post by: torji on 2003-06-01 15:55:37
Hello...
How could I have the value various artist when album contains various artists ? (like in Melomane's screenshot)
I have tried "$if(%va%,Various Artists), but it doesnt work
Title: Foobar2000 format strings
Post by: Jan S. on 2003-06-01 16:06:29
Quote
Hello...
How could I have the value various artist when album contains various artists ? (like in Melomane's screenshot)
I have tried "$if(%va%,Various Artists), but it doesnt work

You mean if there's no %artist% tag in the file?
Quote
$if(%artist%,%artist%,Various Artists)

will display %artist% if present otherwise it will display "Various Artists".
Title: Foobar2000 format strings
Post by: smok3 on 2003-06-01 16:20:37
probably a silly one, but how would i detect if the 'song' is a stream?

$if(%station%,...
will not work since there are quite some of them without proper tags...)
Title: Foobar2000 format strings
Post by: torji on 2003-06-01 16:35:33
Quote
Quote
$if(%artist%,%artist%,Various Artists)

will display %artist% if present otherwise it will display "Various Artists".

Why would I want to have a value "various artist" in the playlist when tag %artist% is missing ?? ^^ If i had wanted that, i would have asked for "unknow artist" not "various"...

No i mean sometimes, an album can be performed by various artist, like a "compile" (sorry i cant say it in english...), and so i would like to have in the playlist the "various artists" value...  Do I need to create a "various artist" tag ? ...
Title: Foobar2000 format strings
Post by: nuhi on 2003-06-01 16:41:38
tama, good job rookie

crap, now i must make something new...not possible...need more command strings...peter help 
Title: Foobar2000 format strings
Post by: Jan S. on 2003-06-01 16:42:07
Quote
Quote
Quote
$if(%artist%,%artist%,Various Artists)

will display %artist% if present otherwise it will display "Various Artists".

Why would I want to have a value "various artist" in the playlist when tag %artist% is missing ?? ^^ If i had wanted that, i would have asked for "unknow artist" not "various"...

No i mean sometimes, an album can be performed by various artist, like a "compile" (sorry i cant say it in english...), and so i would like to have in the playlist the "various artists" value...  Do I need to create a "various artist" tag ? ...

The playlist formatting only works with one file at a time so it was no way of nothing if there are different artist on the album. so yes; you need some tag that indicates that there are several artists.
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-01 17:21:15
Quote
probably a silly one, but how would i detect if the 'song' is a stream?

$if(%station%,...
will not work since there are quite some of them without proper tags...)

The way I do it is to check if %_time_total% is present.
E.g.:
Code: [Select]
$if(%_time_total%,,'Streaming')
Title: Foobar2000 format strings
Post by: torji on 2003-06-01 17:32:29
Ok thank you Jan.S 
Title: Foobar2000 format strings
Post by: anza on 2003-06-01 18:03:37
This (http://koti.mbnet.fi/antsau/foobar/pic/albumformatting.png) is what I'm currently doing. It is based on Jan S's formatting and is currently REALLY everything but finished (just tweaked the code, for example it shows files without album/track number differently). I can't finish it (I have to use +s and -s etc) as I'm not home for two weeks and the OS on this computer is Win98... Edit: Oh, and that's also why the tracknumbers are so fucked up  I just used "auto track number" on all albums that I have here

EDIT2: I think I have done the basic stuff now. Now I'll only have to wait two weeks to get home so I can start making it look better (like all the other formattings (tama's, nuhi's and of course Jan S's  )

New screenshot (http://koti.mbnet.fi/antsau/foobar/pic/albumformatting2.png)
Title: Foobar2000 format strings
Post by: anza on 2003-06-01 18:33:46
Quote
These scripts would be perfect if there could be a way to make them work with albums which have less than 4 Tracks.
I don't know how to force the formatting for each album to be 4 lines even if there are less tracks

If you use Jan S's formatting, try this:

Change the 6 in this line to 4
Code: [Select]
$select($min(%tracknumber%,6)


then replace the formatting for tracks "track 2" to "default" with this:

Code: [Select]
// track 2
|
$padcut(
$if(%date%,$padcut($get(DATE),25),)$get(FORMAT)
,$get(WIDTH)),

// track 3
| $padcut(
$if(%genre%,$padcut($get(GENRE),25),)$get(GAIN)
,$get(WIDTH)),

//defaut
| $repeat(' ',$get(WIDTH))
)


That should do it. Actually that's just a copypaste from my own formatting, which is slightly modified from the Jan S's one, so I'm not 100% sure if it'll work, as I don't remember how things were in Jan S's formatting, but I think it should work.
Title: Foobar2000 format strings
Post by: smok3 on 2003-06-02 11:57:57
Quote
The way I do it is to check if %_time_total% is present.
E.g.:
Code: [Select]
$if(%_time_total%,,'Streaming')

ah, nice, tnx  B)
Title: Foobar2000 format strings
Post by: anza on 2003-06-03 12:00:28
Here's my "album-by-album" formatting. It's based on Jan S's formatting (as I couldn't figure out how to it by myself  ) but I've modified it quite a bit (forth and back, so it might not be so different anymore, but at least I've gotten it to look what I want).
You need to use font "lime" in order to get it to show up properly. If you use something else, it'll look REALLY ugly
You also should add a %lasttrack% tag (no matter what value you give to it) to the last track of the album if you want it to show up like in the screenshot. It'll work without the tag, but will not show up as intended.
And if you want to show a comment about the album, add a %comment% tag at least to tracks 3 and 4 of the album
(Screenshot (http://koti.mbnet.fi/antsau/foobar/pic/foo_albums.png) should show what you need to know... except for the correct track orded of the cds )
(Code (http://koti.mbnet.fi/antsau/foobar/byalbum.txt). At the bottom of the file is a "sort by..." string that sorts the playlist quite well IMHO.)

EDIT: Damn.. Just realized I still have to finish the code again when I get home, as lime doesn't support scandinavian letters etc, which I need when I get home. Damn. I think I'd use Lucida Console, if I only could get my hands on all the symbols it has on this w98 machine..
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-03 14:21:08
My current "work in progress".
Screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/foobar2000(2).gif)
Playlist code (http://www.stud.ntnu.no/~mortek/foobar2000/PlaylistCode.txt)
Status bar code (http://www.stud.ntnu.no/~mortek/foobar2000/StatusBarCode.txt)
Font: Lucida Console

Thx to Daelus, tama and nuhi for the "base" of my design 


Btw, does anyone know of a font like Lime that supports all the symbols that Lucida Console does?
Lime works fine at size 6, but it hasn't got norwegian letters and the needed symbols...

[edit]
Added code for Status bar.
Added thx to Daelus.
[/edit]
Title: Foobar2000 format strings
Post by: URMEL on 2003-06-03 15:51:43
Quote
My current "work in progress".
Screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/foobar2000(2).gif)
Playlist code (http://www.stud.ntnu.no/~mortek/foobar2000/PlaylistCode.txt)
Font: Lucida Console

thx to tama and nuhi for the "base" of my design  


Btw, does anyone know of a font like Lime that supports all the symbols that Lucida Console does?
Lime works fine at size 6, but it hasn't got norwegian letters and the needed symbols...

Wow, nice.

And a nice Statusbar too. Could you plz give me the code?

BTW, I want to thank all of you for these awesome playlist-"skins".
Title: Foobar2000 format strings
Post by: nihues on 2003-06-03 17:15:50
Quote
My current "work in progress".
Screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/foobar2000(2).gif)
Playlist code (http://www.stud.ntnu.no/~mortek/foobar2000/PlaylistCode.txt)
Status bar code (http://www.stud.ntnu.no/~mortek/foobar2000/StatusBarCode.txt)
Font: Lucida Console

thx to tama and nuhi for the "base" of my design  


Btw, does anyone know of a font like Lime that supports all the symbols that Lucida Console does?
Lime works fine at size 6, but it hasn't got norwegian letters and the needed symbols...

[edit]Added code for Status bar[/edit]

Best theme so far here.... but Lucida doesnt work.... used lime but its very small, so im using drif font from the fonts package of blackbox and works nice with 1024x768

Liked the way it handle VA albums or tracks without tag!
Thanx great work
Title: Foobar2000 format strings
Post by: Melomane on 2003-06-04 10:54:23
I gave up  completely Daelus's genre script, because there are two problems:
playlist search/sorting don't work fine.
when playlist is random , display is too random...

Is it possible to know the value of a field in the [current playlist number -1] ?
if possible that would open large possibility of formatting.
PETER?

New formatting full compliant to defaut settings:

(http://membres.lycos.fr/guerradomenico/small.gif)


Big image (http://membres.lycos.fr/guerradomenico/big.gif)

Script (http://membres.lycos.fr/guerradomenico/foobaralbum.html)

EDIT: add to various artist album this tag: VA    value: "Various Artists"
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-04 12:41:20
Quote
I gave up  completely Daelus's genre script, because there are two problems:
playlist search/sorting don't work fine.
when playlist is random , display is too random...

is it possible to know the value of a field in the [current playlist number -1] ?

if possible that would open large possibility of formatting.
PETER?

I know of the problems if you use radomized playlist or search, but as I see it you got to choose between readability when having alot of complete albums in the playlist, and a playlist that works great with your "my top 200/partylist".
This could be remedied to some extent, by adding presets, which I would love, but I don't know if Peter can see a good reason to do it. Another nice feature would be to override background colors and such in the formatting code.

As for you "memory" function I'm pretty sure the answer is no. If it had been possible we would have seen alot more complex playlist designs in this thread.
Title: Foobar2000 format strings
Post by: Melomane on 2003-06-04 13:23:47
I don't want a "memory " function but the possibility to know  value of a field refered to value of playlist number;
I.E.

if %album% (current %_playlist_number%) = %album%( current %_playlist_number% - x)
when ....
if not ....

i think it is necessary to add new function
Title: Foobar2000 format strings
Post by: damjanek on 2003-06-04 14:16:40
@upNorth
hey!
i'm using your playlist code and i've got a problem:
how to sort tracks by number (it's hard to exlpain)
i mean that if i have an album with more than 10 tracks
it shows as: "1 10 11 12 2 3 4..."
i want to organise it to look normal, like:
"1 2 3 4 5 6 7 8 9 10 11..."etc.
could you tell me how to do that?
Title: Foobar2000 format strings
Post by: DotNoir on 2003-06-04 17:01:06
I sort my files with this
Code: [Select]
%ARTIST% AND %ALBUM% AND $num(%tracknumber%,2) AND %TITLE%
Title: Foobar2000 format strings
Post by: damjanek on 2003-06-04 17:41:21
heh....thanks DotNoir
now everything is ok...
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-04 18:00:51
@damjanek
I've only used the my shortcut key for "sort by path" until now. Don't know why I didn't miss the sort by artist/album/tracknumber, because it is quite useful.

After some testing I found this to work pretty good:
Code: [Select]
%VARIOUS% AND $if(%VARIOUS%,%ALBUM% AND $num(%tracknumber%,2),%ARTIST% AND %ALBUM% AND %_path% AND $num(%tracknumber%,2))

But in the end it depends alot on your filenameing and tagging. The string above will put all Various Artists albums at the bottom, assuming you have set the "VARIOUS" tag which is needed, if you want the playlist to display as intended.

Hope this was of any help 

[edit]
Better post late than never... 
Now you got me hooked on optimizing sort strings, to catch every strange formatting an lack of tags 
[/edit]
Title: Foobar2000 format strings
Post by: damjanek on 2003-06-04 18:35:23
Code: [Select]
%VARIOUS% AND $if(%VARIOUS%,%ALBUM% AND $num(%tracknumber%,2),%ARTIST% AND %ALBUM% AND %_path% AND $num(%tracknumber%,2))

i've tried your string, but it made some chaos in my playlist......now i'm using
Code: [Select]
%ARTIST% AND %ALBUM% AND $num(%tracknumber%,2) AND %TITLE%
by DotNoir, and it works fine....but if i'll find some mistakes in your code, i'll tell ya
thx for help
Title: Foobar2000 format strings
Post by: billcow on 2003-06-06 20:28:06
Someone with a decent webspace (and preferrably plenty of free time ) should make a centralized repository for playlist formatting strings. The problem with this thread (as I see it) is that there isn't a standard format for the formatting strings. Whoever sets up the site would (in my mind) need to (at a minimum) come up with a consistent way of seperating the playlist strings and associated fonts, colors, etc. in a text file. Preferrably with translation of special characters to $char(xxx) encoding, actual links/downloads of the fonts used and screenshots, although those would be iceing on the cake.

Any takers?
Title: Foobar2000 format strings
Post by: idvah on 2003-06-06 23:25:45
is there anyway to add a sort of background pattern, non-graphical,  to foobar2k.
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-06 23:42:07
Kind of like the foobar2000 text to the right here?
screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/foobar2000text.gif)
Title: Foobar2000 format strings
Post by: idvah on 2003-06-07 03:32:30
Quote
Kind of like the foobar2000 text to the right here?
screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/foobar2000text.gif)

whoa thats pretty cool, I wasn't expecting something like that.... I'm thinking more along the lines of this:
(http://idvah.fragmentized.com/bg-foo.jpg)
Title: Foobar2000 format strings
Post by: billcow on 2003-06-07 06:00:43
screenshot (http://billcow.cjb.net/foobar01.png)
code (http://billcow.cjb.net/foobar01.txt)

no fancy coding stuff - just fancy coloring.

for idvah:
The "$if($greater(1,$mod(%_playlist_number%,2))..." part sets up alternating colors based on playlist index. "$puts(space,...)" sets a variable to be used in place of a space for padding purposes. In other words, if you use "$repeat($get(space),x)" as I have you will get a pseudo-adjustment for the background color.

upNorth:
i'm going to have to ask you to post that foobar text thing. totally cool.
Title: Foobar2000 format strings
Post by: anza on 2003-06-07 09:42:18
Quote
screenshot (http://billcow.cjb.net/foobar01.png)
code (http://billcow.cjb.net/foobar01.txt)

no fancy coding stuff - just fancy coloring.

for idvah:
The "$if($greater(1,$mod(%_playlist_number%,2))..." part sets up alternating colors based on playlist index. "$puts(space,...)" sets a variable to be used in place of a space for padding purposes. In other words, if you use "$repeat($get(space),x)" as I have you will get a pseudo-adjustment for the background color.

upNorth:
i'm going to have to ask you to post that foobar text thing. totally cool.

The transition in your progress bar is cool, could you give us the code? I'm not in the mood for trying to figure it out myself
Title: Foobar2000 format strings
Post by: anza on 2003-06-07 10:32:40
upNorth propably has a better way of doing this, but I figured a way to get the foobar2000 text there... Here's a screenie (http://koti.mbnet.fi/antsau/foobar/pic/fb-text.png) for you. And yes, I still haven't bothered to change the track numbers to what they're supposed to be  it's completely the same for me what they are here, as long as they're right at home.

Next thing is to tweak the colors and the characters  I just quickly made that one with #s.
Title: Foobar2000 format strings
Post by: picmixer on 2003-06-07 10:51:59
Quote
upNorth:
i'm going to have to ask you to post that foobar text thing. totally cool.

I'll second that.  That really looks absolutely great.  Any way you can maybe pass us the code for that?  Would be greatly apreciated.
Title: Foobar2000 format strings
Post by: anza on 2003-06-07 11:08:45
If you're not afraid of ugly code, try this out for the "foobar2000" text:
EDIT Fixed the code a bit, it was fucked up a bit

Screenshots Here (wide text) (http://koti.mbnet.fi/antsau/foobar/pic/text-wide.png) and here (narrow text) (http://koti.mbnet.fi/antsau/foobar/pic/text-narrow.png)


The best way to get this to foobar is to copy it to note/wordpad and use the replace thingy to replace <COLOR#>s with your color codes

Code: [Select]
$transition(
// wide text
//$select($sub($div($right($num(%_playlist_number%,4),2),2),1),
// narrow text
$select($sub($mod(%_playlist_number%,63),1),
######,
  # #,
    #,
     ,
######,
#    #,
######,
     ,
######,
#    #,
######,
     ,
######,
#  # #,
### ##,
     ,
######,
  # #,
######,
     ,
######,
  # #,
### ##,
     ,
#   # ,
##   #,
# #  #,
#  ## ,
     ,
#### ,
#    #,
#### ,
     ,
#### ,
#    #,
#### ,
     ,
#### ,
#    #,
#### ,
     ,)
,<COLOR1>,<COLOR2>)
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-07 11:48:17
Here is the code for the previous screenshot (and this).
screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/foobar2000text.gif)
code (http://www.stud.ntnu.no/~mortek/foobar2000/Playlist2.txt)
The foobar2000 graphic can be turned on and off at the top of the code.

@billcow, I would also like to have your progress bar code, looks great 
Title: Foobar2000 format strings
Post by: picmixer on 2003-06-07 14:26:00
Nice work Anza.  Thanks for posting that.  Guess I'm on a mission now to find a way now to include that nicely into my own format string.
Title: Foobar2000 format strings
Post by: idvah on 2003-06-07 14:36:05
Quote
screenshot (http://billcow.cjb.net/foobar01.png)
code (http://billcow.cjb.net/foobar01.txt)

no fancy coding stuff - just fancy coloring.

for idvah:
The "$if($greater(1,$mod(%_playlist_number%,2))..." part sets up alternating colors based on playlist index. "$puts(space,...)" sets a variable to be used in place of a space for padding purposes. In other words, if you use "$repeat($get(space),x)" as I have you will get a pseudo-adjustment for the background color.

upNorth:
i'm going to have to ask you to post that foobar text thing. totally cool.

thanks for showing me this, but I'm curious, is there a way to adapt this:
Code: [Select]
// Can be used with almost any type of font
// Recommended Asian Fonts : MS PGothic 8 (Japanese) , Gulim 8 (Korean)
// Recommended Western Fonts : Verdana 7 , Tahoma 8 , Arial 8 , MS Sans Serif 8
// PLAYLIST FONT DOES NOT HAVE TO BE MONOTYPED

$puts(opchar,808080 '[')
$puts(clchar,808080']')

// Show play status indicator (Note)
$if(%_isplaying%,AA00FF$char(9835),000000$char(9835))

// Playlist number
$get(opchar)00FFFF$num(%_playlist_number%,4)$get(clchar)

// Show directory information (I prefer sorting albums by directory than ID3)
$get(opchar)00FFAA%_directoryname%$get(clchar)

// For those guys who like sorting albums by ID3 more than directories,
// add slashes to the lines that show the directory info
// $get(opchar)00FFAA$if(%album%,%album%,Unknown Album)$get(clchar)

// Artist info
FFFF00 $if(%artist%,%artist%,'Unknown Artist')

// The dash
808080 -

FFFFFF  $if(%title%,%title%,%_filename%)

// Align right and the length
$char(9)00FFAA%_length%

To use that background you've provided?
Title: Foobar2000 format strings
Post by: anza on 2003-06-07 14:47:58
Quote
Nice work Anza.  Thanks for posting that.  Guess I'm on a mission now to find a way now to include that nicely into my own format string.

Right now I have it like this (thanks upNorth for posting your code and so getting me to figure out how to make it MUCH simpler):

EDIT: It doesn't look right here, but should still work...
Quote
$puts(FB2K,
$transition(
// wide text
$select($sub($div($right($num(%_playlist_number%,4),2),2),1),
// narrow text
//$select($sub($mod(%_playlist_number%,63),1),
####  ,
# #  ,
  #  ,
     ,
####  ,
#  #  ,
####  ,
     ,
####  ,
#  #  ,
####  ,
     ,
######,
#  #  ,
####  ,
     ,
####  ,
#  #  ,
####  ,
#     ,
     ,
####  ,
  #  ,
     ,
#   # ,
##   #,
# #  #,
#  ## ,
     ,
#### ,
#    #,
#### ,
     ,
#### ,
#    #,
#### ,
     ,
#### ,
#    #,
#### ,
     ,
#### ,
#    #,
#### ,
     ,)
,<COLOR1>,<COLOR2>)
$ifgreater(%_length_seconds%,600, ,  ))


and the last line of my formatting is:
Quote
$char(09)$get(FB2K)$get(LENGTH)
Title: Foobar2000 format strings
Post by: picmixer on 2003-06-07 14:52:51
Just working on Up North's code as well.  Thanks for posting that as well, U N.  Still looks a bit messy in my own string though.  Will try your new one as well in a sec. Looks good
Title: Foobar2000 format strings
Post by: nuhi on 2003-06-07 15:06:24
Updated nuhi skin

Well, actually it's similiar to the latest posts, but what the heck, I have some copyright on that style  .

My colours are better  , and "piercing effect" is cool also.
(titles that needs to be pierced with a line, ARE pierced with the line  B)  )

Shot (http://www.freewebs.com/nuhi/files/foobar/)

Code @ URL:
"http://www.freewebs.com/nuhi/files/foobar/code.zip"
Title: Foobar2000 format strings
Post by: picmixer on 2003-06-07 15:16:36
@anza

Any reason why you are already up to Foobar20000, Or have I missed out on some major developments around here?
Title: Foobar2000 format strings
Post by: anza on 2003-06-07 15:20:46
Quote
@anza

Any reason why you are already up to Foobar20000, Or have I missed out on some major developments around here?

A good question  It must have been a stupid copy/paste mistake when creating the string

I'll soon post my formatting string+the font which it uses..

MY FORMATTING:
[Script (http://koti.mbnet.fi/antsau/foobar/code.zip)] (includes the font used, isn't really optimized yet, but works well. Commenting is also not so good..)
[Screenshot #1 (http://koti.mbnet.fi/antsau/foobar/pic/text-wide.png)] (with the wide foobar2000 text)
[Screenshot #2 (http://koti.mbnet.fi/antsau/foobar/pic/text-narrow.png)] (with the narrow foobar2000 text)

The screenshots aren't from the newest formatting, but I think the only difference is that the foobar20000 is now foobar2000

Oh, and add %lasttrack% to the last tracks of your albums..
Title: Foobar2000 format strings
Post by: intoxicated on 2003-06-07 17:45:57
Quote
Quote
@anza

Any reason why you are already up to Foobar20000, Or have I missed out on some major developments around here?

A good question  It must have been a stupid copy/paste mistake when creating the string

I'll soon post my formatting string+the font which it uses..

MY FORMATTING:
[Script (http://koti.mbnet.fi/antsau/foobar/code.zip)] (includes the font used, isn't really optimized yet, but works well. Commenting is also not so good..)
[Screenshot #1 (http://koti.mbnet.fi/antsau/foobar/pic/text-wide.png)] (with the wide foobar2000 text)
[Screenshot #2 (http://koti.mbnet.fi/antsau/foobar/pic/text-narrow.png)] (with the narrow foobar2000 text)

The screenshots aren't from the newest formatting, but I think the only difference is that the foobar20000 is now foobar2000

Oh, and add %lasttrack% to the last tracks of your albums..

WOW
it looks cool from the screenshot.
but when i try to paste the code on my foobar.
it shows out syntax errors..
Title: Foobar2000 format strings
Post by: anza on 2003-06-07 18:02:49
Try to redownload it. It should work now, I'm not sure what was wrong and only uploaded my current formatting.
Title: Foobar2000 format strings
Post by: picmixer on 2003-06-07 19:10:24
@anza

Is there any way to control the distance between the individual "Foobar2000" texts.  Would like to find a way to make the distance between the last 0 (of 2000) and the first F (Foobar) slightly larger.  Can't find a way how to though.

Anyway finally manged to implement this in my paylis string somewhat nicely:

////////////////////
////  Config  ////
////////////////////
// Colors
$puts(plnum_col,$if(%_isplaying%,11118E|363636,B0B0B0|363636))
$puts(artist_color,$if(%_isplaying%,11118E|11118E,000000|000000))
$puts(title_color,$if(%_isplaying%,11118E|11118E,FFFFFF|FFFFFF))
$puts(album_color,$if(%_isplaying%,11118E|11118E,000000|000000))
$puts(date_color,$if(%_isplaying%,11118E|11118E,000000|000000))
$puts(track_color,$if(%_isplaying%,11118E|11118E,FFFFFF|FFFFFF))

// Spacers
$puts(album_spacer,')')
$puts(track_spacer,*)
$puts(tag_spacer,*)
// Additional options
// 1 = true, 0 = false
$puts(display_playlist_no,1)
$puts(display_date,1)
$puts(display_file_info,1)
$puts(display_time,1)
/////////////////////////
////  End config  ////
/////////////////////////



//////////////////
////  Tags  ////
//////////////////
// Artist
$if(%artist%,
$puts(artist,$get(artist_color)%artist%),
$puts(artist,$get(artist_color)$caps2($padcut(%_filename%,$sub($strchr(%_filename%,-),2)))))

// Title
$if(%title%,
$puts(title,$get(title_color)%title%),
$puts(title,$get(title_color)$caps2($substr(%_filename%,$add($strchr(%_filename%,-),2),$len(%_filename%)))))

// Album
$if(%album%,
$puts(album,$get(album_color)%album%),
$puts(album,$get(album_color)$if($strcmp($strchr($directory(%_path%),-),0),
$directory(%_path%),
$substr($directory(%_path%),$add($strchr($directory(%_path%),-),2),$len($directory(%_path%))))))

// Date
$if($stricmp($get(display_date),1),$if(%date%,$puts(date,$get(date_color)'('%date%')'),))

// Tracknumber
$if(%tracknumber%,
$puts(tracknum,$get(track_color)$num(%tracknumber%,2).  ),)


//////////////////////////////////
////  Display artist info  ////
/////////////////////////////////
//make playlist number black if playing
$if(%_isplaying%,000000|000000>>>>,FFFFFF|FFFFFF$num(%_playlist_number%,3).)
~ $get(artist) ~ $get(album)$get(date) ~ $get(tracknum)$get(title)

$puts(FB2K,
$transition(
// wide text
//$select($sub($div($right($num(%_playlist_number%,4),2),2),1),
// narrow text
$select($sub($mod(%_playlist_number%,63),1),
¸¸¸¸¸¸,
  ¸ ¸,
    ¸,
      ,
¸¸¸¸¸¸,
¸    ¸,
¸¸¸¸¸¸,
      ,
¸¸¸¸¸¸,
¸    ¸,
¸¸¸¸¸¸,
      ,
¸¸¸¸¸¸,
¸  ¸ ¸,
¸¸¸ ¸¸,
      ,
¸¸¸¸¸¸,
  ¸ ¸,
¸¸¸¸¸¸,
      ,
¸¸¸¸¸¸,
  ¸ ¸,
¸¸¸ ¸¸,
      ,
¸  ¸ ,
¸¸  ¸,
¸ ¸  ¸,
¸  ¸¸ ,
      ,
¸¸¸¸ ,
¸    ¸,
¸¸¸¸ ,
      ,
¸¸¸¸ ,
¸    ¸,
¸¸¸¸ ,
      ,
¸¸¸¸ ,
¸    ¸,
¸¸¸¸ ,
      ,)
,11118E|11118E,000000|000000)
)
$char(9)$get(FB2K)

///////////////////////////////
////  Display file info  ////
//////////////////////////////

  $transition(
$if($stricmp($get(display_file_info),1),
$pad_right($get(tag_spacer),1)
$pad_right($upper($right(%_filename_ext%,3)),3) $pad_right(%__bitrate%/$div(%__samplerate%,1000),3))
$if($stricmp($get(display_time),1),$pad_right(%_length%,7)),
11118E|11118E,000000|000000)




Sorry don't have any way to link to this.

Would actually like to make the Foobar graphics to the right of the file info, but as soon as I do that I get glitches in the file info section. Any ideas?
Title: Foobar2000 format strings
Post by: anza on 2003-06-07 19:21:57
Quote
@anza

Is there any way to control the distance between the individual "Foobar2000" texts.  Would like to find a way to make the distance between the last 0 (of 2000) and the first F (Foobar) slightly larger.  Can't find a way how to though.

Change the 63 to some other number here:
"$select($sub($mod(%_playlist_number%,63),1),"


And try something like this to make the foobar graphic the rightmost thing on your playlist  :

///////////////////////////////
//// Display file info ////
//////////////////////////////
$repeat($char(9),13)
$transition(
$if($stricmp($get(display_file_info),1),
$pad_right($get(tag_spacer),1)
$pad_right($upper($right(%_filename_ext%,3)),3) $pad_right(%__bitrate%/$div(%__samplerate%,1000),3))
$if($stricmp($get(display_time),1),$pad_right(%_length%,7)),
11118E|11118E,000000|000000)
$repeat($char(9),2)$get(FB2K)

tweak the $repeat($char(9),X) values to get it to work well for you
Title: Foobar2000 format strings
Post by: picmixer on 2003-06-07 19:44:28
Thanks a lot.  Looks like that was what I was looking for.  Will have to try it later though.  The weekend is calling.
Regards,
Pic
Title: Foobar2000 format strings
Post by: shafff on 2003-06-07 19:47:52
window tittle:

$caps2(
[%artist% ]$if(%title%,$if(%album%,'['%album%']',-) %title%,%_filename_ext%)) ::
%__bitrate%kbps['('%__extrainfo%')']
:: %_time_remaining%
Title: Foobar2000 format strings
Post by: intoxicated on 2003-06-08 00:28:25
Quote
Try to redownload it. It should work now, I'm not sure what was wrong and only uploaded my current formatting.

hmmm
turned out to be the same..
here is the screen shot ...
screenshot (http://users.snap.net.nz/~longview/foobar.jpg)
Title: Foobar2000 format strings
Post by: anza on 2003-06-08 09:03:41
Are you sure you copied everything needed? I never have gotten the formatting to go like that
You'll have to copy _everything_ after the line "// SETUP".
Title: Foobar2000 format strings
Post by: billcow on 2003-06-08 09:13:55
yeeks! I missed a lot since last night.

1) I actually whipped up a foobar text thingy last night right after I posted, but it was basically the same thing everyone else here figured out, so I won't bother posting it.

2) The progressbar... I have the code for my statusbar at http://billcow.cjb.net/foobar01_status.txt (http://billcow.cjb.net/foobar01_status.txt). It's a modification of one posted here earlier.

3) idvah - it works best with a monospace font - but it should work with a variable font too, albeit to a lesser extent (can't replace *all* spaces with it, only ones before a new column). So here it is. Adjust the colors to suit. http://billcow.cjb.net/foobar_idvah.txt (http://billcow.cjb.net/foobar_idvah.txt)
Title: Foobar2000 format strings
Post by: picmixer on 2003-06-08 11:08:23
Quote
Change the 63 to some other number here:
"$select($sub($mod(%_playlist_number%,63),1),"


And try something like this to make the foobar graphic the rightmost thing on your playlist  :

///////////////////////////////
//// Display file info ////
//////////////////////////////
$repeat($char(9),13)
$transition(
$if($stricmp($get(display_file_info),1),
$pad_right($get(tag_spacer),1)
$pad_right($upper($right(%_filename_ext%,3)),3) $pad_right(%__bitrate%/$div(%__samplerate%,1000),3))
$if($stricmp($get(display_time),1),$pad_right(%_length%,7)),
11118E|11118E,000000|000000)
$repeat($char(9),2)$get(FB2K)

tweak the $repeat($char(9),X) values to get it to work well for you

Couldn't resist still trying this out late at night yesterday.  Works perfect.  I can arrange everything in any way I want to right now.  Guess it would have taken me a while to figure that one out.

Thanks once more anza & UpNorth. Great work.
Title: Foobar2000 format strings
Post by: anza on 2003-06-08 11:35:07
picmixer, glad you got your formatting to work!

upNorth was the first to put foobar2000 text there, but I think I was the first to put my favourite band's name there  I'm also working on the logo, but it isn't an easy task to do..

So, here's something for all you Nirvana fans: Pic (http://koti.mbnet.fi/antsau/foobar/pic/nirvana.png)

EDIT You'll need my version of ProFont (here (http://koti.mbnet.fi/antsau/profont.zip)). If you want to use some other font, change all the "¸"s to #s or some other characters you like.

Code (change the 150 to change the distance between those "Nirvana" texts):
Quote
$transition(
$select($mod(%_playlist_number%,150),
      ,
¸     ¸,
¸¸¸¸¸¸¸,
¸    ¸¸,
    ¸¸¸,
   ¸¸  ,
  ¸¸   ,
¸¸¸   ¸,
¸¸¸¸¸¸¸,
¸     ¸,
       ,
¸     ¸,
¸¸¸¸¸¸¸,
¸¸¸¸¸¸¸,
¸     ¸,
       ,
¸     ¸,
¸¸¸¸¸¸¸,
¸¸¸¸¸¸¸,
¸  ¸  ¸,
¸¸¸¸¸¸,
¸¸¸ ¸¸ ,
¸      ,
¸    ¸,
    ¸¸¸,
  ¸¸¸¸¸,
¸¸¸¸  ¸,
¸¸     ,
  ¸¸  ¸,
    ¸¸¸,
¸     ¸,
¸¸¸    ,
¸ ¸¸¸  ,
  ¸  ¸¸,
¸ ¸¸¸¸¸,
¸¸¸¸¸  ,
¸¸¸    ,
¸      ,
       ,
¸     ¸,
¸¸¸¸¸¸¸,
¸    ¸¸,
    ¸¸¸,
   ¸¸  ,
  ¸¸   ,
¸¸¸   ¸,
¸¸¸¸¸¸¸,
¸     ¸,
       ,
¸      ,
¸¸¸    ,
¸ ¸¸¸  ,
  ¸  ¸¸,
¸ ¸¸¸¸¸,
¸¸¸¸¸  ,
¸¸¸    ,
¸      ,
      ,)
,<COLOR1>,<COLOR2>)
Title: Foobar2000 format strings
Post by: intoxicated on 2003-06-08 13:03:43
Quote
Are you sure you copied everything needed? I never have gotten the formatting to go like that
You'll have to copy _everything_ after the line "// SETUP".

opps..
i did something wrong.

but even tho i copy after //setup
it turned out to be
xxxx|[SYNTAX ERROR IN FORMATTING STRING]
for all the tracks...
 
weird..
Title: Foobar2000 format strings
Post by: anza on 2003-06-08 14:10:58
Really weird.. Could you try to copy only a few lines at a time (like first only the colors, then "now playing" colors, then misc variables) and like that try to find out where the syntax error is?
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-08 16:03:27
I find the easiest way to locate the error is to start at the top and insert a letter og something after a few lines. If it shows up in the preview area before the error message, code prior to this is ok. Remove the letter and put it somewhere futher down. Do this trought the whole code. It can be a good idea to do a test in the middle first, if the code is very long... 

To make it easier to read and write the code, I've customized a syntax file for textpad to work with foobar2000 for syntax highlighting. This helps to avoid errors too.
Title: Foobar2000 format strings
Post by: Rasi on 2003-06-08 16:59:17
hmm i tried all sort by album scripts in this thread with copy & paste in foobar.. but it doesnt work at all...

either i see NOTHING in my playlist anymore (color is set correct) or i only see filenames, but no nice album formatting....
Title: Foobar2000 format strings
Post by: anza on 2003-06-08 17:42:13
Are you sure that
1) you use the correct font (some of the formattings need a specific font)
AND
2) you're files are correctly tagged?
Title: Foobar2000 format strings
Post by: anza on 2003-06-08 19:24:04
Ok my formatting HAD at least one bug: one % instead of a $  Right now you'll have to copypaste the ENTIRE formatting.txt to foobar, I've removed all notes, sort by strings etc from the file. The current string is avaliable here (http://koti.mbnet.fi/antsau/foobar/code2.zip). The old one is here (http://koti.mbnet.fi/antsau/foobar/code.zip). If you don't like the Nirvana text, you can change it to foobar2000 by changing the part of the code to what I've posted before, or you can turn it completely off by commenting one line (comment tells you which one )
Title: Foobar2000 format strings
Post by: JEN on 2003-06-08 20:34:18
@ anza

I like your script but, why are the album lines not ending like they are supposed to end.

Check out the part circled red here (http://www16.brinkster.com/jennyjenx/foobar2000/text-wide.png)
Title: Foobar2000 format strings
Post by: Max on 2003-06-08 21:02:38
Quote
My current "work in progress".
Screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/foobar2000(2).gif)
Playlist code (http://www.stud.ntnu.no/~mortek/foobar2000/PlaylistCode.txt)
Status bar code (http://www.stud.ntnu.no/~mortek/foobar2000/StatusBarCode.txt)
Font: Lucida Console

Thx to Daelus, tama and nuhi for the "base" of my design  


Btw, does anyone know of a font like Lime that supports all the symbols that Lucida Console does?
Lime works fine at size 6, but it hasn't got norwegian letters and the needed symbols...

[edit]
Added code for Status bar.
Added thx to Daelus.
[/edit]

Hi,

Realy Great Playlist Config but if i try to use it: http://mitglied.lycos.de/latrop/Max/fb2k.gif (http://mitglied.lycos.de/latrop/Max/fb2k.gif)

Can anybody Help me?
Title: Foobar2000 format strings
Post by: The Link on 2003-06-08 21:12:10
@Max: Use playlist font "Terminal". It has no unicode support but works with the intended layout (here). Lucida Console didn´t work with me either! Don´t know why. Perhaps there are different versions and we both are from germany so....
Title: Foobar2000 format strings
Post by: musicmusic on 2003-06-08 21:12:37
Try Lucida Console ANSI (if you have it? i do on XP), but youd be better of modifying the string using character map.
Title: Foobar2000 format strings
Post by: Max on 2003-06-08 21:18:10
I have Lucida Console but: ANSI? hmm.. on win2k
Title: Foobar2000 format strings
Post by: Max on 2003-06-08 21:19:49
Quote
ut youd be better of modifying the string using character map.



whats that
Title: Foobar2000 format strings
Post by: musicmusic on 2003-06-08 21:21:54
Well for lucida console I think you need to use $char(9472) and $char(9474) instead of the other chars, you will have to edit the string (but I havent tested it myself)

If you want Lucida Console ANSI I can upload it.. (edit: http://members.lycos.co.uk/musicf/test/Lucon1.ttf (http://members.lycos.co.uk/musicf/test/Lucon1.ttf) )

Use this if you dont know how to edit the string. (I assume you know how to install fonts..)
Title: Foobar2000 format strings
Post by: Max on 2003-06-08 21:28:04
Quote
Well for lucida console I think you need to use $char(9472) and $char(9474) instead of the other chars, you will have to edit the string (but I havent tested it myself)

If you want Lucida Console ANSI I can upload it.. (edit: http://members.lycos.co.uk/musicf/test/Lucon1.ttf (http://members.lycos.co.uk/musicf/test/Lucon1.ttf) )

Use this if you dont know how to edit the string. (I assume you know how to install fonts..)

Your great man!!! It works.. THX
Title: Foobar2000 format strings
Post by: idvah on 2003-06-08 22:45:24
Quote
3) idvah - it works best with a monospace font - but it should work with a variable font too, albeit to a lesser extent (can't replace *all* spaces with it, only ones before a new column). So here it is. Adjust the colors to suit. http://billcow.cjb.net/foobar_idvah.txt (http://billcow.cjb.net/foobar_idvah.txt)

awesome, I love it, thanks man.
Title: Foobar2000 format strings
Post by: Rasi on 2003-06-08 23:28:50
hmm i used a fixed font.. but my problem is no wrong foramtting... i dont have a formatting at ALL!


it looked somehow like this:

c:\music\01-artist-song1
c:\music\01-artist-song2
c:\music\01-artist-song3

and so on....


second example i copied and pasted looked like this:





hehe.. yea.. there was NOTHING.. i could mark the file, but it didnt show them at all..
Title: Foobar2000 format strings
Post by: pootify on 2003-06-08 23:37:45
modified upNorth's awesome code to my own colors, and got rid of the info i didn't need:

screenshot (http://charlie.mg2.org/woobar.png)

anyone want the code?
Title: Foobar2000 format strings
Post by: billcow on 2003-06-08 23:57:27
A few things (no new formatting strings though):

upNorth - Could you post your textpad syntax file? Could be really useful (although I prefer VIM to textpad)

and a small hint - if you have an ad-blocking proxy installed (I use privoxy) you can probably configure it to forge HTTP refferres - which fixes any problems with external linking of images and such. Fixes many a pain-in-the-(butt).

I'm trying to think of ideas for something interesting I could do with foobar, but I could use some ideas. All I can think of right now is to write a perl script implementing an alternate formatting language to ease implementation of various tricks (text centering, implement a figlet-like solution for automating text stuff, pseudo-background-color alterations, etc) via implementation of macros and such. Only problem is that i'm not too keen with BNF and the various parser-generators. And I only have a basic knowledge of regular expressions (If you don't know what any of those are, you're not alone - they are basically complicated things that only extreme computer geeks have any knowledge of)
Title: Foobar2000 format strings
Post by: Rasi on 2003-06-09 03:14:38
http://rasi.homeip.net:66/foo.jpg (http://rasi.homeip.net:66/foo.jpg)

this is how it looks for me.. i use the font provided with the script

http://koti.mbnet.fi/antsau/foobar/code.zip (http://koti.mbnet.fi/antsau/foobar/code.zip)

this is the one i used...

http://koti.mbnet.fi/antsau/foobar/pic/text-wide.png (http://koti.mbnet.fi/antsau/foobar/pic/text-wide.png)

this is what it SHOULD look like
Title: Foobar2000 format strings
Post by: dan83 on 2003-06-09 04:14:39
Quick question:

I'm using UpNorth's code (with billcow's progress bar) and I'm having some trouble when adding single tracks (not albums).  Is this code only meant for albums?  Here's a screenshot of what I'm talking about:  the artist doesn't show for the singles, and sometimes there's formatting issues.  Thanks for the help!

screenshot (http://axe.acadiau.ca/~048867r/fb2k.jpg)

code (http://axe.acadiau.ca/~048867r/fb.txt)

Edit:  added link to code.
Title: Foobar2000 format strings
Post by: cyber_spooky on 2003-06-09 05:44:54
I got some question about dividers, see following screenshot. I got blue lines between in "fileextention | trackgain" but as you can see the lenght of the string is different between OGG and MP3 so the lines don't line up vertically one under the other. Is there a trick for this in the code?

Also how do you guys make long continuous vertical divider lines in your playlist from top to bottom??

(http://users.skynet.be/bk230772/foob.jpg)
Title: Foobar2000 format strings
Post by: intoxicated on 2003-06-09 07:01:00
Quote
Really weird.. Could you try to copy only a few lines at a time (like first only the colors, then "now playing" colors, then misc variables) and like that try to find out where the syntax error is?

i tried to paste code bit by bit.
i found that
all the codes work fine up to this line
Code: [Select]
$puts(LENGTH,$get(NP_L2)%_length%$get(LIGHT)$if(%tracknumber%,$select($min(%tracknumber%,2),$if(%lasttrack%,?]',?),$if(%lasttrack%,?, |)),  ))


after i put that it shows out
[SYNTAX ERROR IN FORMATTING STRING]
Title: Foobar2000 format strings
Post by: anza on 2003-06-09 07:08:58
Quote
@ anza

I like your script but, why are the album lines not ending like they are supposed to end.

Check out the part circled red here (http://www16.brinkster.com/jennyjenx/foobar2000/text-wide.png)

The last tracks of the albums need a %lasttrack% tag (no matter what value, I've set mine to "true"). The script checks if it is present and ends the lines according to that.
Title: Foobar2000 format strings
Post by: anza on 2003-06-09 07:11:40
Quote
http://rasi.homeip.net:66/foo.jpg (http://rasi.homeip.net:66/foo.jpg)

this is how it looks for me.. i use the font provided with the script

http://koti.mbnet.fi/antsau/foobar/code.zip (http://koti.mbnet.fi/antsau/foobar/code.zip)

this is the one i used...

http://koti.mbnet.fi/antsau/foobar/pic/text-wide.png (http://koti.mbnet.fi/antsau/foobar/pic/text-wide.png)

this is what it SHOULD look like

WHOA! How did it end up looking like that?! 
Try this (http://koti.mbnet.fi/antsau/foobar/code.zip) script instead, and tell if it does anything different, ok?
Title: Foobar2000 format strings
Post by: anza on 2003-06-09 07:13:08
Quote
I got some question about dividers, see following screenshot. I got blue lines between in "fileextention | trackgain" but as you can see the lenght of the string is different between OGG and MP3 so the lines don't line up vertically one under the other. Is there a trick for this in the code?

Also how do you guys make long continuous vertical divider lines in your playlist from top to bottom??

1) You'll have to use monospaced font

2) I myself have only edited the font I use so that | is a bit longer.
Title: Foobar2000 format strings
Post by: intoxicated on 2003-06-09 07:13:32
think i fugured out where the problem is..
since my default language for non-unicode isn't english ..
when i open up the code with note bad
the system changed the code abit after paste'n'copy

i tried to open up the code with internet explorer and change the encode to ISO
and it works..
somehow..

sorry if i caused any trouble..
but wow
the code looks nice..

just wondering..
is there anyway i can fix up the alignment of the tracks for non-english tags?
Title: Foobar2000 format strings
Post by: anza on 2003-06-09 07:17:32
EDIT: I see you got it working, great! 
At least with 0.667 you can select what it does with double-width characters, try to change that. I don't know if it fixes the problem, as I myself don't have any of that kind of tracks.
Title: Foobar2000 format strings
Post by: intoxicated on 2003-06-09 07:30:34
Quote
EDIT: I see you got it working, great! 
At least with 0.667 you can select what it does with double-width characters, try to change that. I don't know if it fixes the problem, as I myself don't have any of that kind of tracks.

i tried..
no use..
same result..
but anyway.. only the line of first track is slightly longer...
this forammting still looks SO COOL...
think i should take some times to figure out how to write my own one...
after the exams... 

tkx for the great job again...
Title: Foobar2000 format strings
Post by: intoxicated on 2003-06-09 07:37:25
just wonder
is there any way to change the font bigger?
eyes are getting tired from reading size 8...

Title: Foobar2000 format strings
Post by: anza on 2003-06-09 07:55:52
Quote
just wonder
is there any way to change the font bigger?
eyes are getting tired from reading size 8...


Damn... I HAD a bit bigger version of the font, but I think I must have deleted it without thinking enoug... I think I can try to find (or even make) the bit bigger version if you want/need it. I think I myself may need it when I get home in a week. I like the font's size at 1024x768 (which I use here), but at home I use 1600x1200 and it might be a bit too little for me, too

EDIT: Ok, here's the font, now in two sizes, 8 and 9. I believe 9 should be big enough for you people and didn't bother to make even bigger sizes. Anyone of you who has done bitmap fonts know it's quite boring... But let me know if you want it even bigger and I think I can do it.
The font (http://koti.mbnet.fi/antsau/profont2.zip)

EDIT2: Crap.. There are some little glitches in the font using size 9. I'll update it soon.

EDIT3: Ok I think all the glitches are gone. Just redownload the font. If you notice any more glitches just let me know.
Title: Foobar2000 format strings
Post by: intoxicated on 2003-06-09 08:53:11
Quote
Quote
just wonder
is there any way to change the font bigger?
eyes are getting tired from reading size 8...


Damn... I HAD a bit bigger version of the font, but I think I must have deleted it without thinking enoug... I think I can try to find (or even make) the bit bigger version if you want/need it. I think I myself may need it when I get home in a week. I like the font's size at 1024x768 (which I use here), but ant home I use 1600x1200 and it might be a bit too little for me, too

EDIT: Ok, here's the font, now in two sizes, 8 and 9. I believe 9 should be big enough for you people, but let me know if you want it even bigger.
The font (http://koti.mbnet.fi/antsau/profont2.zip)


didn't notice u updated the post
this is much better than size 8....
B)
Title: Foobar2000 format strings
Post by: picmixer on 2003-06-09 09:26:42
Thanks for posting that Font as well.  Was kind of looking for something similar a few pages back in this thread.  Finally it's here.  (Am sure you'll enjoy it when you get home, it looks great at 1600 * 1200)
Title: Foobar2000 format strings
Post by: MachineHead on 2003-06-09 10:07:44
Does, or has, anyone come up with a way to have :B seperate what directory folder the files are in are using the code from anza?

Example: For every root folder is there a way to have a line, or something, that at least gives you a hint to where the files are when just scrolling through all files?

Maybe below will help...

G:\Music\MP3 Files
G:\Music\Downloaded Files
G:\Music\MPC Files

I don't lump every file I have into one folder. I think it would be handy when scrolling through a few thousand files to have something that hints which root folder you're viewing.

Just a thought.
Title: Foobar2000 format strings
Post by: anza on 2003-06-09 10:49:57
Quote
Does, or has, anyone come up with a way to have :B seperate what directory folder the files are in are using the code from anza?

Example: For every root folder is there a way to have a line, or something, that at least gives you a hint to where the files are when just scrolling through all files?

Maybe below will help...

G:\Music\MP3 Files
G:\Music\Downloaded Files
G:\Music\MPC Files

I don't lump every file I have into one folder. I think it would be handy when scrolling through a few thousand files to have something that hints which root folder you're viewing.

Just a thought.

It depends a bit on how you have organized your files. If they're like this:
"G:\Music\MP3 Files\Artist\Album" etc, then it's easy.
Just change the 4 to a 5 here:
Code: [Select]
$select($min(%tracknumber%,4),

and add this line after the one with date and genre stuff:
Code: [Select]
$get(SEP3)$padcut('Dir: \'$directory(%_path%,3),$get(WIDTH)),


There are also a few other ways to do this, but this is maybe the easiest if all your files are organized the same way.
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-09 12:13:43
@billcow, I have uploaded my syntax file. It's based on reverse engeneering, but it works.
If you improve it, I would be thankful if you could post it.
syntax file (http://www.stud.ntnu.no/~mortek/foobar2000/Foobar2000.syn)
This talk about "ad-blocking proxy", was that something I should have understood? 
As for new things to make for foobar. If you have the skills to make a plugin I would like to have the ability to rate tracks. I could do it without a plugin by using %SONGRATING% and %ALBUMRATING% tags or something, but a rightclick menu would make it alot easier. I have never used rating before, but tags with that info could be useful to extend the playlist info.

@pootify, I would like to have that alternative color scheme, could you post the code for playlist and status bar? 

@dan83, You are partly right about single tracks. The design is made for use with complete albums, but if you have single track that doesn't belong to a complete album you can use the %SINGLETRACK% tag and set it to whatever you want. This way a single song will display ok, but you have to deside if a track should display nicely alone or as a part of an album.
Title: Foobar2000 format strings
Post by: Rasi on 2003-06-09 12:19:25
Quote
WHOA! How did it end up looking like that?! 
Try this script instead, and tell if it does anything different, ok?



this is absolutely the same thing happening....
Title: Foobar2000 format strings
Post by: herr klang on 2003-06-09 19:24:43
Quote
modified upNorth's awesome code to my own colors, and got rid of the info i didn't need:

screenshot (http://charlie.mg2.org/woobar.png)

anyone want the code?

well, i'm more interested in that font that you're using  what is that?
Title: Foobar2000 format strings
Post by: leland on 2003-06-09 20:03:26
Quote
modified upNorth's awesome code to my own colors, and got rid of the info i didn't need:

screenshot (http://charlie.mg2.org/woobar.png)

anyone want the code?

I wouldn't mind seeing the code....

On a side note concerning the last track tag, will I need to go add that to every album I have? That's a pretty intense undertaking....
Title: Foobar2000 format strings
Post by: manticore on 2003-06-09 20:10:12
How can I get rid of the "Genre" field from upNorth's script? thanx
Title: Foobar2000 format strings
Post by: billcow on 2003-06-09 20:51:13
upNorth: The ad-blocking proxy was just a random musing for anyone interested. As for the syntax file, I actually wanted to make a VIM syntax file and wanted to use yours to compare the results with while I worked on it. (I used to use Textpad before I switched to VIM after a long stint with linux).

As for coding plugins, it's something I would probably be capable of doing, but at the moment I don't have a C(++) compiler installed, so for the moment I would prefer things that can be done fairly simply with Perl (I'm learning the language as I go). The chief problem I have is that most of the things I would want to do can't be done with regular expressions alone (macros and loops, specifically). I'm thinking of maybe trying to use m4 (an open-source macro language) along with a regular expression-based engine to generate formatting strings, using m4 for loops and macros and the regexp engine to make math easier to debug.

leland: I actually changed the code to make it look good without lasttrack tags. I don't have the code available at the moment, but the gist of it is that I changed the characters on either side of the first track number from L-type lines to T-type lines. I figure the first part seperates the albums well enough that the extra seperation doesn't matter.
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-09 20:58:04
Most parts of the script is not made by me, I've only customized it to my taste and needs.
Thx to Daelus, tama and nuhi for the rest.

@manticore:
I removed Date, Genre and Disc.
You can download it here: Light version (http://www.stud.ntnu.no/~mortek/foobar2000/(NoGenre)Playlist.txt)
I hope got rid of everything...


Edit: spelling
Title: Foobar2000 format strings
Post by: JEN on 2003-06-09 21:29:10
Quote
Quote
modified upNorth's awesome code to my own colors, and got rid of the info i didn't need:

screenshot (http://charlie.mg2.org/woobar.png)

anyone want the code?

I wouldn't mind seeing the code....

On a side note concerning the last track tag, will I need to go add that to every album I have? That's a pretty intense undertaking....

I modified it and created this "minimalist (http://www16.brinkster.com/jennyjenx/foobar2000/foobarSimple.gif)" version, for all you minimalists out there

[mumbles]  I think I am the only minimalists here!  [/mumbles]
Title: Foobar2000 format strings
Post by: leland on 2003-06-09 21:57:14
billcow, thanks for the tips - the next time i need a brain break i'll take a crack at seeing what i can do with your idea. if it works well, i'll post...that said, don't expect anything... 
Title: Foobar2000 format strings
Post by: TazerFloyd on 2003-06-09 22:42:39
upNorth... a newbie question 
errr... and how i use your code plz...
where shall i put it?
thanks
Title: Foobar2000 format strings
Post by: MachineHead on 2003-06-09 23:48:05
@anza

Already a 5 there. So I left that line alone.

Other one works good as well. Now, if I may, how could a guy change the color of the directory shown to contrast with the rest?

(Don't know where to look, but can figure out a color once pointed out.) 

And thanks.
Title: Foobar2000 format strings
Post by: Luxus on 2003-06-10 01:41:33
hey upnorth i love ur formating and use it since older versions
but i wonder where is the %preformer% stuff?
i have many house compilations and soundtracks .. it would be nice if u can put back into it..
or is there now a other method?

support for xx/xx track numbers would be nice too
so the last track tag is not needed

ok working after i put in a VARIOUS tag ;D
how i can add a album artist?
i like the dj name more then the "various artist"

something like
if %album artist% artist_text=%album artist%
elseif %various% artist_text=Various Artist
else artist_text=%artist%

i dont know how i write this in the formating lang ;D anyone can help?
Title: Foobar2000 format strings
Post by: anza on 2003-06-10 07:57:58
Quote
Other one works good as well. Now, if I may, how could a guy change the color of the directory shown to contrast with the rest?

(Don't know where to look, but can figure out a color once pointed out.) 

Well, the colors are specified on the top of the code and you can always add more there (or wherever you want, I just like too keep them at the same place). After selecting which one to use, just put a $get(<COLOR>)  after the $get(SEP3), like this:

$get(SEP3)$get(YELLOW)$padcut('Dir: \'$directory(%_path%,3),$get(WIDTH)),

It should work.
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-10 13:04:22
@Luxus:
Now I've added %performer% and %album artist% again.
%performer% will do the same as %various%, and what it says doesn't matter as long as it's there.
%album artist% can be used for DJ compilations as before.
"Compilation" will not show up as it did in an earlier version, but is does the same.
Playlist code (http://www.stud.ntnu.no/~mortek/foobar2000/Playlist2.txt)

As I've said before, the vertical "Foobar2000" graphics can be turned off at the start of the code. It's only something I did for fun.
No support for xx/xx tracknumbers, maybe later...

I'll be very busy the next two months or so, and because of that foobar2000 will not have a high priority, apart from listening.
Title: Foobar2000 format strings
Post by: tama on 2003-06-10 13:26:55
have made a couple of additions -  mainly to allow more complex metadata combinations (damn format strings are getting to hard to maintain  )

now uses :
%variousartists%, %variouscomposers%, %composer%, %compiledby%, %albumartist%, %program%, %vocals%,  plus the usual

added support for double width characters (only had it working with MS Gothic - the other fixed width fonts don't seem to make double width characters 2 characters wide)

added support for track 0 (i guess music before the start of track 1 is track 0?)

my colors still suck though lol

screenshot (http://www.wn.com.au/con-eden/foobar.png)
code (http://www.wn.com.au/con-eden/foo_playlist.txt)
Title: Foobar2000 format strings
Post by: billcow on 2003-06-10 13:30:07
Bringing you more fancy coloring in the billcow tradition:

screenshot (http://billcow.cjb.net/foobar02.png)
playlist code (http://billcow.cjb.net/foobar02.txt)
statusbar code (http://billcow.cjb.net/foobar02_status.txt)

Pretty much the same visually as my last config except for the color fade. However, there are some bugfixes too - the old version got screwed up with fields that didn't fit - they are now clipped.
Title: Foobar2000 format strings
Post by: intoxicated on 2003-06-10 15:39:32
Quote
have made a couple of additions -  mainly to allow more complex metadata combinations (damn format strings are getting to hard to maintain  )

now uses :
%variousartists%, %variouscomposers%, %composer%, %compiledby%, %albumartist%, %program%, %vocals%,  plus the usual

added support for double width characters (only had it working with MS Gothic - the other fixed width fonts don't seem to make double width characters 2 characters wide)

added support for track 0 (i guess music before the start of track 1 is track 0?)

my colors still suck though lol

screenshot (http://www.wn.com.au/con-eden/foobar.png)
code (http://www.wn.com.au/con-eden/foo_playlist.txt)

this is nice..
the non-eng characters can be displayed proprly with ProFontWindows from anza
i noticed that if there is one song of the album which the artist is different to the others
can cause the alignment errors....
hmm
maybe i should fixup the id3 tags are first.. B)
Title: Foobar2000 format strings
Post by: quadratic on 2003-06-10 22:53:05
Is there any way to disable the playlist selection highlight? Setting the playlist selection and selected item frame to all black helps, but it still affects the colours beneath and isn't an ideal solution. It'd be nice to be able to disable it or set it to transparent somehow. (I could have sworn one of the earlier versions had an option to disable the highlight, but I may be mistaken...)
Title: Foobar2000 format strings
Post by: MachineHead on 2003-06-10 23:40:35
@anza

Thanks again. Pretty sure I get what you mean with colors. Now to test it out.

PS - Very nice job with this.
Title: Foobar2000 format strings
Post by: billcow on 2003-06-10 23:51:27
quad: instead of doing (weird symbol)BBGGRR(weird symbol)  for the color do "(weird symbol)BBGGRR|BBGGRR(weird symbol)" for the same colors when selected, or "(weird symbol)B1G1R1|B2G2R2(weird symbol)" for different colors than an inversion of the original.

and secondly:

.
.
.

New code! Yay!!!!! It's a simplistic rip-off of the infamous upNorth code, this time for variable-width fonts with box-drawing characters (aka those straight line thingies). I'm not doing all the fancy tag stuff - I don't use 'em, so if you want that, do it yourself, ya lazy son-of-a-gun. Seriously though - it's not nearly as elegant as the upNorth code, but it works fuh-ine for me, which means it doesn't need any special tags. If it doesn't look good with your font, just look for a different font. There are quite a few that work that come with windows, so look around for one you like that does.

screenshot (http://billcow.cjb.net/foobar03.png)
code (http://billcow.cjb.net/foobar03.txt)
Title: Foobar2000 format strings
Post by: whitenoise on 2003-06-11 07:08:07
Quote
I modified it and created this "minimalist (http://www16.brinkster.com/jennyjenx/foobar2000/foobarSimple.gif)" version, for all you minimalists out there

[mumbles]  I think I am the only minimalists here!  [/mumbles]

I like it. And would love to see how you did it. Thanks very much!
Title: Foobar2000 format strings
Post by: pootify on 2003-06-11 07:44:32
oh yeah, for those of you who wanted the code for this layout (http://charlie.mg2.org/woobar.png):

click here for the code (http://charlie.mg2.org/foobar.txt)
Title: Foobar2000 format strings
Post by: herr klang on 2003-06-11 09:08:23
someone was asking to make these scripts detect the last track automatically if your tracknumber is stored in an xx/xx format.. here's a code snippet that'll do that..

Code: [Select]
// detect last track
$if($strcmp($if($strchr(%tracknumber%,'/'),
$substr(%tracknumber%,$add($strchr(%tracknumber%,'/'),1),$len(%tracknumber%))
,
x),$num(%tracknumber%,1))
,
$puts(lasttrack,1)
,
)


..and then just replace all occurences of %lasttrack% with $gets(lasttrack) (or even $or($gets(lasttrack),%lasttrack%) if you wanted to be fancy.)

EDIT: i need to learn to type. corrected a typo in the code that made this not work.
Title: Foobar2000 format strings
Post by: 12345 on 2003-06-11 22:49:53
Quote
Quote
I modified it and created this "minimalist (http://www16.brinkster.com/jennyjenx/foobar2000/foobarSimple.gif)" version, for all you minimalists out there

[mumbles]  I think I am the only minimalists here!  [/mumbles]
I like it. And would love to see how you did it. Thanks very much!

I second that. I'd like the b&w position-bar in the status-bar too...
Title: Foobar2000 format strings
Post by: anza on 2003-06-12 07:35:17
I fell in love with pootify's colors immediately when I saw them and I just had to change my formatting a bit to match those colors  That green is just something so neutral and looks great, unlike black..

Code+notes: http://koti.mbnet.fi/antsau/foobar/formatt...tting_green.zip (http://koti.mbnet.fi/antsau/foobar/formatting_green.zip) (just open the .fb2k files in any text editor)
Screenshot: http://koti.mbnet.fi/antsau/foobar/pic/greenish.png (http://koti.mbnet.fi/antsau/foobar/pic/greenish.png)
Title: Foobar2000 format strings
Post by: DustMagnet on 2003-06-12 09:13:00
I've tweaked Jan's code to use a custom FORCETRACK tag to format albums that are missing one or more tracks at the start of the album.

screenshot (http://members.shaw.ca/mcramer1/foobar%20030612.gif)
code (http://members.shaw.ca/mcramer1/foobar%20code.txt)

In the screenshot you see that the live Japan album is missing the first 2 tracks. I want the playlist to format Track 3 as the first track, so I add a %forcetrack% tag with the value 1. Tracks 4 and 5 are assigned values of 2 and 3 respectively, and the playlist formats them as the second and third tracks.

The code needs a lot of cleaning up, but it illustrates a concept that works well for me.

Edit: Sorry, I can't get this post to show active links.
Title: Foobar2000 format strings
Post by: anza on 2003-06-12 09:54:29
I was thinking how should I do the same thing (albums with songs missing), and I think you solved it, thanks

EDIT: Ok, updated my script to use %faketracknr%. Further instructions are in the zip file. Also, it now uses %singletrack% as I found it more useful than %fullalbum%. If you already have tagged your albums with %fullalbum% tag, you can change all occurences of "$not(%singletrack%)" to "%fullalbum%", or you can sort all your files by %fullalbum% and then add %singletrack% to all songs that need it and remove the %fullalbum% tag, the choice is yours

Download: still the same link
Title: Foobar2000 format strings
Post by: DustMagnet on 2003-06-12 15:05:24
Quote
I was thinking how should I do the same thing (albums with songs missing), and I think you solved it, thanks

Glad I could contribute something useful.  I was reluctant to use yet another custom tag, but it seems to be the only way to deal with incomplete albums.
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-12 15:13:47
Quote
Glad I could contribute something useful.   I was reluctant to use yet another custom tag, but it seems to be the only way to deal with incomplete albums.

Do you or others, have some thoughts on the drawbacks of using custom tags?
Title: Foobar2000 format strings
Post by: anza on 2003-06-12 15:32:05
Custom tags aren't a problem IMHO, mainly because of foobar's powerful masstagger. I find them actually really useful, at least for all of us who make these formatting strings. We "designers" can (or even should?) use them to get the formatting look exactly what we want. If one doesn't want to tag his/her files, then it's his own problem, and shouldn't use formatting that "needs" custom tags.
Title: Foobar2000 format strings
Post by: JEN on 2003-06-12 17:54:08
Quote
Quote
Quote
I modified it and created this "minimalist (http://www16.brinkster.com/jennyjenx/foobar2000/foobarSimple.gif)" version, for all you minimalists out there

[mumbles]  I think I am the only minimalists here!  [/mumbles]
I like it. And would love to see how you did it. Thanks very much!

I second that. I'd like the b&w position-bar in the status-bar too...

Sorry I couldn't reply sooner, have been a bit busy.  Here (http://www16.brinkster.com/jennyjenx/foobar2000/playlist.txt) is the script for the "Playlist" only.
Title: Foobar2000 format strings
Post by: amppa on 2003-06-13 00:31:26
Updated foobar and decided to make a new theme.. Took some ideas from previous posts and created this -> screenshot (http://pelit.koillismaa.fi/amppa/foobar2k_style2.png).

Quite simple one. My files don't have %lasttrack% or num/num so the code isn't using them.

Edit: made a nice progress bar with Tahoma font (Lucida is just so ugly in statusbar  ). Some people seem to have got rid of those extra boxes in statusbar, how could it be made?
Title: Foobar2000 format strings
Post by: DustMagnet on 2003-06-13 01:02:40
Quote
Do you or others, have some thoughts on the drawbacks of using custom tags?

Oh, all I meant is that I thought it would be more elegant if I could figure out a way to format the incomplete albums without a custom tag -- a bit of a challenge, you might say. ;-) Beyond that I have no problems with extra tags.
Title: Foobar2000 format strings
Post by: blindie on 2003-06-13 02:43:35
anza

[cut]

edited:
it is so bitter to be both stupid and blind. 
thanks god not deaf yet. 
Title: Foobar2000 format strings
Post by: greenirft on 2003-06-13 04:58:06
Screenshot (http://css.engineering.uiowa.edu/~mdpotter/fb2k.png)

Basically it is UpNorth's code that I modified to my personal tastes. I removed the genre and some other things internally and slightly changed the way things are viewed. Then obviously changed the color scheme to something that I'm still not quite content with (but getting closer). Once I get back from vacation I am going to modify some more things (like a real progress bar).


Also, if anyone is interested, I have created a very simple Textpad syntax highlighting script. For some reason it doesn't correctly handle the %, | or weird block character like I'd like. Though I haven't actually looked into having it do it how I want. There is still a lot of work that I could to it (like adding some of the tech info keywords, and maybe more common metadata info), it does turn lots of text into somewhat easier to read text. Anyways, I present to you my Textpad syntax file (http://css.engineering.uiowa.edu/~mdpotter/fb2k.syn).

To install you just save it and toss it into your Textpad/system folder. Then make a "New Document Class" and when it asks for the syntax highlighting select the fb2k.syn file and check the "enable syntax highlighting" box. Then you can also play around the colors to your own personal choice.
Title: Foobar2000 format strings
Post by: DustMagnet on 2003-06-13 09:42:25
screenshot (http://members.shaw.ca/mcramer1/foobar%20030613.gif)
code (http://members.shaw.ca/mcramer1/code%20030613.txt)

Tweaked Jan's code further. For collections I set %artist% to "Various" and use a %band% tag for individual artists. Setting colors and lucinda characters is now easier with variables at the top of the code.
Title: Foobar2000 format strings
Post by: megar on 2003-06-13 11:38:19
This is my string for playlist. (It is quite huge, but completely feeds my needs. It also display great with randomized playlists)

I tried to create a smart string, it guesses (and matches) many things and arrange them quite nicely.
(At least with my collection)
I hope you will enjoy it. (PM me!)

COLORS:
playlist background color: 24, 22, 72
playlist selection color:  30, 60,120
selected item frame:      178,178,185

PLAYLIST FONTS: (choose one)
narrow: Terminal, 9pt
small:  Sheldon narrow, 9pt
normal: Onuava, 9 pt
large:  Simsun, 12pt (http://www.langlab.jhu.edu/SIMSUN.TTF)

FEATURES:
It tries to guess the year using %year%, %date% and the directory name.
It looks for the string "(2001)" in the directory name

It displays the codec used and the bitrate (as 192 or 3M if >999kbps) (with rounding)
The bitrate is a gradient from red to yellow to green to show the quality. mpc 158 > ogg 160 > mp3 192 !
It also handles mono and non<44Khz files
If the codec is unknown, it displays its name, and doesn't use color to display the bitrate

It tries to guess the track number from %tracknumber% and the file name.
It looks at the 3 first characters of the file name, avoiding to get confused by >100 track (I have som track ordered 201 to tell track #1 from cd #2)

If TITLE and ALBUM are present, it displays them with proportional lengths.
If Title is very different to the filename, it displays both.
If YEAR is not tagged, nor guessed, it uses more space to show the title. Same for Tracknumber.

If no TITLE present, it display the filename and the directory name.
If it guessed informations in the file/directory name, it does not display them twice !

It displays the time as 1:23 or 17m for >9:99 songs. (with rounding)
If ReplayGain is not present, the time is shown in RED.

BY THE WAY:
How to test if a string is >=0 ???? I did if (ST>0 or strcmp(ST,0) ).
REQUESTED FEATURES:
TAGZ: $ifgreaterorequal or $ascii(x) or $isint($x).
GUI: playlist autoscroll when dragging item inside the playlist

Screenshot (http://www.atomas.com/cafzone/foobar_megar.gif)
Code (http://www.atomas.com/cafzone/foobar_megar.txt)
Title: Foobar2000 format strings
Post by: damjanek on 2003-06-13 13:45:08
Quote
Updated foobar and decided to make a new theme.. Took some ideas from previous posts and created this -> screenshot (http://pelit.koillismaa.fi/amppa/foobar2k_style2.png).

could you post an adress to your code...?
i'll be glad
Title: Foobar2000 format strings
Post by: amppa on 2003-06-13 15:36:39
Quote
could you post an adress to your code...?
i'll be glad

Sure. Something to take into consideration..
- does not use %lasttrack% or anything => does not work well with single tracks / albums with less than 3 tracks
- bitrate is taken from directory name. can easily be replaced with %__bitrate%, though.

Font Lucida Console, statusbar font Tahoma.
Selection 5, 55, 0
Frame 11, 85, 0

screenshot (http://pelit.koillismaa.fi/amppa/foobar2k_style3.png)
statubar code (http://pelit.koillismaa.fi/amppa/fb2k_status.txt)
playlist code (http://pelit.koillismaa.fi/amppa/fb2k_playlist2.txt)

I hope it will work well, people seem to have problems with some fonts' special chars...

edit: Some minor changes, a new stupid vertical foobar text before track lengths.
Title: Foobar2000 format strings
Post by: radfaraf on 2003-06-14 01:28:23
Is there any documentation for the TAGZ stuff or atleast a document with a list of diferent tags that can be used?
Title: Foobar2000 format strings
Post by: ExUser on 2003-06-14 03:22:23
Quote
Is there any documentation for the TAGZ stuff or atleast a document with a list of diferent tags that can be used?

Documentation: Check the help button in the title formatting page of the prefs.

Tags: Check the file info box. TAG_NAME=[STUFF] TAG_NAME corresponds to %tag name% in Title Formatting.

Enjoy: Enjoy. 
Title: Foobar2000 format strings
Post by: ExUser on 2003-06-14 03:23:50
Quote
BY THE WAY:
How to test if a string is >=0 ???? I did if (ST>0 or strcmp(ST,0) ).
REQUESTED FEATURES:
TAGZ: $ifgreaterorequal or $ascii(x) or $isint($x).
GUI: playlist autoscroll when dragging item inside the playlist

$if($strcmp($left(%tag%,1),-),true stuff,false stuff)
Title: Foobar2000 format strings
Post by: damjanek on 2003-06-14 09:10:14
@ammpa
thx a lot....
my statusbar looks good......finally..
Title: Foobar2000 format strings
Post by: megar on 2003-06-14 09:34:46
Quote
Quote
BY THE WAY:
How to test if a string is >=0 ???? I did if (ST>0 or strcmp(ST,0) ).
REQUESTED FEATURES:
TAGZ: $ifgreaterorequal or $ascii(x) or $isint($x).
GUI: playlist autoscroll when dragging item inside the playlist

$if($strcmp($left(%tag%,1),-),true stuff,false stuff)

It won't work if %tag% is not a number.
--> it will report it is >=0
Title: Foobar2000 format strings
Post by: AlfredSka on 2003-06-14 12:18:04
So it looks like I've gotten myself into a project which is a bit too time consuming for me, especially considering I'm soon leaving the country for a month and a half.  I put together a basic web page which can be used share playlist, statusbar, etc formatting scripts.  You can view the functional, but without content version of it here (http://www.ac.wwu.edu/~mowerm/). 

I'm basically willing to give it away in hopes that someone would be willing to put time into collecting and posting the scripts in a much easier to navigate system than this thread is turning into.  I've even included some short instructions on how to maintain the site (not to mention you can PM me to ask anything).  The whole page is included in the following file: Ff2kWeb10.zip (http://www.ac.wwu.edu/~mowerm/Ff2kWeb10.zip).  It has been written in simple HTML, without the use of frontpage or dreamweaver.

Anyways, even if my specific page outline doesn't get utilized, I think it would be very worthwile to have a separate page dedicated to formatting strings (much like the GUI thread did with "foobar Looks").  As it is now 4:17am, I'm going to bed, good day all.

~Alfred Ska
Title: Foobar2000 format strings
Post by: radfaraf on 2003-06-14 13:53:29
Nice work ALfred 
Title: Foobar2000 format strings
Post by: Stefoufou on 2003-06-14 17:25:01
hello,
i ve got a problem with my foobar script 
when i write it there is no problem but when i want to add colors the tracknumbers arent aligned ! i dont understand why... please help me 
Screenshot (http://membres.lycos.fr/stefoufou/foobar.png)
Script (http://membres.lycos.fr/stefoufou/foobar.txt)

i hope you can tip me

edit : i ve updated screen and script but i ve got some pb again :/
Title: Foobar2000 format strings
Post by: musicmusic on 2003-06-14 17:57:53
Quote
hello,
i ve got a problem with my foobar script 
when i write it there is no problem but when i want to add colors the tracknumbers arent aligned ! i dont understand why... please help me

it is because the colour codes are counted in $padcut . you need to keep colour codes out of $padcut , or change script to account for it (may need $if() for that) .

theres too many $puts for me to make any sense of your script, but judging by screenshot you need to put colour code before $padcut(), using something like $if($strcmp($num(%tracknumber%,2),02),colourcode,) so it only changes colour for artist title . or maybe theres somethign else you need to do .
Title: Foobar2000 format strings
Post by: Stefoufou on 2003-06-14 18:33:42
Quote
Quote
hello,
i ve got a problem with my foobar script 
when i write it there is no problem but when i want to add colors the tracknumbers arent aligned ! i dont understand why... please help me

it is because the colour codes are counted in $padcut . you need to keep colour codes out of $padcut , or change script to account for it (may need $if() for that) .

theres too many $puts for me to make any sense of your script, but judging by screenshot you need to put colour code before $padcut(), using something like $if($strcmp($num(%tracknumber%,2),02),colourcode,) so it only changes colour for artist title . or maybe theres somethign else you need to do .

ok thanks you
i understand because it doesnt work. what does "$strcmp" mean ? it dont know how to use this syntaxe 
i will return to change my script and find a solution...
Title: Foobar2000 format strings
Post by: musicmusic on 2003-06-15 19:00:46
Quote
ok thanks you
i understand because it doesnt work. what does "$strcmp" mean ? it dont know how to use this syntaxe 
i will return to change my script and find a solution...

I think you should look through the titleformatting help, the answer is there:
Quote
- $strcmp(x,y) - returns "1" when strings x and y are identical, empty string otherwise; intended for use with $if()


Basically it is used to compare strings, so in this case to check tracknumber.
Title: Foobar2000 format strings
Post by: yaman666 on 2003-06-16 07:31:35
Quote
hello,
i ve got a problem with my foobar script 
when i write it there is no problem but when i want to add colors the tracknumbers arent aligned ! i dont understand why... please help me 
Screenshot (http://membres.lycos.fr/stefoufou/foobar.png)
Script (http://membres.lycos.fr/stefoufou/foobar.txt)

i hope you can tip me

edit : i ve updated screen and script but i ve got some pb again :/

The easiest thing to do would be to pad/truncate inside the select statement, like this:

Old:
Code: [Select]
//infos artiste et album
//
$puts(infos,
$padcut(
$select($min(%tracknumber%,6),
+$repeat($get(trait),35),
|$get(artiste),
|$get(album),
|$get(bitrate),
|$get(annee),
|$repeat( ,35)
)
,35)
)

Change to:
Code: [Select]
//infos artiste et album
//
$puts(column,35)
$puts(infos,
$select($min(%tracknumber%,6),
+$repeat($get(trait),$get(column)),
|$get(bleu1)$padcut( $get(artiste),$get(column)),
|$get(bleu2)$padcut( $get(album),$get(column)),
|$get(bleu3)$padcut( $get(bitrate),$get(column)),
|$get(bleu4)$padcut( $get(annee),$get(column)),
|$repeat( ,$get(column))
)
)
Title: Foobar2000 format strings
Post by: Stefoufou on 2003-06-16 18:18:42
@ yaman666 : thanks you very much your solution is very well  now i can continue my work whithout any problems
forgive me if i dont speak more but my english isnt very good !

@ musicmusic : i hadnt seen that there was a help !  i  always look at it  now
Title: Foobar2000 format strings
Post by: Supachikn on 2003-06-17 11:07:47
Code: [Select]
$puts(artistcolor,0600F2)$puts(genrecolor,F20018)$puts(tracknumbercolor,00F21F)$puts(yearcolor,0E7EE4)$puts(albumcolor,4AE1DA)$puts(codeccolor,E37748)$puts(tagscolor,E9D843)$puts(titlecolor,DA529C)$puts(separatorcolor,797979)$puts(artist,$char(3)$get(artistcolor)$char(3)$padcut([%artist%],45)$char(3)$char(3))$puts(year,$char(3)$get(yearcolor)$char(3)$padcut([%year%][%date%],45)$char(3)$char(3))$puts(album,$char(3)$get(albumcolor)$char(3)$padcut([%album%],45)$char(3)$char(3))$puts(genre,$char(3)$get(genrecolor)$char(3)$padcut($caps([%genre%]),25)$char(3)$char(3))$puts(codec,$char(3)$get(codeccolor)$char(3)$padcut([$caps(%__codec%)],25)$char(3)$char(3))$puts(tags,$char(3)$get(tagscolor)$char(3)$padcut($caps([%__tagtype%]),25)$char(3)$char(3))$puts(tracknumber,$char(3)$get(tracknumbercolor)$char(3)$num(%tracknumber%,2)$char(3)$char(3))$puts(title,$char(3)$get(titlecolor)$char(3)%title%$char(3)$char(3))$puts(backslash,$char(3)$get(separatorcolor)$char(3)\$char(3)$char(3))$puts(pipe,$char(3)$get(separatorcolor)$char(3)$char(9474)$char(3)$char(3))$puts(space,$char(160))$if($stricmp($num(%tracknumber%,1),1),$get(artist)$get(space)$get(backslash)$get(space)$get(genre)$get(space)$get(backslash)$get(space)$get(tracknumber)$get(space)$get(backslash)$get(space)$get(title),)$if($stricmp($num(%tracknumber%,1),2),$get(space)$get(year)$get(space)$get(backslash)$get(space)$get(codec)$get(space)$get(backslash)$get(space)$get(tracknumber)$get(space)$get(backslash)$get(space)$get(title),)$if($stricmp($num(%tracknumber%,1),3),$get(space)$get(space)$get(album)$get(space)$get(backslash)$get(space)$get(tags)$get(space)$get(backslash)$get(space)$get(tracknumber)$get(space)$get(backslash)$get(space)$get(title),)$ifgreater($num(%tracknumber%,1),3,$get(space)$get(space)$pad(,45)$get(space)$get(pipe)$get(space)$pad(,25)$get(space)$get(pipe)$get(space)$get(tracknumber)$get(space)$get(pipe)$get(space)$get(title),)


For this to work, you're going to need a fixed width font. Personally, I use lucida console.
Title: Foobar2000 format strings
Post by: verloren on 2003-06-17 15:28:18
Quote
So it looks like I've gotten myself into a project which is a bit too time consuming for me, especially considering I'm soon leaving the country for a month and a half.  I put together a basic web page which can be used share playlist, statusbar, etc formatting scripts.  You can view the functional, but without content version of it here (http://www.ac.wwu.edu/~mowerm/). 

I'm basically willing to give it away in hopes that someone would be willing to put time into collecting and posting the scripts in a much easier to navigate system than this thread is turning into.  I've even included some short instructions on how to maintain the site (not to mention you can PM me to ask anything).  The whole page is included in the following file: Ff2kWeb10.zip (http://www.ac.wwu.edu/~mowerm/Ff2kWeb10.zip).  It has been written in simple HTML, without the use of frontpage or dreamweaver.

Anyways, even if my specific page outline doesn't get utilized, I think it would be very worthwile to have a separate page dedicated to formatting strings (much like the GUI thread did with "foobar Looks").  As it is now 4:17am, I'm going to bed, good day all.

~Alfred Ska

Alfred,

I'll take it on, so long as nobody else has grabbed it.

I like your layout, so would be happy to use that.

Let me know if this is agreeable for you, and I'll start to set it up.  It can use either http://audio.ciara.us/foobar2000/ (http://audio.ciara.us/foobar2000/) or http://foobar2000.samharris.us (http://foobar2000.samharris.us) - anyone have a preference?

Cheers, Paul
Title: Foobar2000 format strings
Post by: Nivo on 2003-06-17 19:28:30
Quote
oh yeah, for those of you who wanted the code for this layout (http://charlie.mg2.org/woobar.png):

click here for the code (http://charlie.mg2.org/foobar.txt)

i like this one a lot... but what status bar code are youre using? Mind posting it here too?
Thanks
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-17 19:41:49
The status bar looks pretty much like one I posted some pages back.
Status Bar Code (http://www.stud.ntnu.no/~mortek/foobar2000/StatusBarCode.txt)
Not sure if it is exactly the same, but you could try it.
Title: Foobar2000 format strings
Post by: sthayashi on 2003-06-17 23:00:07
I have a slight problem with the code I adapted from upNorth

What it Looks like (http://twolf1300.net/foobar.png)

The Code (http://twolf1300.net/foobarscheme.txt)

The only changes I made were:
a ) changing the characters so that I can use Lucida Console
b ) Added an extra space so that singles are aligned properly.

The problem is that for that first Soundtrack, all of its songs shifted over further than every with every other song.

The Incredible Machine Soundtrack as well as the rusted root song is where it typically is.

How can I solve this?  Thanks.
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-17 23:51:55
Quote
I have a slight problem with the code I adapted from upNorth

What it Looks like (http://twolf1300.net/foobar.png)

The Code (http://twolf1300.net/foobarscheme.txt)

The only changes I made were:
a ) changing the characters so that I can use Lucida Console

Don't know what you needed to do, but that's the same font as I use...
If you mean changing to $char(XXXX) I would like to know where I can find those codes
Quote
b ) Added an extra space so that singles are aligned properly.

Guess you pushed the artist more to the right, I reckoned someone would want it like that.
Quote
The problem is that for that first Soundtrack, all of its songs shifted over further than every with every other song.

The Incredible Machine Soundtrack as well as the rusted root song is where it typically is.

How can I solve this?  Thanks.

If I understand you correctly you want the tracknumbers on a straight line.
Rewrite this:
Code: [Select]
$if(%singletrack%,  $puts(space,$get(len_min))  ,  $puts(space,$ifgreater($get(len_tag),$get(len_min),$get(len_tag),$get(len_min)))  
)

into this:
Code: [Select]
$puts(space,$get(len_min))

Then use the variable "space" to cut the info in the album column.
I have it the way it is because I don't want to cut info, just to make it look better.

Did this answer anything? 

Btw:I use a slightly updated version of that code myself, but I used yours when I wrote this. 
If you don't use the %singletrack% everything is fine, but files with that tag shows up like (...) now.
Another thing you could do if you don't use Replaygain, is removing the $get(rpg) at the bottom.
Title: Foobar2000 format strings
Post by: sthayashi on 2003-06-18 04:19:47
Quote
Don't know what you needed to do, but that's the same font as I use...
If you mean changing to $char(XXXX) I would like to know where I can find those codes


If I understand you correctly you want the tracknumbers on a straight line.
Rewrite this:
Code: [Select]
$if(%singletrack%,  $puts(space,$get(len_min))  ,  $puts(space,$ifgreater($get(len_tag),$get(len_min),$get(len_tag),$get(len_min)))  
)

into this:
Code: [Select]
$puts(space,$get(len_min))

Then use the variable "space" to cut the info in the album column.
I have it the way it is because I don't want to cut info, just to make it look better.

Did this answer anything? 

Btw:I use a slightly updated version of that code myself, but I used yours when I wrote this. 
If you don't use the %singletrack% everything is fine, but files with that tag shows up like (...) now.
Another thing you could do if you don't use Replaygain, is removing the $get(rpg) at the bottom.

Excellent, It looks a lot better to me, at least on my main computer.

As for finding the char codes, what I did was the following.

1. Opened up the Character map via:
Start Menu -> Accessories -> System Tools -> Character Map

2. Selected the character I wanted:
Character map (http://twolf1300.net/charmap.png)

3. Wrote down the unicode for that character (U-251C in that picture)

4. Went to calculator and found the decimal equivalent for that, which is 9500 for 251C.

5. $char(9500) corresponds to that character.


For some reason, your code didn't work for me in Lucida Console, only Terminal.  Since I prefer Lucida Console over terminal, I switch out all the code until it looked right.

Thanks for contributing it.  I do appreciate it.

And thanks for cleaning that little mess up for me.
Title: Foobar2000 format strings
Post by: AlfredSka on 2003-06-18 07:57:43
Quote
Quote
So it looks like I've gotten myself into a project which is a bit too time consuming for me, especially considering I'm soon leaving the country for a month and a half.  I put together a basic web page which can be used share playlist, statusbar, etc formatting scripts.  You can view the functional, but without content version of it here (http://www.ac.wwu.edu/~mowerm/). 

I'm basically willing to give it away in hopes that someone would be willing to put time into collecting and posting the scripts in a much easier to navigate system than this thread is turning into.  I've even included some short instructions on how to maintain the site (not to mention you can PM me to ask anything).  The whole page is included in the following file: Ff2kWeb10.zip (http://www.ac.wwu.edu/~mowerm/Ff2kWeb10.zip).  It has been written in simple HTML, without the use of frontpage or dreamweaver.

Anyways, even if my specific page outline doesn't get utilized, I think it would be very worthwile to have a separate page dedicated to formatting strings (much like the GUI thread did with "foobar Looks").  As it is now 4:17am, I'm going to bed, good day all.

~Alfred Ska

Alfred,

I'll take it on, so long as nobody else has grabbed it.

I like your layout, so would be happy to use that.

Let me know if this is agreeable for you, and I'll start to set it up.  It can use either http://audio.ciara.us/foobar2000/ (http://audio.ciara.us/foobar2000/) or http://foobar2000.samharris.us (http://foobar2000.samharris.us) - anyone have a preference?

Cheers, Paul

Hey Paul, glad to hear someone's willing to pick up where I left off.  There is another thread on the subject here (http://www.hydrogenaudio.org/forums/index.php?act=ST&f=27&t=10395&), and I think you may be able to receive help from other sources.  If you need any initial help in understanding the page beyond what the short instructions supply, feel free to email me (I'll PM you my email address).  Best of luck.

~Alfred Ska
Title: Foobar2000 format strings
Post by: vatten on 2003-06-18 11:33:35
Quote
Quote
Quote
So it looks like I've gotten myself into a project which is a bit too time consuming for me, especially considering I'm soon leaving the country for a month and a half.  I put together a basic web page which can be used share playlist, statusbar, etc formatting scripts.  You can view the functional, but without content version of it here (http://www.ac.wwu.edu/~mowerm/). 

I'm basically willing to give it away in hopes that someone would be willing to put time into collecting and posting the scripts in a much easier to navigate system than this thread is turning into.  I've even included some short instructions on how to maintain the site (not to mention you can PM me to ask anything).  The whole page is included in the following file: Ff2kWeb10.zip (http://www.ac.wwu.edu/~mowerm/Ff2kWeb10.zip).  It has been written in simple HTML, without the use of frontpage or dreamweaver.

Anyways, even if my specific page outline doesn't get utilized, I think it would be very worthwile to have a separate page dedicated to formatting strings (much like the GUI thread did with "foobar Looks").  As it is now 4:17am, I'm going to bed, good day all.

~Alfred Ska

Alfred,

I'll take it on, so long as nobody else has grabbed it.

I like your layout, so would be happy to use that.

Let me know if this is agreeable for you, and I'll start to set it up.  It can use either http://audio.ciara.us/foobar2000/ (http://audio.ciara.us/foobar2000/) or http://foobar2000.samharris.us (http://foobar2000.samharris.us) - anyone have a preference?

Cheers, Paul

Hey Paul, glad to hear someone's willing to pick up where I left off.  There is another thread on the subject here (http://www.hydrogenaudio.org/forums/index.php?act=ST&f=27&t=10395&), and I think you may be able to receive help from other sources.  If you need any initial help in understanding the page beyond what the short instructions supply, feel free to email me (I'll PM you my email address).  Best of luck.

~Alfred Ska

No offence but wouldn't it be better if the page was dynamic? That way the owners of the skins can easily update and edit their skins/layouts which means a faster page and also less work for you  Just an idea, problem is, its a lot harder to find a good host then. Well oh well.. Plone would work I guess.


http://foobar2000.samharris.us (http://foobar2000.samharris.us) would be my preference 
Title: Foobar2000 format strings
Post by: verloren on 2003-06-18 14:44:22
I have a pretty reasonable hosting service, but pretty negligible coding skills beyond simple HTML.  So making stuff dynamic is great, if somebody can do it for me

Cheers, Paul
Title: Foobar2000 format strings
Post by: smok3 on 2003-06-19 21:12:57
just uploaded the latest-greatest config, (check my page, scroll to bottom), looks very similar to older ones, but with some semi-intelligent behaviour when 'song' is detected to be a stream.

textwriter plugin uses something like (for 'play string'):
Code: [Select]
foobar playing: $if(%title%,%title%,%_filename_ext%)
$if(%artist%, :: %artist%,)
$if(%album%, :: /%album%/,)

$if(%_time_total%,
.$lower(
$ext(%_path%)
)
,
)
Title: Foobar2000 format strings
Post by: Geezer on 2003-06-22 13:23:52
Here is an image of my config. I give my thanks to upNorth, as I borrowed his config and made some changes to suit my taste.

foobar2000 (http://www.pantang.com/images/foobar2000.png)

I did as sthayashi, changed the graphics to Unicode characters, as the fonts Terminal and Lime didn't suit me. I run with Lucidia Console 9p Bold.

I was trying to set a locked colum for the song titles like discussed earlier, but didn't manage to do get it to work. I would like to limit the left side with album info, and cut of long album names and set the start of the right side at a locked value.
Title: Foobar2000 format strings
Post by: cRoMo on 2003-06-23 12:56:13
Hello guys
I made my own formatting, based on UpNorth's styling with colors borrowed from anza's and pootify's formatting. I wanted to have advanced %performer% and %album artist% stuff (BTW: changed it a little), so that's why I have based my work on UpNorth's styling. Almost everything works OK for me now, but there's one problem that I'd like to solve and actually don't know how to. It's about adding a space beetween white dividing lines and artist, genre, album and year fields. For now they keep flowing together and don't look as clear as I'd like to.
Here's (http://klej.net/~cromo/cRoMo_formatting.zip) the code, and here's (http://klej.net/~cromo/Schowek.png) the screenshot with visual explanation of my problem.

Could you please help me and show how to add that space, so I could be the most happy man in the world

BTW: Is there any reference document (RFC) which regulates the name of %album artist% tag? I ask because I can see %album artist% tag in UpNorth's formatting as good as %albumartist% in tama's formatting. Which is correct, or maybe both if it's not regulated by any RFC?
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-23 14:09:45
My latest config (still a work in progress though):
screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/screenshot.gif)
code (playlist, status bar, window title) (http://www.stud.ntnu.no/~mortek/foobar2000/Code.rar)
*Added some codec and bitrate info to albums (none for single files).
*Visual changes.
*First attempt to add some kind of trackrating, visible in the rightmost column (green dots beside the Replaygain info).
I like the idea of easily seeing the songs I really like in an album. I use a custom %trackrating% tag asigned the value 0, 1 or 2.
The meaning is intended to be 0=bad, 1=ok(/I like this one) and 2=good(/gives me goosebumps  ).
Not sure if i really need the 0, as I've never used it.
Can easily be expanded to take more values, but I don't want too many because it complicates the decision and makes it more arbitrary.

@cRoMo: You visual problem is one thing I've fixed. As for the %album artist% tag, I think that is a custom tag someone came up with along the way.
I have problems with the split %album artist% for syntax highlighting, so %albumartist% might be a better choice.
I use %various% most of the time and %album artist% only for DJ compilations

Btw: There might sometimes be some minor visual problems for files with only a few tags, but this is no problem if you have at least %artist% and %title%, or none at all.
Not really a problem I encounter too often, but I will fix it later.
Title: Foobar2000 format strings
Post by: gimle on 2003-06-23 21:29:54
Quote
My latest config (still a work in progress though):
screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/screenshot.gif)
code (playlist, status bar, window title) (http://www.stud.ntnu.no/~mortek/foobar2000/Code.rar)
*Added some codec and bitrate info to albums (none for single files).
*Visual changes.
*First attempt to add some kind of trackrating, visible in the rightmost column (green dots beside the Replaygain info).
I like the idea of easily seeing the songs I really like in an album. I use a custom %trackrating% tag asigned the value 0, 1 or 2.
The meaning is intended to be 0=bad, 1=ok(/I like this one) and 2=good(/gives me goosebumps  ).
Not sure if i really need the 0, as I've never used it.
Can easily be expanded to take more values, but I don't want too many because it complicates the decision and makes it more arbitrary.

@cRoMo: You visual problem is one thing I've fixed. As for the %album artist% tag, I think that is a custom tag someone came up with along the way.
I have problems with the split %album artist% for syntax highlighting, so %albumartist% might be a better choice.
I use %various% most of the time and %album artist% only for DJ compilations

Btw: There might sometimes be some minor visual problems for files with only a few tags, but this is no problem if you have at least %artist% and %title%, or none at all.
Not really a problem I encounter too often, but I will fix it later.

hi your script its great , but something its wrong in my foobar ;\ i have mp3 and m3u fine 
Screenshot (http://gimle.no-ip.org/foobarz.gif)

what can be?
Title: Foobar2000 format strings
Post by: gimle on 2003-06-23 21:47:24
Quote
Quote
My latest config (still a work in progress though):
screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/screenshot.gif)
code (playlist, status bar, window title) (http://www.stud.ntnu.no/~mortek/foobar2000/Code.rar)
*Added some codec and bitrate info to albums (none for single files).
*Visual changes.
*First attempt to add some kind of trackrating, visible in the rightmost column (green dots beside the Replaygain info).
I like the idea of easily seeing the songs I really like in an album. I use a custom %trackrating% tag asigned the value 0, 1 or 2.
The meaning is intended to be 0=bad, 1=ok(/I like this one) and 2=good(/gives me goosebumps  ).
Not sure if i really need the 0, as I've never used it.
Can easily be expanded to take more values, but I don't want too many because it complicates the decision and makes it more arbitrary.

@cRoMo: You visual problem is one thing I've fixed. As for the %album artist% tag, I think that is a custom tag someone came up with along the way.
I have problems with the split %album artist% for syntax highlighting, so %albumartist% might be a better choice.
I use %various% most of the time and %album artist% only for DJ compilations

Btw: There might sometimes be some minor visual problems for files with only a few tags, but this is no problem if you have at least %artist% and %title%, or none at all.
Not really a problem I encounter too often, but I will fix it later.

hi your script its great , but something its wrong in my foobar ;\ i have mp3 and m3u fine 
Screenshot (http://gimle.no-ip.org/foobarz.gif)

what can be?

that songs dont have track number, this is the error, sorry 
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-23 22:13:01
Hope this helps 
The last track in every album will need a %lasttrack% tag with some value asigned to it (I use %lasttrack% = yes), but this is only for the visual appearance.
An album will also need at least 5 tracks (6 if %disc% tag is used), to display all info and visuals.
Your Jennifer Lopez album looks like a single with too few tracks for this.
Concerning your Jewel album you need to set tracknumbers. You can use the "auto track number" in masstagger to do this.
For single tracks that does not belong to an album, you can use the %singleartist% to override the formatting done to tracks that belongs to an album. That way you don't need to remove the tracknumber and such.
Albums with various artist is displayed correctly if the %various% tag is present.
If you use Replaygain, that info will show up to the right of the length of each track, as a dark gray |A| for album gain and a light gray |T| for tracks with track gain only (the value is in the statusbar...).

If this didn't help please elaborate your description of the problem.

edit: Nice to see you solved it 
Title: Foobar2000 format strings
Post by: Jaro on 2003-06-23 22:54:21
upNorth can You upload font from playlist?
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-23 23:09:30
U can use this posted by musicmusic a few pages back.
Quote
If you want Lucida Console ANSI I can upload it.. (edit: http://members.lycos.co.uk/musicf/test/Lucon1.ttf (http://members.lycos.co.uk/musicf/test/Lucon1.ttf) )
(I assume you know how to install fonts..)
Title: Foobar2000 format strings
Post by: Geezer on 2003-06-24 16:10:19
Oh, I had missed that font in this topic! So my work replacing graphic characters with Unicode was unnecessary. Well, Better late than never.



upNorth, I didn't fully understand the post you did earlier telling how to put the tracknumbers in a straight row (cutting long info on the left column with albuminfo).

Quote
If I understand you correctly you want the tracknumbers on a straight line.
Rewrite this:
Code: [Select]
$if(%singletrack%,  $puts(space,$get(len_min))  ,  $puts(space,$ifgreater($get(len_tag),$get(len_min),$get(len_tag),$get(len_min)))  
)

into this:
Code: [Select]
$puts(space,$get(len_min))

Then use the variable "space" to cut the info in the album column.
I have it the way it is because I don't want to cut info, just to make it look better.

Did this answer anything?


I found the string and can replace it. But should I then enter a string in the beginning setting the variable space to a number which is the column that I want the right part to begin?

Like this: $puts(space,40) ?
Title: Foobar2000 format strings
Post by: musicmusic on 2003-06-24 17:05:38
Quote
Oh, I had missed that font in this topic! So my work replacing graphic characters with Unicode was unnecessary. Well, Better late than never.

Its still better to use the unicode font rather than Lucida Console ANSI (I only posted the font incase he didnt know how to change the chars from character map). (Does "Lucida Console ANSI" not come with Win 2k or Win XP ? Im not sure where I got it from then.. )

I posted the $char() codes I thought were the Lucida Console (Unicode) equivilent ones in that post too, but Im not sure if they were correct, but I think you got them...
Title: Foobar2000 format strings
Post by: sthayashi on 2003-06-24 20:07:33
Quote
Oh, I had missed that font in this topic! So my work replacing graphic characters with Unicode was unnecessary. Well, Better late than never.

I picked it up, but going through this topic is getting to be cumbersome.  I had a rough time finding UpNorth's original code (and even further, since his code was derived from others, but I like his interpretation on it the best).

There was rumor that we would get a page for Format strings.  Does anyone know where the status is on that? I know that I'd be happy to contribute some time and effort to see that it gets done.?
Title: Foobar2000 format strings
Post by: Geezer on 2003-06-24 23:06:07
Quote
Like this: $puts(space,40) ?

Well, I should have tried before I asked, as it did work... almost completely.

It does put the tracknumbers in a straight row, but when the album title or artist is very long, it pushed just that rows track to the right. I would have prefered it to cut it off and have all tracknumbers in a row. Sorry to bug about this, but maybe there is an easy solution? (I'm really bad at coding)
Title: Foobar2000 format strings
Post by: cRoMo on 2003-06-25 00:54:14
I wonder if it is possible to add "Total album time" field in the playlist? I suppose, that it wouldn't be difficult to manage for cue sheet based on the one audio file, since we can take that file's play time lenght and put it there. The problem is to get the total time of album which consists of separate audio files. Is it possible to sum the time of all the files which form the album?
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-25 13:30:51
Quote
Quote
Like this: $puts(space,40) ?

Well, I should have tried before I asked, as it did work... almost completely.

It does put the tracknumbers in a straight row, but when the album title or artist is very long, it pushed just that rows track to the right. I would have prefered it to cut it off and have all tracknumbers in a row. Sorry to bug about this, but maybe there is an easy solution? (I'm really bad at coding)

What you need to do, is to cut the info that is used in the first column. Artist, album, genre, disc, discname and so on.
IIRC this has to be done before you add colors, because the color codes is counted or something, but I'm not sure as I don't use it.
Title: Foobar2000 format strings
Post by: kljs on 2003-06-26 05:19:25
My fb2k (http://www.geocities.com/kennyljs/upnorth.png)

I am using upnorth's format strings for playlist, and I get the  weird looking A........

am I missing some fonts or Unicode?

Using WinXP SP1........
Title: Foobar2000 format strings
Post by: damjanek on 2003-06-26 09:02:46
@kljs
just use this font.....
http://members.lycos.co.uk/musicf/test/Lucon1.ttf (http://members.lycos.co.uk/musicf/test/Lucon1.ttf)
Title: Foobar2000 format strings
Post by: kljs on 2003-06-26 10:22:20
already install, same thing.....weird looking A's.....
Title: Foobar2000 format strings
Post by: SafirXP on 2003-06-26 16:29:10
http://www32.brinkster.com/safirjamil/foobar2.htm (http://www32.brinkster.com/safirjamil/foobar2.htm) just made this one... hope u guys like it! B)
Title: Foobar2000 format strings
Post by: CJC on 2003-06-26 17:16:42
gimle, what visual style or theme are u using for windows?
Title: Foobar2000 format strings
Post by: SafirXP on 2003-06-26 17:32:46
StyleXP & the style is WindowsMAX Thin! btw what does "gimle" mean?
Title: Foobar2000 format strings
Post by: gimle on 2003-06-26 18:59:38
Quote
gimle, what visual style or theme are u using for windows?

i use Classix 10k 2.0 (http://cc.xnyhilo.net/downloads/Classix10k_2.0.rar), you can find more Classix's themes her (http://cc.xnyhilo.net/)  , oh and wallpaper for that theme you can find in Florian Freundt (http://www.freundt.org/florian/index.htm)

this is a screenshot (http://gimle.no-ip.org/wall.jpg) of the full theme, and mi mod of Florian Freundt's wallpaper (http://gimle.no-ip.org/wall_v2.jpg) 
Title: Foobar2000 format strings
Post by: SafirXP on 2003-06-26 19:26:36
i had wondered.. what gimle was...

anyways, awesome visual style. already d0wnloaded & applied!
Title: Foobar2000 format strings
Post by: Geezer on 2003-06-28 12:16:16
Quote
already install, same thing.....weird looking A's.....

Have you changed to the Lucidia Console ANSI font in Preferences - Display - Playlist Font?
Title: Foobar2000 format strings
Post by: GoWaN on 2003-06-28 13:27:01
I have made a little modification of upnorth code to be used with andale mono, in case anyone is interesed here it is:
Format string (http://ciberia.ya.com/gowan/foobar2000/foobar2000.html)
Edit: my web server doesn't like direct links to txt files so look for nuevo format string
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-28 15:45:02
MY latest playlist formatting.
Changes:
(1) Added optional cutting of the first column.
(2) Added mode select. (Album/Single).
(3) Bug fixes.

screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/mode.gif) (top:Album mode, bottom:Single mode)
Playlist code (http://www.stud.ntnu.no/~mortek/foobar2000/Playlist.rar)

(1), (2) and the width of the first column is set at the top of the code.
Looks like this:
Code: [Select]
//**************************************
// Config
//**************************************

//Mode select: 1=album, 0=single
$puts(mode,1)

//width of column1
$puts(l_min,32)

//Cut column1 if content is longer than l_min?
//1=cut, 0=don't cut
$puts(cut_column1,0)


Default is as you can see: width 32, album mode and no cutting. This makes it look like before.

Edit: Updated playlist code because of a small fix.
Title: Foobar2000 format strings
Post by: tengcm on 2003-06-28 16:11:11
Quote
MY latest playlist formatting.
Changes:
(1) Added optional cutting of the first column.
(2) Added mode select. (Album/Single).
(3) Bug fixes.

screenshot (http://www.stud.ntnu.no/~mortek/foobar2000/mode.gif) (top:Album mode, bottom:Single mode)
Playlist code (http://www.stud.ntnu.no/~mortek/foobar2000/Playlist.rar)

(1), (2) and the width of the first column is set at the top of the code.
Looks like this:
Code: [Select]
//**************************************
// Config
//**************************************

//Mode select: 1=album, 0=single
$puts(mode,1)

//width of column1
$puts(l_min,32)

//Cut column1 if content is longer than l_min?
//1=cut, 0=don't cut
$puts(cut_column1,0)


Default is as you can see: width 32, album mode and no cutting. This makes it look like before.

Hi, nice playlist formatting but can anybody let me know how to apply the format stings ?
I'm a newbies

thanks for the help
Title: Foobar2000 format strings
Post by: kljs on 2003-06-28 17:40:45
I am still getting those weird A's....using WinXP SP1 and upnorth's playlist format string.........the font has been installed...

Fb2k formatting weirdness (http://www.geocities.com/kennyljs/upnorth.png)

help!!!

[edit] nevermind....I was using the wrong font...didn't realize it...sorry...
Title: Foobar2000 format strings
Post by: Max on 2003-06-28 19:20:06
I have a question. Is there a command for Total Time Played???

And another one: How i can make that if the quality of an MPC file over q7 that he writes: HQ into the Copy Command or the Playlist?
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-28 19:31:16
This works for both playlist and copy command.
Code: [Select]
$if($strcmp(%__mpc_profile%,''BrainDead''),'HQ')

Expand it to suit your needs for the rest of the profiles.
Title: Foobar2000 format strings
Post by: Max on 2003-06-28 19:38:33
Quote
This works for both playlist and copy command.
Code: [Select]
$if($strcmp(%__mpc_profile%,''BrainDead''),'HQ')

Expand it to suit your needs for the rest of the profiles.

Great, THX!!!
Title: Foobar2000 format strings
Post by: Max on 2003-06-29 01:26:09
A new Question

Is it possible: If Artist = Album then write album: Selftitled???
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-29 01:55:31
Quote
A new Question

Is it possible: If Artist = Album then write album: Selftitled???

If you put this where you want the album info, it should do the job.
Code: [Select]
$if($strcmp($lower(%album%),$lower(%artist%)),Selftitled,%album%)

This will put 'Selftitled' if they are the same and the name of the album if they are not.

I included the lower() in case the case is not the same for album and artist.
If it is you could get away with
Code: [Select]
$if($strcmp(%album%,%artist%),Selftitled,%album%)
Title: Foobar2000 format strings
Post by: Max on 2003-06-29 09:50:11
Quote
Quote
A new Question

Is it possible: If Artist = Album then write album: Selftitled???

If you put this where you want the album info, it should do the job.
Code: [Select]
$if($strcmp($lower(%album%),$lower(%artist%)),Selftitled,%album%)

This will put 'Selftitled' if they are the same and the name of the album if they are not.

I included the lower() in case the case is not the same for album and artist.
If it is you could get away with
Code: [Select]
$if($strcmp(%album%,%artist%),Selftitled,%album%)

Thx again
Title: Foobar2000 format strings
Post by: addicted on 2003-06-30 15:19:52
@upNorth:

Was there a way to break the album name into two or threee lines as necessary to keep the playlist all nicely lined up? (and did I miss the posting of a font that worked with special characters like the ones I'm not getting in this screenshot?)

Screenie (http://members.rogers.com/fearthejimmer/screenshot--001.jpg)

TIA
Title: Foobar2000 format strings
Post by: upNorth on 2003-06-30 22:37:22
Quote
@upNorth:

Was there a way to break the album name into two or threee lines as necessary to keep the playlist all nicely lined up? (and did I miss the posting of a font that worked with special characters like the ones I'm not getting in this screenshot?)

Screenie (http://members.rogers.com/fearthejimmer/screenshot--001.jpg)

TIA

Sorry, no 'word wrap' feature, but the ability to do a simple cut. Someone (sthayashi?) asked about this some time ago, to get all the tracknumbers in a straight line.
My playlist font is 'Lucida Console'. There has been posted a link to 'Lucida Console ANSI' a few page back, but I don't use it as it doesn't support norwegian characters.

Btw: Isn't 'Lucida Console' a standard windows font?
Title: Foobar2000 format strings
Post by: Bushwack on 2003-07-01 00:54:41
Quote
Was there a way to break the album name into two or threee lines as necessary to keep the playlist all nicely lined up?

I haven't played with string formatting for sometime now, nor have a looked at upNorth's code, but this is possible.

It's just a matter of cutting off the albums name on the first line, and adding a second conditional to the second line code to check if the album name overflowed then display the rest of the album name or whatever goes on the second line accordingly.  Of course you now have to continue this process of looking back at the album name trough all the lines and add some more track number checks, messey but straight forward.
Title: Foobar2000 format strings
Post by: addicted on 2003-07-01 01:13:57
Yeah, I'm using Lucinda Console ANSI, if I use the non-ANSI Lucinda Console, I get the weird As. I thought I remembered seeing someone post a font (Lime?) that adressed all the issues of special characters.

As far as editing the format string myself, I have to admit that I am just riding on the coattails of you format-string-editing-type-guys here as I don't have the foggiest idea where to start with them. I quit "programming" when I got rid of my Commodore64. Basic for life! Sweet sweet sprites and endless lines of "DATA 10,256,256,10......." 

But if anyone feels they'd like to play around with the format string, I'm sure I wouldn't be the only thankful one.


Thanks for the replies.
-addicted
Title: Foobar2000 format strings
Post by: anza on 2003-07-01 08:31:17
JanS's formatting has this "word wrap" feature, and IIRC it was based on upNorth's original code. You can find it a few pages back (or you _should_ find it. Searching this thread ist DEATH).
Title: Foobar2000 format strings
Post by: Luxus on 2003-07-03 10:17:35
i think i will setup a wiki so everyone can post his code

anyone like the idea?
Title: Foobar2000 format strings
Post by: AndrewCottrell on 2003-07-04 22:08:14
Here's my playlist code. I have more albums than singles, so this is optimised for albums--but it works ok with singles.

It uses default colors and whatever font you like. Many colors are used to help me 'scan' the playlist. The colors look ok when a track is selected.

I normally keep foorbar minimised, but when open I like to see tons of details. I've used the VARIOUS tag to determine albums by various artists; and a WEBSITE tag which is self explainatory.

Code: [Select]
// initialize global variables
$puts(artist,800000$if2(%artist%,'['Unknown Artist']') - )

$puts(album,[000080$if2($abbr(%album%,100),'['%_directoryname%']')
[808080 '('$left(%__replaygain_album_gain%,$sub($strchr(%__replaygain_album_gain%,.),1)) dB')'] - ])

$puts(tracknumber,[404000$num(%tracknumber%,2) - ])

$puts(ext,$caps($ext(%_filename_ext%)))

// playlist number
808080$num(%_playlist_number%,4) 

// display artist, album and tracknumber (rearranged for various)
$if(%various%,$get(album)$get(tracknumber)$get(artist),$get(artist)$get(album)$get(tracknumber))

// now take care of the track title
008000$if2(%title%,%_filename%)

// now some meta-data: bitrate, codec, Replaygain and length
808080 '('%__bitrate%Kbps $get(ext) $if($stricmp($get(ext),%__codec%),,%__codec%)
[, $left(%__replaygain_track_gain%,$sub($strchr(%__replaygain_track_gain%,.),1)) dB]
, %_length%')'

// does this track have a website?
[ - FF6666%website%]

// any comments?
[$if($strcmp(%comment%,%website%),, - 404040%comment%)]


@upNorth

You could use the non-case-sensitive version of $strcmp(x,y)
Code: [Select]
$if($stricmp(%album%,%artist%),Selftitled,%album%)
Title: Foobar2000 format strings
Post by: Bizzy D. on 2003-07-04 23:42:13
http://www.skin-zone.net/fb2k.png (http://www.skin-zone.net/fb2k.png) <<<its upNorth's code... i was just wondering what those numbers under the OGG mean ???
Title: Foobar2000 format strings
Post by: nuhi on 2003-07-05 00:18:06
Well, probably quality.....bitrate
I'm sleepy to verify this from the code, don't have it by me.
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-05 14:27:05
Quote
@upNorth

You could use the non-case-sensitive version of $strcmp(x,y)
Code: [Select]
$if($stricmp(%album%,%artist%),Selftitled,%album%)

Thanks, I did not see that one 


@Bizzy D.: nuhi is right, it's the bitrate (but only for track 3). The technical info had no other usable info for ogg...
Title: Foobar2000 format strings
Post by: amppa on 2003-07-05 17:54:36
Ok, didn't see anyone creating a formatting strings site so I am making one. PHP+mysql, user accounts so codes can be added and edited easily and so on.

I'll post a link when the basic features are done.

--

Ok, I think the basics are done and working well. I used the style AlfredSka created, thank you Ska. All you are welcome to try the site, create accounts and add your formatting strings. Started the project today so I would not be surprised if bugs are found  Just report them all (the feedback form might be the best way to reach me). And if some useful features are missing, report them, too. Furthermore, suggestions to page appearance improvement are also welcome.

All styles will now be shown in one list, I'll add a next/prev -functionality soon.

The current server is located in Finland, please tell if the connection is too slow. Site address isn't yet optimal, either  But, well, I guess this is much better than nothing.

--

Managed to get a bit shorter address. Now it's

http://pelit.koillismaa.fi/fb2k/ (http://pelit.koillismaa.fi/fb2k/)
Title: Foobar2000 format strings
Post by: Luxus on 2003-07-06 01:49:53
wow great site ...
i like it a lot
i set up a perm redict
http://fb.blogout.de (http://fb.blogout.de)
its a lot shorter and i hope better to remember
Title: Foobar2000 format strings
Post by: Zastai on 2003-07-06 11:05:38
Well, I'll just add mine - very straightforward and spartan:

Code: [Select]
808080$num(%_playlist_number%,5).  $if(%title%,%title%,%_filename_ext%)[ 606060'('%date%')']    *TAB**TAB*%artist%*TAB**TAB**TAB*606060%genre%*TAB*%_length%


(*TAB* = a TAB character)

The tab characters provide me with pretty decent columns even though I use a proportional font (Lucida Sans Unicode, which seems to display everything just fine and dandy).
Colors are very basic atm, just black and greys, with black as the selected line background, and a very light pastel yellow as normal background.

Title bar is a simple '[' foobar version ']' Artist / Title; tooltip is simply Artist - Title.
Status bar is very simple as well:

Code: [Select]
$if(%artist%%title,%artist% - %title%,%_filename_ext%)[ '('[%album% - ]%date%')']*TAB*%_time_elapsed% / %_time_total%
Title: Foobar2000 format strings
Post by: anza on 2003-07-06 12:17:54
Quote
Well, I'll just add mine - very straightforward and spartan:

Code: [Select]
808080$num(%_playlist_number%,5).  $if(%title%,%title%,%_filename_ext%)[ 606060'('%date%')']    *TAB**TAB*%artist%*TAB**TAB**TAB*606060%genre%*TAB*%_length%


(*TAB* = a TAB character)

The tab characters provide me with pretty decent columns even though I use a proportional font (Lucida Sans Unicode, which seems to display everything just fine and dandy).
Colors are very basic atm, just black and greys, with black as the selected line background, and a very light pastel yellow as normal background.

Title bar is a simple '[' foobar version ']' Artist / Title; tooltip is simply Artist - Title.
Status bar is very simple as well:

Code: [Select]
$if(%artist%%title,%artist% - %title%,%_filename_ext%)[ '('[%album% - ]%date%')']*TAB*%_time_elapsed% / %_time_total%

You can also use $char(9) to get the tab. And so you don't have to have it typed many times, you can use $repeat($char(9),3) where number 3 is the amount how many times it's repeated. This would make your code like this:
Code: [Select]
808080$num(%_playlist_number%,5).  $if(%title%,%title%,%_filename_ext%)[ 606060'('%date%')']$repeat($char(9),2)%artist%$repeat($char(9),3)606060%genre%$char(9)%_length%


Doesn't make the code shorter, but IMHO it's nicer this way
Title: Foobar2000 format strings
Post by: anza on 2003-07-06 12:51:56
My updated formatting string:
http://koti.mbnet.fi/antsau/foobar/pic/fb2k.png (http://koti.mbnet.fi/antsau/foobar/pic/fb2k.png)

Download (includes fonts used):
http://koti.mbnet.fi/antsau/foobar/formatt...tting_green.zip (http://koti.mbnet.fi/antsau/foobar/formatting_green.zip)

Needs 0.7 beta to work, because it uses $if3. Of course you can change those $if3(x,y,z)'s to something like $if2(x,$if2(y,z)) etc.
If artist and album are the same it changes the album title to "Self-Titled" (even though I myself don't use it, I only included it in the code and in the screenshot )
Read notes_green.fb2k for all information on needed tags etc, it should be up-to-date

fb2k files are just plain text files, the extension is just for TextPad

I think that's all, enjoy it!
Title: Foobar2000 format strings
Post by: 12345 on 2003-07-06 13:24:28
Quote
http://www32.brinkster.com/safirjamil/foobar2.htm (http://www32.brinkster.com/safirjamil/foobar2.htm) just made this one... hope u guys like it! B)

Yes I like it. Can i get the code?
Title: Foobar2000 format strings
Post by: Jaro on 2003-07-06 16:16:44
@ amppa
I have question marks in foobar2000 0.7b12
here (http://v122.pnet.pl/~jarek/foo.png)
Why?
Next problem - ID3v2, does not display like MPC.
I put ID3v2 tag support 1.0 compiled for beta12.
Title: Foobar2000 format strings
Post by: amppa on 2003-07-06 16:39:53
Quote
@ amppa
I have question marks in foobar2000 0.7b12
Why?
Next problem - ID3v2, does not display like MPC.
I put ID3v2 tag support 1.0 compiled for beta12.

The first question mark is year tag (%year%), the second one is genre tag (%genre%). If tracks do not have those, they can't be shown  You are also missing bitrate info. Use $puts(brate,%__bitrate%) to add it, as I have told in playlist code (line 28). (Now edited the code to have it as default setting.)

Didn't understand your second question 
Title: Foobar2000 format strings
Post by: Jaro on 2003-07-06 17:05:20
Quote
Didn't understand your second question 

I have MP3 files only with ID3v2 tags, and they don't display like MPC or APE, FLAC with CUE files.
look (http://v122.pnet.pl/~jarek/foo2.png)
Title: Foobar2000 format strings
Post by: amppa on 2003-07-06 17:12:37
Quote
Quote
Didn't understand your second question 

I have MP3 files only with ID3v2 tags, and they don't display like MPC or APE, FLAC with CUE files.

Maybe the 0.7b12 does not contain id3v2 reader? Works fine with 0.667, no matter if id3v1 tags are present or not.
Title: Foobar2000 format strings
Post by: Binger on 2003-07-07 10:59:33
Hi!

Can someone tell me how to get to that TAGZ library? I once had a link to a .txt file but it's dead since a couple of weeks an I didn't save it on my harddrive.

thnx very much!
Binger
Title: Foobar2000 format strings
Post by: Jaro on 2003-07-07 11:00:26
@ amppa
next question
If i have soundtrack, and as we know in that type of albums we have different artists.
Is it possible to change artist in playlist formatting according from artist that we now playing?
Title: Foobar2000 format strings
Post by: amppa on 2003-07-07 15:54:46
Quote
@ amppa
next question
If i have soundtrack, and as we know in that type of albums we have different artists.
Is it possible to change artist in playlist formatting according from artist that we now playing?

Modified the code to handle "various artists" albums (the album directory name has to begin with "VA" or "Various Artists", case sensitive).

http://pelit.koillismaa.fi/fb2k/strings.php?f=4 (http://pelit.koillismaa.fi/fb2k/strings.php?f=4)
Title: Foobar2000 format strings
Post by: Jaro on 2003-07-07 21:39:43
Quote
Modified the code to handle "various artists" albums (the album directory name has to begin with "VA" or "Various Artists", case sensitive).

http://pelit.koillismaa.fi/fb2k/strings.php?f=4 (http://pelit.koillismaa.fi/fb2k/strings.php?f=4)

@ amppa

But how to read folder like:
8 mile - various artists
or
heat - various artists
???
when va is on second position, after -
Title: Foobar2000 format strings
Post by: amppa on 2003-07-08 02:14:07
Quote
But how to read folder like:
8 mile - various artists
or
heat - various artists
???
when va is on second position, after -

You know, artist should always be before album name, rename your directories 
You may of course try to code it if renaming directories is not acceptable. It's fun, rewarding and not even too hard.
Title: Foobar2000 format strings
Post by: Jaro on 2003-07-08 17:14:31
Quote
You may of course try to code it if renaming directories is not acceptable. It's fun, rewarding and not even too hard.

Can You help me? This is last thing i wish in Your playlist code.
I have my collection on cd's and i don't want to re-burn it all.
Title: Foobar2000 format strings
Post by: Case on 2003-07-08 17:27:55
I'd suggest tagging your VA files with "Album Artist=VA" and making scripts use that. More generic solution than searching for specific strings in directory names and same tag can be used to tell proper artist with rare cases like this (http://www.psyshop.com/shop/CDs/dra/dra1cd041.html).
Title: Foobar2000 format strings
Post by: amppa on 2003-07-08 17:54:06
Quote
Can You help me? This is last thing i wish in Your playlist code.
I have my collection on cd's and i don't want to re-burn it all.

Sorry, can't help you with this one, don't have time for such :/ I needed that basic VA recognition myself, that's actually why I coded it in the first place. Good luck with learning the basics of format strings 

Quote
I'd suggest tagging your VA files with "Album Artist=VA" and making scripts use that. More generic solution than searching for specific strings in directory names and same tag can be used to tell proper artist with rare cases like this.


That might be clever thing to do.. I'll try to remember this the next time I am in the mood of retagging files 
Title: Foobar2000 format strings
Post by: frod on 2003-07-09 04:08:03
Code: [Select]
$puts(foo,8 mile - various artists)

$if($strcmp($replace($substr($get(foo),$strchr($get(foo),'-'),$len($get(foo))),' ',),'-variousartists'),It''s a compilation,It''s not a compilation)
Title: Foobar2000 format strings
Post by: dice on 2003-07-10 12:35:05
This thread is cool, but it took me thirty minutes to look through the first six pages and to test out different designs. It would be cool if there could be a new thread for each version (as not all strings work with all versions) - this would also keep page numbers down and wouldn't have old strings.

Dunno just an idea.

Would also be cool if people could post a small screenshot in the post to see what it comes up as.
Title: Foobar2000 format strings
Post by: dice on 2003-07-10 13:03:48
Some help with some schemes I am trying to modify...

Code: [Select]
$if(%_isplaying%,0080FF|0080FF$num(%_playlist_number%,3). $if(%artist%,$if(%title%,%artist%[ - '['[%album% - ][''%date% - ][$if(%tracknumber%,#$num(%tracknumber%,2),?) - ]$pad_right(%_length%,5)']'] - %title%,NO TAG - $pad_right(%_length%,5) - "%_filename_ext%"),NO TAG - $pad_right(%_length%,5) - "%_filename_ext%"),$num(%_playlist_number%,3). $if(%artist%,$if(%title%,FFFFFF%artist%[ - '['[%album% - ][''%date% - ][$if(%tracknumber%,#$num(%tracknumber%,2),?) - ]$pad_right(%_length%,5)']'] - FFFFFF%title%,NO TAG - $pad_right(%_length%,5) - FFFFFF"%_filename_ext%"),NO TAG - $pad_right(%_length%,5) - FFFFFF"%_filename_ext%"))


I want to get rid of the total number of MP3's running down the left hand side, and instead of the Album being in '['s, I would love if it was in '('s.
I wasn't sure how to delete the album date either. (I _did_ try deleting the [''%date% - ]  )
Two more things...
I would like it if the track time was displayed at the end, after the song's name, in the same format as the album name (In black with brackets).
The only other minor thing is when you are playing a track, it is orange...

Thanks to anyone who wants to help.  B)

/edit

I was having a look at this script, and wondered what the command for the diamonds was:
Code: [Select]
c47F5e|ffAA80$ifgreater($len(%artist%),20,$cut(%artist%,18)..,%artist%) • $ifgreater($len(%title%),55,$cut(%title%,53)..,%title%)    c47F5e|ffAA80[$ifgreater($len(%album%),30,$cut(%album%,28)..,%album%)
]


Thanks!
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-10 14:25:12
@dice: I found your code to be too messy to read (at least to me). I made a new one from scratch that does about the same, but in a way I find easier to read.

*no playlist numbers
*no date
*changed [ to (
*right aligned track time. (remove the $char(9) if you don't want that alignment and add '(' and ')' if you want it in brackets)
*changed playing color to blue (you did not say what color you wanted).
*Removed NO TAG and ?
*Added comments


Code: [Select]
// Set the color
$puts(color,$if(%_isplaying%,FFAA80|FFAA80,FFFFFF|FFFFFF))

// Get color
$get(color)

// Artist (show filename if no tag)
$if(%artist%,%artist%,%_filename%)

// Album
$if(%album%,' - ('%album%)

// Tracknumber
$if(%tracknumber%,' - #'$num(%tracknumber%,2)')',$if(%album%,')'))

// Title
$if(%title%,' - '%title%)

// Right align
$char(9)

// Get color
$get(color)

// Track time
$pad_right(%_length%,5)
Title: Foobar2000 format strings
Post by: dice on 2003-07-10 16:00:52
Thanks for trying - I know it is messy but it's not mine.
Title: Foobar2000 format strings
Post by: greenirft on 2003-07-10 22:47:37
Quote
This thread is cool, but it took me thirty minutes to look through the first six pages and to test out different designs. It would be cool if there could be a new thread for each version (as not all strings work with all versions) - this would also keep page numbers down and wouldn't have old strings.

I think a better idea would be to have some kind of website in which one can create an account and upload their code and a screenshot for everyone to see. Then maybe a nifty voting system or something fun.

Someone had a similiar idea and did something about it, but it was never adapted. It sounds like a fun summer project to start on, maybe I will once I get my glasses back (and thus, using a computer doesn't give me a headache).

Edit: people posted the site which was the similiar idea I was thinking, I didn't know that it even still existed: http://pelit.koillismaa.fi/fb2k/ (http://pelit.koillismaa.fi/fb2k/)
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-10 23:42:04
foobar2000 formatting strings (http://pelit.koillismaa.fi/fb2k/)
Title: Foobar2000 format strings
Post by: amppa on 2003-07-10 23:47:04
Quote
I think a better idea would be to have some kind of website in which one can create an account and upload their code and a screenshot for everyone to see. Then maybe a nifty voting system or something fun.

Someone had a similiar idea and did something about it, but it was never adapted. It sounds like a fun summer project to start on, maybe I will once I get my glasses back (and thus, using a computer doesn't give me a headache).

Well, there is one. With uploading, screenshots and voting system. Still under one week old, though, and does not have too many strings (11 when writing this). People seem to be unwilling to post their string to the page, don't know why. I'm eager to hear if it has some major flaws or something.

http://pelit.koillismaa.fi/fb2k/ (http://pelit.koillismaa.fi/fb2k/)

edit: heh, upNorth was faster
Title: Foobar2000 format strings
Post by: saratoga on 2003-07-10 23:56:30
Wow thats nice!  Do you have to be the owner to upload?  if not I'll parse this thread and upload strings.
Title: Foobar2000 format strings
Post by: Geezer on 2003-07-10 23:58:18
Perhaps there isn't that many real variants after all, I just modified Up Norths code abit to suit me. Great page anyway, it will grow in time! And foobar2000 isn't that widespread.. yet.
Title: Foobar2000 format strings
Post by: amppa on 2003-07-11 00:01:21
Quote
Wow thats nice!  Do you have to be the owner to upload?  if not I'll parse this thread and upload strings.

You'll have to create an account there to upload strings. And I think it's better to enter only your own strings - this way the credit goes to whom it belongs.
Title: Foobar2000 format strings
Post by: saratoga on 2003-07-11 00:12:35
I could credit the HA people when I upload then.  I have no interest in taking credit, I do in establishing a way to browse these files that doesn't take all afternoon.
Title: Foobar2000 format strings
Post by: amppa on 2003-07-11 00:32:54
Sorry, didn't mean it to sound that charging  But if the users enter the strings themselves, they have the ability to edit and delete the strings as they want and so on. IMHO, it just is better to let the creators decide themselves what to do with their own strings, even if it means greater inconvenience for the rest of us.
Title: Foobar2000 format strings
Post by: GodFinger on 2003-07-12 19:06:10
 
Anyone of you guys know a good playlist formatting-code, which is suitable for both albums and for single files also?
I mean, when you have tons and tons of miscellaneous files in the playlist, and you use album playlist formatting, you end up with a total mess.
Anyway, I would appreciate it...
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-12 20:13:06
Your problem has been discussed before, but AFAIK there is no real solution to it. You can't have the best of both worlds, and the biggest problem is if you want one file to look good alone, as well as as a part of an album.

For the time being, I'm pretty satisfied with how my own formatting works for my use. How good it works for you and everyone else, depends on how much your tagging, naming and general usage resembles mine.


These are some of the things I use in my code to make it more dynamic: A strict naming- and tagging scheme makes it alot easier to make it look good.


Btw: My latest code can be found at http://pelit.koillismaa.fi/fb2k/ (http://pelit.koillismaa.fi/fb2k/)
Title: Foobar2000 format strings
Post by: Nitty on 2003-07-12 20:38:11
I'm having trouble with upNorth's format.  It was fine before I updated it with whatever is on http://pelit.koillismaa.fi/fb2k/ (http://pelit.koillismaa.fi/fb2k/)
I'm using the appropriate fonts...
screenshot (http://jason.evil.cc/foobar-fucked.png)
Title: Foobar2000 format strings
Post by: Jan S. on 2003-07-12 20:43:04
ehehe..I had the same problem when I uploaded my string... the website can't show/save? the unicode chars...


you need to replace etc.:
Code: [Select]
"& #9500" with "$char(9500)"


space after "&" is not there but otherwise it is converted to it's unicode char here.


edit: heh....THIS website convert the the string to unicode 
edit2: heh... shit..it does it even when I use [CODE ]
Title: Foobar2000 format strings
Post by: Luxus on 2003-07-12 22:15:46
hm very strange.. when i replace it display still dont display it right

now it show the $char(9500)
Title: Foobar2000 format strings
Post by: Jan S. on 2003-07-12 22:22:53
You need to remove the ' around them too.
Title: Foobar2000 format strings
Post by: amppa on 2003-07-12 23:02:46
Fixed the unicode bug, copy&paste from the site should work fine now. No need to post the codes again.
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-12 23:12:10
***FIXED***
Concerning the Unicode character problem when using http://pelit.koillismaa.fi/fb2k/ (http://pelit.koillismaa.fi/fb2k/)

I don't like the way my code looks when I change all the unicode characters to $char(xxxx). I think it makes the code less readable, both for myself and more important to people that wants to customize it to suit their taste/needs.
I hope there is something amppa can do to remedy this problem, but untill then it will be available here (http://www.stud.ntnu.no/~mortek/foobar2000/hybrid.rar).

[edit]
faster than the speed of light 
[/edit]
Title: Foobar2000 format strings
Post by: Luxus on 2003-07-12 23:15:35
Quote
Fixed the unicode bug, copy&paste from the site should work fine now. No need to post the codes again.

great.. thx for the lightning fast fix
Title: Foobar2000 format strings
Post by: amppa on 2003-07-12 23:23:09
Just good luck I checked the board now  Please, post a feedback from the site if bugs are found, it probably reaches me faster.
Title: Foobar2000 format strings
Post by: aryan on 2003-07-14 04:21:11
Where can I find Latest MANUAL for Format Strings/??????
Title: Foobar2000 format strings
Post by: kode54 on 2003-07-14 06:44:25
Ever clicked the Help button?
Title: Foobar2000 format strings
Post by: Jaro on 2003-07-14 14:01:37
@ upNorth

Can You add tracknumber and album name to single mode?
Title: Foobar2000 format strings
Post by: mobyduck on 2003-07-14 14:46:43
@upNorth:

Hi,

I'm testing your "hybrid" scheme and I like it very much (using it in single mode).

I would like to avoid repeating the artist name when more than one song from the same artist appear in the playlist (sorted by artist, of course): is it possible? I tried looking at the code, but was lost quite soon... 

TIA for your help.

Alessandro

PS: BTW, the format string site is really helpful. Perhaps entries could be divided in two major (for me, at least) categories: album or single files mode.
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-14 16:05:55
Quote
@ upNorth

Can You add tracknumber and album name to single mode?

Done, but there is a problem with Unicode again. Better wait untill amppa has fixed it before you download the new one.
edit: The problem has been SOLVED and the code is working.
Any constructive feedback or bug reports would be appreciated.
Quote
@upNorth:

Hi,

I'm testing your "hybrid" scheme and I like it very much (using it in single mode).

I would like to avoid repeating the artist name when more than one song from the same artist appear in the playlist (sorted by artist, of course): is it possible? I tried looking at the code, but was lost quite soon...  

TIA for your help.

Alessandro

Can't be done. One entry has no knowledge of its neighbours. Thats part of the reason I use album mode myself. Don't like all the duplicated info 
If it could be done, it would open a whole new dimension...
Quote
PS: BTW, the format string site is really helpful. Perhaps entries could be divided in two major (for me, at least) categories: album or single files mode.

Then I can put my code in both 
And expand it to fit in every new categori 

edit: updated status to problem solved
Title: Foobar2000 format strings
Post by: GodFinger on 2003-07-14 16:35:14
Sorry for the late reply...
So, right now, I use this (http://www.atomas.com/cafzone/foobar_megar.gif) code from megar, and it's working quite good.
So, I think this is the only plylist code suitable for both albums, and for single files. Or are there any others ?
And about tagging;
I tag my MP3:s with EAC, (when I'm ripping) and thus they are pretty normal (track titles, artists, tracknumbers, and everything else in the right place...)
Plus a really neat-looking ExactAudioCopy&LAME Encoder in the comment field !  B)
I usually name the files like this:
If it is a single file, then      Artist - Track Title.mp3
And in case the file is part of an album, then it's like    01 - Track Title.mp3

If the files are not ripped by me,  use a great GPL:ed tool called MP3 TagTools (http://massid3lib.sourceforge.net/)
Title: Foobar2000 format strings
Post by: amppa on 2003-07-14 16:36:20
For me, it seems to be working fine, both string adding and editing unicode strings (look at string UnicodeTest). Are you sure you didn't edit the code with non-unicode text editor or something?
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-14 17:03:38
Quote
For me, it seems to be working fine, both string adding and editing unicode strings (look at string UnicodeTest). Are you sure you didn't edit the code with non-unicode text editor or something?

I have no idea what the problem was, but now it works. I used IE instead of Opera this time. Strange...
Or maybe my desktop dictionary interfered?

Anyway, It works now 
Title: Foobar2000 format strings
Post by: mobyduck on 2003-07-14 17:26:57
Quote
Can't be done. One entry has no knowledge of its neighbours.

Just out of curiosity, if this is true (and I have no reason to doubt!) how did you implement album-mode logic? (I guess I'm still hoping to have this feature somehow  )

Alessandro
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-14 19:08:18
Quote
Quote
Can't be done. One entry has no knowledge of its neighbours.

Just out of curiosity, if this is true (and I have no reason to doubt!) how did you implement album-mode logic? (I guess I'm still hoping to have this feature somehow  )

Alessandro

I'm not going to take any credit for inventing the album mode or the logic used. Start reading this thread from the beginning, and you might find the creator.

The logic is simply using each files tags to do what it does. This is the reason tags are so important.
The tracknumber tag is maybe the most important of them all, because it is used to decide what tags to show for each file.

An example for the column showing album info:
If tracknumber=1 : show  ----------------
If tracknumber=2 : show  artist name
If tracknumber=3 : show  album name
If tracknumber=4 : show  genre
If tracknumber=5 : show  ----------------
If tracknumber>5 : show  nothing

This approach can be used with tags that has a common value for all files in an album, to show them only once. Tags like title is shown for all files.
When info about codec is shown only once for an album in the playlist, it is actually a small cheat. The info does only apply to the track that "owns" the line that is used to show the info. This is not a major problem as long as all the files has been encoded the same or in a similar way.

To make the formatting more advanced and to some extent remedy the fact that you don't know anything about the previous/next file, you can add custom tags like: %album artist%, %various%, %lasttrack%, %singletrack% and so on.


Did this make it any clearer? If not, play around with formatting strings some more to understand how it works, or just ask.
Title: Foobar2000 format strings
Post by: mobyduck on 2003-07-15 08:20:12
Quote
Did this make it any clearer? If not, play around with formatting strings some more to understand how it works, or just ask.

Thank you for the explanation. Keep up the good work!

Alessandro
Title: Foobar2000 format strings
Post by: hödyr on 2003-07-15 20:07:56
Is there any software available which is able to automatically tag the last track of all my albums with %lasttrack% ?
Title: Foobar2000 format strings
Post by: Mestax on 2003-07-15 20:44:02
I'm trying very hard to get to grips with title formatting, but it's slow progress. Although the help file is useful so far as explaining each tag it doesn't explain the format and order to put things as such, unless i'm being stupid.  So i'm trying to reverse engineer the default playlist string, but no matter what i remove i'm mostly getting errors. Could someone show me how to to do a couple of things with the default code?

$num(%_playlist_number%,$len(%_playlist_total%)): [%artist% ¦ ]$if(%title%,['['%album% ~ [[%disc%/]$num(%tracknumber%,2)]'] ']DADADA%title%,%_filename_ext%)[   %_length%]

What i would like to do is put the brackets around just the album details and possibly change the colour of the colon thing between the artist and album. Maybe if i see how that is done i can take over from there.

Thanks.

Dan
Title: Foobar2000 format strings
Post by: anza on 2003-07-15 21:30:13
Well, as far as I can see that code works just fine. If you want to change the color of the thing after artist, just add a 000000 (of course, change the color to what you like  ) in front of the mark and then  after it.
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-15 21:32:18
This will put brackets around album and disc, and make the colon red:
Code: [Select]
$num(%_playlist_number%,$len(%_playlist_total%)): [%artist% 0000FF¦ ]$if(%title%,['['%album%']' ~ [[%disc%/]$num(%tracknumber%,2) ]]DADADA%title%,%_filename_ext%)[ %_length%]


As you might have guessed, the brackets in the formatting is an alternative $if statement. Brackets will only be diplayed in your playlist if they are within quotation marks like this '['.

My advice would be to stick with regular $if statements untill you get the grip of things. At least it helped me alot to understand how things worked.
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-15 22:15:36
While I was at it, I made a similar formatting that I hope can be easier to read and customize:
Code: [Select]
//playlist number. (number of digits needed is 
//calculated from the total number of tracks in playlist)
$num(%_playlist_number%,$len(%_playlist_total%))': '

//artist info
$if(%artist%,%artist%0000FF' ¦ ',)

//*****START Big if*****
$if(%title%,

//album info
$if(%album%,'['%album%']',)

//disc info
$if(%disc%,' -Disc '%disc%'- ',)

//tracknumber info
$if(%tracknumber%,'#'$num(%tracknumber%,2)'0000FF' ¦ '','0000FF' ¦ '')

//title info
DADADA%title%
,
//if no %title% tag present show filename
%_filename_ext%

//*****END Big if*****
)

//right align
$char(9)

//track length
$if(%_length%,%_length%,)


It has alot of comments, and every visible space and symbol is put in quotation marks. I tried to make it as clear as I could, but it made it alot longer.
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-16 04:19:41
It's me again 

I have updated my "hybrid" formatting at Foobar2000 Format Strings (http://pelit.koillismaa.fi/fb2k/) and would like some opinions and feedback on a new feature.

One of the main goals of my formatting is readability, hence the use of colors. To try to make it more readable I thought of (and implemented) a new feature.

I have quite a lot of parentheses in song titles, and I guess that is quite common. The contents is for the most part extended info of the sort "(feat. .....)", "(.... remix)", "(intro)" and so on. To me most of this is not really necessary, but I don't want to get completely rid of it either. My solution was to make it appear in a somewhat darker color. I works without extra tags, as I found that to be an inefficient solution, a time consuming process and that you would have to remove the mentioned info from the title tag itself. The latter would make the info disappear completly with other players.

As it works now, it will not color anything if the title starts with a parenthesis (like the song by Blondie "(I'm Always Touched) By Your Presence" ) as I assume this to be part of the title, but apart from that it will look for the first one and color the rest of the string.
This feature is implemented as an option that can be turned on and off at the top of the code. Looks like this:
Code: [Select]
//Change eventual title info in parentheses to another color?
// 1=yes, 0=no
$puts(color_extra,1)

Default is on.

I you want to enable this but encounter a song where the contents of the parentheses should not be colored, the tag %LTA% (Leave Title Alone) can be used to skip any coloring of that particular title. Assign the tag any value you like.


I realize that this might be over the top for some, but one of the many features I enjoy with foobar2000, is that I can customize even the minor details.
If this this is old news and I'm reinventing the wheel, please let me know.
But at least I hope someone will have a use for it apart from myself. 

Edit: Changed default status to on.
Title: Foobar2000 format strings
Post by: anza on 2003-07-16 08:10:30
Quote
I realize that this might be over the top for some, but one of the many features I enjoy with foobar2000, is that I can customize even the minor details.
If this this is old news and I'm reinventing the wheel, please let me know.
But at least I hope someone will have a use for it apart from myself. 

Well, you haven't completely reinvented the wheel, but I've been doing something like this with comments and artists on various artist CDs  But actually I just noticed I have been dumb enough to leave the parentheses white, corrected now (but not on the page yet)

BTW, your formatting is great - it's really informational and you'll just have to take a really quick look to know all the specs on the album, great job!

Edit: So I meant I only had used the IDEA before you, but not the way you did. I had only changed the color of comment and va artist.
Title: Foobar2000 format strings
Post by: Jaro on 2003-07-16 14:10:24
@ upNorth
Can You connect album mode with single mode?

Quote
//Mode select:2=all, 1=album, 0=single


and in single mode maybe You can change position of track number (...|artist|tracknumber|title|album)
 

Thank You for great format string.
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-16 15:17:22
Quote
@ upNorth
Can You connect album mode with single mode?

Quote
//Mode select:2=all, 1=album, 0=single

I'm not sure what you want me to do. Do you want all the single files in album mode to show tracknumber and album info?
I'll look into it later and see if it can be done in a way that makes sense and looks good (without too much custom tagging and breaking other intended features).

Quote
and in single mode maybe You can change position of track number (...|artist|tracknumber|title|album)
 

I tried this, but I don't think it looks good. Personally I think the tracknumber belongs with the album info, but I might change my mind later

Quote
Thank You for great format string.



Btw: I updated my formatting to support coloring of parentheses in single mode too. I forgot that one last night. I also changed it to be on by default.

I don't think I will have the time to do too much the next weeks, but you never know 
Title: Foobar2000 format strings
Post by: Mestax on 2003-07-16 15:24:52
I forgot to enable e-mail notification on my message, so have only just seen the replies.  Thanks anza and upnorth. I'm having a go now, the similar format you've done, upnorth,  is extremely helpful.

Dan
Title: Foobar2000 format strings
Post by: Zeo_ on 2003-07-16 17:29:34
Hy
i wanted to thank everybody for their great work! Everyone makes great strings, so,  thanks 
but i have a little problem.I want to edit a string (uglee), rip some stuff out that i don't use (year and album-gain info). I tried to remove it myself, but i got syntax error all the time. Can someone help me?
Title: Foobar2000 format strings
Post by: ak on 2003-07-16 18:19:10
Well, it's nothing strange, I guess name fit not only the color scheme 

Here's a stripped variant:
Quote
...
// ARTIST, ALBUM, NFO

$if(%singletrack%$not(%tracknumber%),$get(ARTST_COL)
$padcut($get(ARTIST),$get(WDTH)),$ifgreater(5,%tracknumber%,
$select(%tracknumber%,

// nr1: artist
$get(LNC)$char(9555)$get(ARTST_COL)$cut($get(ARTIST),$get(WDTH))$get(LNC)
$repeat($char(9472),$sub($get(WDTH),$add($len($get(ARTIST)),0))),

// nr2: album
$get(LNC)$char(9561)
$get(ALBM_COL)$padcut(%album%[ vol %volume%][ #%disc%],$get(WDTH)),

// nr3: encoder
$get(PNC)|$get(PNC)
$padcut_right( $lower($ext($if2(%__referenced_file%,%_path%))):
$if($put(E,$replace(%__mpc_encoder%,-,)),
$if($strstr($get(E),Buschmann), P1.06, $insert($get(E),
$left($get(E),1),$sub($strstr($get(E),.),2))),)
$if($not($put(P,$replace(%__mpc_profile%,'',)))$strstr($get(P),Unstable)
$strstr($get(P),n.a), %__bitrate%kbps, $get(P))
[ %__extrainfo%][ $caps(%__compression%)][ $info(stream type)]
[ %__mode% mode],$get(WDTH))$get(LNC)$char(9558),

// nr4: audio
$get(TNC)|$get(TNC)
$padcut_right( nfo: [$div(%__samplerate%,1000)kHz][ %__bitspersample%bit]
[ %__channels%ch],$get(WDTH))$get(LNC)$char(9564),),

// if single track
...

Locate appropriate part and replace it. Should work.
Title: Foobar2000 format strings
Post by: Zeo_ on 2003-07-16 18:26:31
Thanks ak!!
Guess i'm not too bright for string-coding
Title: Foobar2000 format strings
Post by: Jan S. on 2003-07-16 21:15:38
Just a note for the ones wanting to know the last_track...
if you format your %tracknumber% as "xx/xx" meaning track x of x you can figure out when you got the last track.
Title: Foobar2000 format strings
Post by: kuyawsadabaw on 2003-07-17 17:38:15
I really like that greenish format by anza. I just wish there was a way that it would still display the Artists and Album on the first mp3 it sees other than the one marked as Track 1.
Title: Foobar2000 format strings
Post by: billcow on 2003-07-18 04:57:59
I was just looking back at the changelog and noticed that under 0.667 there is an entry "fixed issue with playlist repainting and tabbed columns with different colors, introduced in 0.666"

Anyone have any idea what this is referring to?

Also, has anyone played around with embedding color codes within meta-fields? Seems to work, so I guess the question is more about whether anyone's found a useful application.

Finally, see my post in the thread about subsongs, which is applicable to title formatting.
Title: Foobar2000 format strings
Post by: curian on 2003-07-22 12:22:46
I found the playlist fromat string in this topic so I won't copy it here, but my status bar code is quite good I think 

You may put out the tick from the 'show attenuation' box in the display section to make enough space for everything.

Code: [Select]
 [%artist% / ]$if2(%title%,%_filename_ext%) $if(%album%,'[ '$iflonger(%album%,20,$upper($abbr(%album%,20)),%album%))' '$if(%date%,' - '%date%' - ]') <> [%__bitrate%kbps ][%__samplerate%Hz ]$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)) ,)[%__extrainfo%]$char(9)$select($add($mod(%_time_elapsed_seconds%,2),1),'[Playing]',' ')    
$char(9)$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,50,0600FB'I','I') <> %_time_elapsed%[ / %_time_total%]


Sorry for the quality of the screenshot 

http://www.pc-shop.hu/curian/foo_full.jpg (http://www.pc-shop.hu/curian/foo_full.jpg)

now it uses $upper only when $abbr is needed in the album string 
Title: Foobar2000 format strings
Post by: Packman on 2003-07-23 05:39:52
UpNorth,

My apologies if this has already been addressed, but I dug a few pages back (which takes a while over dialup) and couldn't find an answer.

I've been using your strings for a few months and have been super happy with them, you are awesome.  I just got the latest version of your hybrid string which is great.  The only problem that I'm having is with the progress indicator in the status bar.

I got the new one because I was using the Lucidia Console ANSI and it was having problems with special characters.  I got the new version of the status bar and it has '?' for the progress indicator.  Am I supposed to be using a special font?  I have it set to Lucidia Console right now.

Also, can you explain really quick how the %various% and %preformer% tags are meant to be used?

Thanks a lot and keep up all of the great work.

*Ok, I'm stupid and didn't see the "Status Bar Font" on the web page.  I switched it to Lucida Sans Unicode and I'm still getting '?"
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-23 11:10:01
@Packman: Welcome to the forum 

Sorry about the problems with my statusbar. It was caused by my Opera browser when I uploaded the code. Should work now (still need IE from time to time...) with both 'Lucida Sans Unicode' and 'Lucidia Console ANSI'.

Quote
Also, can you explain really quick how the %various% and %preformer% tags are meant to be used?

I don't use %performer% anymore myself, it's a remnant from when I started formatting. It's still in the code because someone asked for it and for backwards compatibility.

This is what I do with my 'various artists' albums:
I don't really need tags anymore, because I start the name of the folder with 'VA - '
That way they are automaticaly recognised for what they are. Works for both:
'VA - albumname\track1.mp3' and
'VA - albumname\CD1\track1.mp3'
An alternative is to give all the tracks the %various% tag and assign a value to it (I use %various% = yes). The %performer% tag will work the same way.
For DJ compilations I use the %album artist% tag to show e.g. 'DJ Tiesto' insted of 'Various Artists' in the first column.

Hope this made it clearer. If not, just ask 

Btw: Thanks for bringing this up, because I found a 'bug'. The %performer% tag should be used when %artist% is not present. Will be fixed sometime in the future.
Title: Foobar2000 format strings
Post by: Packman on 2003-07-23 13:13:26
Quote
@Packman: Welcome to the forum 

Sorry about the problems with my statusbar. It was caused by my Opera browser when I uploaded the code. Should work now (still need IE from time to time...) with both 'Lucida Sans Unicode' and 'Lucidia Console ANSI'.

Ok, that did it.  I think I was having a similar problem because I was using Firebird and it wasn't recognizing the characters.  Works great now, thanks a lot.
Title: Foobar2000 format strings
Post by: curian on 2003-07-24 18:15:32
I want to put the progress into the window title in %.
My only idea is this:
Code: [Select]
 $mul(100,$div(%_time_elapsed_seconds%,%_time_total_seconds%))


But this returns a constant 0 :/

What's the problem?
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-24 18:59:43
@curian: I'm not sure what's wrong with yours and I don't have the time to look into it, but if you want it to work you can use this:
Code: [Select]
$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)
Title: Foobar2000 format strings
Post by: musicmusic on 2003-07-24 19:01:16
Quote
I want to put the progress into the window title in %.
My only idea is this:
Code: [Select]
 $mul(100,$div(%_time_elapsed_seconds%,%_time_total_seconds%))


But this returns a constant 0 :/

What's the problem?

This works fine in 0.7 and 0.667

Code: [Select]
$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)'%'


Yours returns zero because you need to multiply before you divide, because the division you've done will return a decimal (between 0 and 1) and the math functions only support/take integers (whole numbers) so your code will return zero for 99% of the song as the decimals arent really rounded to nearest whole number, rather cut off = rounding down.
Title: Foobar2000 format strings
Post by: curian on 2003-07-24 19:09:17
Okay I understood the problem and the code you wrote works just fine.

Thanks 
Title: Foobar2000 format strings
Post by: picmixer on 2003-07-24 20:04:53
Am currently busy updating my string to show me when there is no replaygain value present.  However I don't seem to be succeeding.

When I use the following:

$get(artistinfo) $if(%_replaygain_album_gain%,*,NO REPLAYGAIN)$get(fileinfo)


the playlist will always display the NO REPLAYGAIN reminder, even if the tracks are properly replaygained.

Have tried impementing this in several ways and don't seem to be able to get it working.

(artistinfo) and (fileinfo) are properly defined and work just fine (did not want to post the entire string)

(:B 0.7b22)
Title: Foobar2000 format strings
Post by: billcow on 2003-07-24 20:19:20
alrighty, this one's easy, albeit non-obvious:

all the "tech info" fields - aka replaygain, bitrate, codec and so on - require two underscores before their name when you reference them. "special" fields - filename, path, subsong, etc - use one, and regular metadata doesn't use any.

hence, the problem (which you've probably figured out by now) is that you only have one underscore. so change it to "$get(artistinfo) $if(%__replaygain_album_gain%,*,NO REPLAYGAIN)$get(fileinfo)" and it should work fine.
Title: Foobar2000 format strings
Post by: picmixer on 2003-07-24 20:26:19
Wow, really that simple.  Already looked at the title formatting help for hours today, but can only spot it now that you've pointed it out.

And I have really tried god knows what.

Thanks a lot for pointing it out 

Just tried it and it works fine, time to fine tune now.
Title: Foobar2000 format strings
Post by: picmixer on 2003-07-28 10:56:15
Allright, I hope this ones not as easy as the last one  .  Although I am sorry if it has been answered before and I overlooked it somewhere.

In my formatting string I have this field wich will display the file info:


///////////////////////////////
////  Display file info  ///
//////////////////////////////
$puts(fileinfo,
$transition(
$if($stricmp($get(display_file_info),1),
$get(tag_spacer)
$pad($upper($right(%_filename_ext%,4)),5) $pad_right($num(%__bitrate%,4)/$div(%__samplerate%,1000),6))
$if($stricmp($get(display_time),1),$pad_right(%_length%,6)),
$get(spacer_color),000000|000000))


Yet I don't seem to find a way to get %_filename_ext% from either a CD Audio nor a .wav file.  In both cases %_filename% works fine and will give me the filename (without extension) in case of a wav file and something like this in case of a CD: 1C76984A,09

So I was wondering if there was any way to make tagz recognize that there is a cd or wav file present.  Then I could just manually define a few variables for the file extensions.  ie, $puts(CDA_ext,.CDA), $puts(WAV_ext,.WAV) and then make the file info read those values whenever a CD, WAV is detected.

Something like this should do the job then (roughly):

$if("cd detected" by so far unknown method,$get(CDA_ext),$pad($upper($right(%_filename_ext%,4)),5))............

Funnily my title info does display "cd track 09".  So there must be a way to get this feedback somehow.  Hmh guess I am overlooking something really obvious again.  Will go on braking my head over this now.
Title: Foobar2000 format strings
Post by: musicmusic on 2003-07-28 11:55:11
For CD something like $if($strcmp(cdda,$cut(%_path_raw%,4)),CDDA,FILE)
Title: Foobar2000 format strings
Post by: picmixer on 2003-07-28 12:12:46
Thanks musicmusic. 

%_path_raw% seems to work for both cases.  The one you mentioned and also for showing extension on .wav files.

Strange that %_filename_ext% doesn't work on .wav files though.  Well doesn't really matter anymore now
Title: Foobar2000 format strings
Post by: musicmusic on 2003-07-28 14:29:39
?? i have wavs and $ext(%_filename_ext%) works fine (returns wav). what does %_fileame_ext% return on one of your wavs?

either way,

$if($strcmp(cdda,$cut(%_path_raw%,$sub($strlchr(%_path_raw%,:),1))),CDDA,FILE)

is a better version of the above as you can use it on silence and other things.
Title: Foobar2000 format strings
Post by: picmixer on 2003-07-28 14:39:38
Strange I just tried it again by changing %_path_raw% to %filename_ext% and now suddenly %filename_ext% does display the right wav extension.

Yet however when I tried it before it returned all extensions correctly except for .wav, where it returned N/A.  I even checked a few times back then, by switching back and forth between(%_filename%) and(%_filename_ext) and it was always N/A for .wav.

Can't really explain it either
Title: Foobar2000 format strings
Post by: nbv4 on 2003-07-28 19:04:52
Could someone help me here? I am using the Lucinda Console font, but the lines are showing up as dashed lines, and not solid ones.

screenshot: (http://img.villagephotos.com/p/2003-7/304488/foobar.gif)

(the colors are fucked up because i had to save it as gif under mspaint.)
Title: Foobar2000 format strings
Post by: billcow on 2003-07-28 20:44:32
That would be the result of windows converting Unicode to ASCII for you.

If you have Windows 2k or xp, try to find a different text editor that can handle unicode - the 2k/xp versions of notepad will work in a pinch.

If you have windows 95/98/ME, then i dunno what you can do - someone with more knowledge of unicode with older versions of windows would have to help you there.
Title: Foobar2000 format strings
Post by: picmixer on 2003-07-31 15:59:07
Allright, back again.  Seems like I just can't sort out certain things without you guys help.

After finally finaishing my single based playlist string I couldn't help it and just had to go with the current trend and am wotking on an album based one now.

The problem is, I basically want it to hightlight not only the currently playing track, but also the currently playing album.

Am trying to do this using this code:

Code: [Select]
//playing album
$puts(playing_album,$if(%_isplaying%,%album%,))
$puts(album_indicator,%album%)


$puts(trans1_color,$if($stricmp($get(album_indicator),$get(playing_album)),9B8A74|9B8A74,000000|000000))


/////////////////
///Songtitle///
////////////////

$if($stricmp(%tracknumber%,1),
$puts(songtitle,$get(title)$transition( >>>>>$repeat(─,$sub(80,$len($get(title)))),11118E|11118E,$get(trans1_color))),
$puts(songtitle,$get(title)))


Yet somehow this only does what I want if the first track of the album is playing and not if any other tracks are playing.  The thing is, I want it to apply the 9B8A74|9B8A74 color when any tracks of the current album are playing.  [EDIT] But only to the first track of that album. [EDIT]

Don't even know if this is possible, but I guess it should be.

Any help greatly appreciated.

@ampa:
Thanks for keeping up that formatting string site.  Just got my account yesterday.  Nice way to learn from other peoples strings.
Title: Foobar2000 format strings
Post by: upNorth on 2003-07-31 16:42:58
Quote
Yet somehow this only does what I want if the first track of the album is playing and not if any other tracks are playing.  The thing is, I want it to apply the 9B8A74|9B8A74 color when any tracks of the current album are playing.

Don't even know if this is possible, but I guess it should be.
I'm a little tired, so I might not think straight, but I would say this is impossible. Simply because the current line in the playlist doesn't know anything about the content of the previous or the next one.


Quote
@billcow:
Thanks for keeping up that formatting string site.  Just got my account yesterday.  Nice way to learn from other peoples strings.
I thought it was amppa that kept that site (http://pelit.koillismaa.fi/fb2k/) up? Is it more than one site? Or do you talk about keeping it up as in submitting skins? If the latter is the case, I guess you're right, it's billcow 
Title: Foobar2000 format strings
Post by: picmixer on 2003-07-31 16:53:05
Quote
I thought it was amppa that kept that site up? Is it more than one site? Or do you talk about keeping it up as in submitting skins? If the latter is the case, I guess you're right, it's billcow


Oops, what an emberassing mistake.  You are right it's amppa.  Apologies to amppa and billcow for this confusion.  Must have gotten that wrong somewhere along this (not to short) thread.

Quote
QUOTE (picmixer @ Jul 31 2003, 04:59 PM)
Yet somehow this only does what I want if the first track of the album is playing and not if any other tracks are playing.  The thing is, I want it to apply the 9B8A74|9B8A74 color when any tracks of the current album are playing.

Don't even know if this is possible, but I guess it should be.
I'm a little tired, so I might not think straight, but I would say this is impossible. Simply because the current line in the playlist doesn't know anything about the content of the previous or the next one.


Well the idea behind it was that the currently playing track sets the (playing_album) variable to whatever it's album is and the rest of the formatting string can then call on that variable to compare whether it is the same as the album in that specific line and then adjust the coloring accordingly.  I guess you are right though and it's not possible.  Although I comletely seem to be overlooking the reason why it doesn't.  I probably get the idea of the %isplaying% thing slightly wrong.

[EDIT]
Allright guess I just had to leave the computer alone for a while.  Suddenly had one of these revealing moments and completely know now where my train of thought went wrong before.  I just completely misinterpreted something.  Hmh, guess I'll have to live withought it then.
[EDIT]
Title: Foobar2000 format strings
Post by: hanser on 2003-08-03 01:48:38
Hrm.

I'm having a bit of a problem with hybrid. ( http://pelit.koillismaa.fi/fb2k/strings.php?f=16 (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:

(http://liquidsynergies.com/images/foobar1.gif)

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.
Title: Foobar2000 format strings
Post by: hanser on 2003-08-03 02:03:56
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: [Select]
//**************************************
// 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)
Title: Foobar2000 format strings
Post by: sld on 2003-08-03 03:45:14
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.
Title: Foobar2000 format strings
Post by: billcow on 2003-08-03 03:58:23
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.
Title: Foobar2000 format strings
Post by: hanser on 2003-08-03 04:11:09
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.
Title: Foobar2000 format strings
Post by: DotNoir on 2003-08-05 13:30:17
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...
Title: Foobar2000 format strings
Post by: hanser on 2003-08-05 13:31:54
Quote
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.
Title: Foobar2000 format strings
Post by: Polymorph on 2003-08-05 14:07:45
The way I found to order the tracks correctly for the hybrid layout is go to "Sort By...." and use:

Code: [Select]
%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.
Title: Foobar2000 format strings
Post by: DotNoir on 2003-08-05 14:38:53
after browsing a bit in the format string page (http://pelit.koillismaa.fi/fb2k) 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  Have to modify it a bit in the future for my own use, but that's a good base to start...

Code: [Select]
$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%))
Title: Foobar2000 format strings
Post by: sld on 2003-08-05 15:01:21
Quote
Code: [Select]
%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?
Title: Foobar2000 format strings
Post by: upNorth on 2003-08-05 18:46:21
My contribution 
Code: [Select]
$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 
Title: Foobar2000 format strings
Post by: DotNoir on 2003-08-05 20:25:50
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?
Title: Foobar2000 format strings
Post by: upNorth on 2003-08-05 21:03:08
@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. 
Title: Foobar2000 format strings
Post by: mmartinx on 2003-08-07 23:21:15
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.
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-07 23:38:06
Quote
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. 

All the special field like %_isplaying%, etc. should be mentioned in the help file.
Title: Foobar2000 format strings
Post by: musicmusic on 2003-08-07 23:39:50
Quote
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 (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 ??
Title: Foobar2000 format strings
Post by: mmartinx on 2003-08-07 23:47:07
Ah, thanks. For some reason I thought there were more that weren't in the help file.
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-08 22:57:00
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
Title: Foobar2000 format strings
Post by: musicmusic on 2003-08-08 23:08:43
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%)
Title: Foobar2000 format strings
Post by: upNorth on 2003-08-08 23:16:58
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.
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-08 23:21:17
Quote
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
Title: Foobar2000 format strings
Post by: musicmusic on 2003-08-08 23:26:09
Quote
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 .
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-08 23:37:55
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 

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.
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-08 23:38:57
Code: [Select]
////////////////////
////   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))))
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-08 23:42:14
Allright, guess that was to much for the dreadfull LPB 

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 
Title: Foobar2000 format strings
Post by: musicmusic on 2003-08-08 23:55:29
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.)
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-09 00:12:08
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
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-09 00:28:45
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.
Title: Foobar2000 format strings
Post by: musicmusic on 2003-08-09 12:26:17
Quote
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..
Title: Foobar2000 format strings
Post by: mmartinx on 2003-08-09 23:29:06
Heh, figured it out again.
Title: Foobar2000 format strings
Post by: mmartinx on 2003-08-10 19:49:02
I want to switch between 2 colors between albums on my playlist, here's my code...

Code: [Select]
$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
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-10 20:00:24
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: [Select]
$puts(lastalbum,%album%)


Something is weird here as well, afaik you can't write info to tags only read from them.
Title: Foobar2000 format strings
Post by: mmartinx on 2003-08-10 20:08:41
Argh, I'm never gonna remember the $get() notation.

fixed (still doesn't work though)
Code: [Select]
$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.
Title: Foobar2000 format strings
Post by: mmartinx on 2003-08-10 20:21:06
By the way, here's my current code:

Code: [Select]
// 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).

(http://www.skylagoon.com/private/mmartinx/foob.PNG)
Title: Foobar2000 format strings
Post by: upNorth on 2003-08-10 21:16:39
@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...
Title: Foobar2000 format strings
Post by: mmartinx on 2003-08-10 22:21:12
Quote
@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

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.
Title: Foobar2000 format strings
Post by: foosion on 2003-08-11 06:45:08
Quote
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
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".
Title: Foobar2000 format strings
Post by: Sam Stoat on 2003-08-11 19:54:38
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.
Title: Foobar2000 format strings
Post by: smok3 on 2003-08-11 20:13:28
Quote
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?)
Title: Foobar2000 format strings
Post by: camote on 2003-08-11 20:45:35
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.
Title: Foobar2000 format strings
Post by: Jan S. on 2003-08-11 20:56:47
Quote
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.
Title: Foobar2000 format strings
Post by: camote on 2003-08-11 21:00:13
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.
Title: Foobar2000 format strings
Post by: camote on 2003-08-11 21:08:09
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) |
Title: Foobar2000 format strings
Post by: smok3 on 2003-08-11 22:08:52
Quote
-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 (http://smokeamiga.virtualave.net/foo_onuava.gif)
font http://www.dafont.com/search.php?nq=5&q=onuava (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 (http://users.volja.net/smoker/pub/foobar2000.png) )
Title: Foobar2000 format strings
Post by: Sam Stoat on 2003-08-12 12:41:25
Quote
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?
Title: Foobar2000 format strings
Post by: smok3 on 2003-08-12 15:02:00
Quote
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)
Title: Foobar2000 format strings
Post by: sld on 2003-08-19 14:17:58
Quote
Code: [Select]
%ALBUM% - $num(%TRACKNUMBER%,3)

How would you sort further with custom tags, for example, %DISC% or %SINGLETRACK%?
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-19 14:32:12
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)
Title: Foobar2000 format strings
Post by: Linkin on 2003-08-19 16:22:14
this stuff is a bit too complicated for me so can anyone please tell me how i get this:

Code: [Select]
Playlistnumber. Artist: "Album" - |-Track 1
                                  |-Track 2
                                  |-Track X
Title: Foobar2000 format strings
Post by: torji on 2003-08-19 17:07:49
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  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... 
Maybe something like  $if($max(%tracknumber%,1),%artist% ? no ?
Title: Foobar2000 format strings
Post by: anza on 2003-08-19 17:39:18
My formatting (and all the other album based also?) does it about like this:
"if tracknumber is 1, show xxxxx, if tracknumber is 2, show yyyyyy" etc, and it can be easily done by using something like:
$select($min(%tracknumber%,3),<formatting for track1>,<formatting for track2>,<formatting for all other tracks>)
Title: Foobar2000 format strings
Post by: upNorth on 2003-08-19 18:10:51
anza answered the question already, but here's an example (a very simple one):
Code: [Select]
$num(%_playlist_number%,3)'. '

//text to display for track 1
$puts(album_info,%artist%: "%album%")

//length of that info
$puts(album_info_length,$len($get(album_info)))

//info to show for every track
$puts(track_info,'?'$num(%tracknumber%,2)' - '%title%)


$if(%tracknumber%,

$if($strcmp(1,%tracknumber%),
$get(album_info)$get(track_info)
,
$repeat(' ',$get(album_info_length))$get(track_info)
)

//if no tracknumber exists
,
%artist%' - '%title%
)

There is many ways to do it, and I use the way anza discribed in my own formatting. This is an alternative way of doing it.
Btw: You don't have to use $puts() and $get(), but I think it makes the code easier to read.

[edit]
You don't need all the single quotes either, but I like to use them to make every symbol I want to display visible in the code. (Not very consistent this time though...)
[/edit]
Title: Foobar2000 format strings
Post by: metamorphoise on 2003-08-20 13:15:06
i may as well contribute my humble code to this thread, as i have been meaning for aaages.
its not very advanced, the only things i have added recently enough to remember are better handling of various artist albums through %various%, displaying the disk on multidisk albums with %disk%, and showing the bitrate in a different color if VBR.

screenshot (http://users.tpg.com.au/adslw8wk/foobar.gif)
code (http://users.tpg.com.au/adslw8wk/playlist.txt)

if anyone's wondering, the stuff in lower right of screenshot is the output from foo_text to samurize being displayed on a 6inch lcd screen...it has pseudo-scrolling and remaining time display (is there an easy way to get remaining time in 0.666? took me a while)
if anyone's interested, its messy code is available here (http://users.tpg.com.au/adslw8wk/foo_text.txt)
Title: Foobar2000 format strings
Post by: Messer on 2003-08-21 14:55:34
I wanted to print kind of simple "covers" with tracktitles and basic album information, and decided that foobar's database should help me:

1. put the following code as "copy command" formatting
Code: [Select]
//
// the following code is done only for first track in playlist
// it opens html, defines styles etc.
// unfortunately does not work from albumlist...
//
$if(
$strstr($num(%_playlist_number%,10),$num('1',10)),
<HTML>$char(10)
<HEAD>$char(10)
<title>Simple cover generator - v.0.1 for %_foobar2000_version%</title>$char(10)
<meta http-equiv="content-type" content="text/html; charset=utf-8" />$char(10)
<meta name="author" content="Dariusz Sieradzki dsier@pmp.com.pl" />$char(10)
<STYLE type="text/css">$char(10)
.externaltable {width:120mm; height:120mm; border: solid black 1px; margin-bottom:15mm;}$char(10)
.internaltable {width:110mm;}$char(10)
.albumtitle {text-align: left; font-family: lucida console; font-size: 7pt; font-weight:bold;}$char(10)
.tracknumber {font-family: lucida console; font-size: 7pt; border:solid black 1px; vertical-align:top;}$char(10)
.tracktitle {font-family: lucida console; font-size: 7pt; width:100'%'; vertical-align:top;}$char(10)
.tracktime {font-family: lucida console; font-size: 7pt; vertical-align:top;}$char(10)
</STYLE>$char(10)
</HEAD>$char(10)
<BODY>$char(10),
)
//
// the following code is only for first track in album
// it closes previous tables and opens new
//
$if(
$strstr($num(%tracknumber%,10),$num('1',10)),
//
// but this part not for first track in playlist, because there's no previous table
//
$if(
$strstr($num(%_playlist_number%,10),$num('1',10)),,
</table>$char(10)</TD>$char(10)</TR>$char(10)</table>$char(10)
)
//
// external table 12cmx12cm with black border
//
<table class="externaltable">$char(10)
<TR>$char(10)
<TD align="center">$char(10)
//
// internal table with tracks
//
<table class="internaltable">$char(10)
//
// table caption (artist - album - year)
//
<caption class="albumtitle">%artist% - %album% ['('%date%')'] ['('disc %disc%')']</caption>$char(10)
)
//
// code executed for each track
//
<tr>$char(10)
//
// tracknumber
//
<td class="tracknumber">$num(%tracknumber%,2)</td>$char(10)
//
// title, expanded to full width
//
<td class="tracktitle">%title%</td>$char(10)
//
// track time
//
<td class="tracktime">'['$ifgreater($len(%_length%),4,,0)%_length%']'</td>$char(10)
//
// end track
//
</tr>$char(10)
//
// this code is done only at the end of playlist, close last table(s), close html doc
// again - does not work from albumlist
//
$if(
$and(
%_playlist_number%,
$strstr($num(%_playlist_number%,10),$num(%_playlist_total%,10))
),
</table>$char(10)
</TD>$char(10)
</TR>$char(10)
</table>$char(10)
</body>$char(10)
</HTML>$char(10)
)
//
// the end
//


2. add one or more full, properly tagged and sorted albums into your playlist
3. select all
4. right click -> copy name(s)
5. open text editor and paste copied names
6. save it as *.html file
7. open file in html browser (printing in Mozilla seems really b0rked for me, so this time I reccomend MSIE if you want to print your covers)

done

Some dedicated plugin would probably do a better job (if someone feels like coding ), but this solution works nice in most cases.
Title: Foobar2000 format strings
Post by: foosion on 2003-08-21 21:05:07
Quote
Some dedicated plugin would probably do a better job (if someone feels like coding ), but this solution works nice in most cases.

A dedicated plugin for html generation or for cover printing?

Note: I don't feel like coding a cover printing plugin.
Title: Foobar2000 format strings
Post by: Messer on 2003-08-21 21:58:30
Quote
Quote
Some dedicated plugin would probably do a better job (if someone feels like coding ), but this solution works nice in most cases.

A dedicated plugin for html generation or for cover printing?


For cover printing. With possibility to create template (or something) that can be automatically filled with data from foobar's database and sent to printer (or saved in ready to print format).

Quote
Note: I don't feel like coding a cover printing plugin.


Neither do I  That's why I woked out the solution using "copy names" command
Title: Foobar2000 format strings
Post by: amppa on 2003-08-28 12:29:40
OK, finally added support for billcow's wonderful foo_syfm plugin (http://www.hydrogenaudio.org/forums/index.php?showtopic=11808). The conversion seems to be working fine but if there are any errors, be sure to report them, either here or via the feedback form.

The plugin can't currently change fonts, background color or selection colors so they have to be edited manually.

The site can still be found at http://pelit.koillismaa.fi/fb2k/ (http://pelit.koillismaa.fi/fb2k/).
Title: Foobar2000 format strings
Post by: picmixer on 2003-08-28 13:55:27
@amppa

Very nice.  Guess now it's going to be easier then ever for people to change their configs.

Thanks a lot for updating all of our strings with .fb2k files and all the other work put in.
Title: Foobar2000 format strings
Post by: billcow on 2003-08-28 17:55:53
Actually, the incredibly cool part about this, is that the config files are actually generated on-the-fly from the database where the strings themselves are stored. So if you make any changes to your config, it will immediately be reflected in the fb2k file.

I'm not completely sure (I just got up, and didn't think to check this last night when I was helping him get it working), but I'm pretty sure it also finds the translation mode, so if you load up a config with DOS OEM ANSI line-drawing characters in it while your mode is set to Unicode, they will be translated correctly by the plugin.
Title: Foobar2000 format strings
Post by: SacRat on 2003-08-31 14:12:36
Here's my PL format string.
It's used with black BG and green FG color.
Features
Indicates(in formatted form) this information:
-Artist;
-Album;
-Date;
-Tracknumber;
-Title;
-Format;
-Fact of replaygaining: album/title;
-Playback time in MM:SS form with leading zeros.

Distributed freeware for all non-commercial applications as long as original coder gets credits

So, the code...


00FF00|00FF00$num(%_playlist_number%,$len(%_playlist_total%))
.999955|cccc55

$if(%artist%,dd9999|EEAAAA$caps2(%artist%),0000DDUNKNOWN ARTIST)

AAFF55|AAFF99$if(%album%,
- '['
$caps2(%album%[ '('%date%')'][ #$num(%tracknumber%,2)])
']'
,
$if(%tracknumber%, - '[ '['('%date%')' ]#%tracknumber%']',[- '('%date%')'])
)$char(3)$char(3)

$if(%title%, - 55FFFF|55FFFF$caps2(%title%), - $upper(%_filename%))

[- $caps2(%subtitle%)]

[$char(9)
DDDDDD|DDDDDD'('
//format
$upper($info(codec) )

//replaygain info
AAFFFF|AAFFFF
$if(
$info(replaygain_track_gain),T:$if($info(replaygain_album_gain),A,),
$if($info(replaygain_album_gain),A,)
)
DDDDDD|DDDDDD
')'.
00FF00|00FF00
//playback time in MM:SS with leading zeroes format
$num($div(%_length_seconds%,60),2):
$num($mod(%_length_seconds%,60),2)]


byw, if there a way to get FB's total playback time and/or number of files in playlist with their total time?Here's my PL format string.
It's used with black BG and green FG color.
Features
Indicates(in formatted form) this information:
-Artist;
-Album;
-Date;
-Tracknumber;
-Title;
-Format;
-Fact of replaygaining: album/title;
-Playback time in MM:SS form with leading zeros.

Distributed freeware for all non-commercial applications as long as original coder gets credits

So, the code...


00FF00|00FF00$num(%_playlist_number%,$len(%_playlist_total%))
.999955|cccc55

$if(%artist%,dd9999|EEAAAA$caps2(%artist%),0000DDUNKNOWN ARTIST)

AAFF55|AAFF99$if(%album%,
- '['
$caps2(%album%[ '('%date%')'][ #$num(%tracknumber%,2)])
']'
,
$if(%tracknumber%, - '[ '['('%date%')' ]#%tracknumber%']',[- '('%date%')'])
)$char(3)$char(3)

$if(%title%, - 55FFFF|55FFFF$caps2(%title%), - $upper(%_filename%))

[- $caps2(%subtitle%)]

[$char(9)
DDDDDD|DDDDDD'('
//format
$upper($info(codec) )

//replaygain info
AAFFFF|AAFFFF
$if(
$info(replaygain_track_gain),T:$if($info(replaygain_album_gain),A,),
$if($info(replaygain_album_gain),A,)
)
DDDDDD|DDDDDD
')'.
00FF00|00FF00
//playback time in MM:SS with leading zeroes format
$num($div(%_length_seconds%,60),2):
$num($mod(%_length_seconds%,60),2)]


byw, if there a way to get FB's total playback time and/or number of files in playlist with their total time?
Title: Foobar2000 format strings
Post by: nk215 on 2003-09-08 04:54:22
Hi

Can anyone please tell me how I get this:

Code: [Select]
|01|
|02|
|03|
[04] --> last song!!!


I want to put a diferent symbol in the last "tracknumber"

Can anyone help me?

bye
Title: Foobar2000 format strings
Post by: zegilles on 2003-09-08 09:57:41
Quote
Code: [Select]
|01|
|02|
|03|
[04] --> last song!!!


I want to put a diferent symbol in the last "tracknumber"

The only way is to add a custom tag in the last track of each album (LASTRACK=1 for example) and then test it in your format string:
$if(%lastrack%,...
Title: Foobar2000 format strings
Post by: Jan S. on 2003-09-08 10:32:25
Quote
Hi

Can anyone please tell me how I get this:

Code: [Select]
|01|
|02|
|03|
[04] --> last song!!!


I want to put a diferent symbol in the last "tracknumber"

Can anyone help me?

bye

Quote
Just a note for the ones wanting to know the last_track...
if you format your %tracknumber% as "xx/xx" meaning track x of x you can figure out when you got the last track.
Title: Foobar2000 format strings
Post by: SafirXP on 2003-09-08 11:13:30
Quote
//Colors & Variables
$puts(white,FFFFFF|FFFFFF)
$puts(info,60D8FB|60D8FB)
$puts(brac,2F494F|2F494F'|')
$puts(lbrac,2F494F|2F494F'(')
$puts(rbrac,2F494F|2F494F')')

//Playlist Number
CFD6D3|CFD6D3$repeat('0',$sub($len(%_playlist_total%),$len(%_playlist_number%)))
79724B|CFD6D3%_playlist_number%$get(brac)

//Format
97CCDA|76B0BF$upper($right(%_filename_ext%,3))$get(brac)

//Bit Rate
3399FF|3399FF$num(%__bitrate%,3)$get(rbrac)

//Artist
$get(white)
$if(%artist%,$padcut(%artist%,35),$padcut(%_filename%,35))

//Title
$if(%title%,$padcut(%title%,40),$repeat(' ',40))

//Album
   $get(lbrac)$get(info)$if(%album%,$padcut($abbr(%album%,20),20),$repeat(' ',20))
$get(brac)

//Track Number
$get(info)$if(%tracknumber%,$num(%tracknumber%,2),  )$get(brac)

//Date
$get(info)$if(%date%,$num(%date%,4),    )$get(brac)

//Length
$get(white)$pad_right(%_length%,5)


Quote
playlist background ~ RGB(157,157,55)
playlist selection color ~ RGB(120,116,47)
playlist item frame ~ RGB(66,66,23)


(http://safir.perfecttoday.com/sample.gif)
Title: Foobar2000 format strings
Post by: The_Cisco_Kid on 2003-09-08 13:24:41
using a modified version of a post  from penvzila on Mar 14 2003 - have been using this March I believe; worked perfectly for me after a few small changes.
latest shot of 0.7RC13:
(http://www.torlian.net/pics/HA_org_tuff/foobar_shot_8sep03.jpg)
Title: Foobar2000 format strings
Post by: amppa on 2003-09-10 18:11:22
Quote
I'm not completely sure (I just got up, and didn't think to check this last night when I was helping him get it working), but I'm pretty sure it also finds the translation mode, so if you load up a config with DOS OEM ANSI line-drawing characters in it while your mode is set to Unicode, they will be translated correctly by the plugin.

Yes, it should find the correct translation mode.

Added a readme field (to be used with long instructions etc), suggested by upNorth. It would be great if the string owners could cut the long "other info" fields and use this readme feature instead, this would make it more pleasant to browse the styles. I don't dare to do this myself -- the artistic freedom, you know 

http://pelit.koillismaa.fi/fb2k/ (http://pelit.koillismaa.fi/fb2k/)
Title: Foobar2000 format strings
Post by: curian on 2003-09-12 19:42:59
I want to separate the modules for the mirc plugin.
I tried to get the 'module' metadata info from %__extrainfo%

$ifgreater($stricmp($meta(__extrainfo,3),module),0,'module :'%_filename_ext%,)
it is my only idea, but it doesn't work :/
Maybe I misunderstood the usage or meaning of meta fields..

okay I found the problem.. no need for metadata
$ifgreater($stricmp(%__extrainfo%,module),0,'module :'%_filename_ext%,)
Title: Foobar2000 format strings
Post by: hermit22 on 2003-09-14 08:50:06
ALright, this might be a little bit different from what everyone's doing here, since what I'm concerned with is more the sorting of music instead of its display.

Basically, it bugs the crap out of me that artists put "the" in front of their name.  The Cure.  The Smiths.  The Dismemberment Plan.  You get the point.

Now, I could go through and label each mp3 backwards, so it says "Beatles, The"; but that just seems tedious and inelegant.  So I tried the following string, expecting that it would work:

Code: [Select]
$if($stricomp($substr(%ARTIST%, 1, 3), "The"), $substr(%ARTIST%, 5, 10), %ARTIST%) - %ALBUM% -%DISC% - $num(%TRACKNUMBER%,3) - %TITLE%


Basically, it checks the artist, and if the first 3 characters are "the", it skips the space and sorts by the next 5 or so (a workaround; I didn't know how to grab the last part of a string when the string length is unkown - without using an obfuscating length function).  Otherwise, it sorts by the artist, and continues along as expected.

Am I doing this all wrong?  Because it sure seems to not work at all.  I'd really appreciate any help, because I've been tearing my hair out over this one for the past hour or so.
Title: Foobar2000 format strings
Post by: upNorth on 2003-09-14 09:22:46
I only did the first part, but this is what i found:

Change $stricomp to $stricmp (or $strcmp for a case-sensitive version)
Use single quotes around The or remove them completely, you also need to remove the space before the first quote.

Then you'll get something like this:
Code: [Select]
$stricmp($substr(%ARTIST%,1,3),The)
This can be used in the first $if() statement.

Btw: IMO you use too many spaces. I think a good rule is to not make a space unless you want to display it, or you absolutely need it. I'm talking about the space you make after every comma.

Edit:[/i]The whole thing
Code: [Select]
$if($stricmp($substr(%ARTIST%,1,3),The),$substr(%ARTIST%,5,$len(%ARTIST%)),%ARTIST%) - %ALBUM% -%DISC% - $num(%TRACKNUMBER%,3) - %TITLE%

And it works 
Title: Foobar2000 format strings
Post by: anza on 2003-09-14 09:56:31
I use this string to do the same thing:

$replace($left(%artist%,4),'The ',)$right(%artist%,$sub($len(%artist%),4))

It's 10 characters shorter than

$if($stricmp($substr(%artist%,1,3),the),$substr(%artist%,5,$len(%artist%)),%artist%)

so I think you should use it

----
Crap, I just noticed that it doesn't work if you have spelled the "the" all lower case, so maybe upNorth's string is better
Title: Foobar2000 format strings
Post by: playerman on 2003-09-14 12:14:39
There's not much of point to share all of my playlist formatting since it's nothing special. Except maybe for the fact that i use $char(9) instead of pad and padcut; it's just that i prefer my columns with  to be proportional to window with and i prefer to use a proportional font in the playlist.
But my efforts to make its display  minimalistic yet informative has yielded a few bits of code that you may find usefull:

Ultra compact version number display for Main window title:
Quote
$replace($replace($replace(%_foobar2000_version%,foobar2000 v,), beta ,ß), RC,rc)


Fairly compact tech info for Status bar:
Note the leet vorbisvendor thingy which will convert something like this:
"Xiph.Org/Sjeng.Org libVorbis I 20020717 (GTune 3, beta 1)"
to this:
"Xi Sj V0207ß"
It's just that the date compacting will work only up to and including the year 2099, and you may have to add compacting code for other vendor names.
Also note the sample rate display down to the first decimal.
Quote
// codec
$lower([EEEEEE%__codec% ])

// if vorbisvendor
$if(%__vorbis_vendor%,
BBBBBB
$if($strstr(%__vorbis_vendor%,Xiph),Xi ,%__vorbis_vendor%)
$if($strstr(%__vorbis_vendor%,Sjen),Sj ,)
// if libV
$if($strstr(%__vorbis_vendor%,libV),V
$substr(%__vorbis_vendor%,$add($strstr(%__vorbis_vendor%,20),2),
$add($strstr(%__vorbis_vendor%,20),5)
)
$if($strstr(%__vorbis_vendor%,beta),ß , )
,
// if not libV
%__vorbis_vendor%
)
// endif libV

,
// if not vorbisvendor do nothing
)
// end if vorbisvendor


// bitrate
[EEEEEE%__bitrate%$lower(EEEEEE[%__extrainfo%]) ]

// samplerate and channels
[
$div(%__samplerate%,1000).
$left($mod(%__samplerate%,1000),1)
$if(%__channels%,
$ifgreater(%__channels%,2, %__channels%ch,
$ifgreater(%__channels%,1,s ,m )),)
]

// replaygain
[%__replaygain_track_gain%dB ]

// if stream
$if($strstr(%_path_raw%,http),

// blinking indicator stream
$select($add($mod(%_time_elapsed_seconds%,2),1),
00FFFFstream,30B0B0stream)
,
// else - blinking indicator file
$select($add($mod(%_time_elapsed_seconds%,2),1),
00FFFFfile,30B0B0file)
)
// end if stream

// right align last column
$char(9)

// elapsed and total time
EEEEEE[ %_time_elapsed%][ %_time_total%]
Title: Foobar2000 format strings
Post by: musicmusic on 2003-09-14 12:38:59
Quote
Ultra compact version number display for Main window title:
Quote
$replace($replace($replace(%_foobar2000_version%,foobar2000 v,), beta ,ß), RC,rc)

You dont need to pile up $replaces like that, e.g.

$replace(abcd,a,A,b,B) to replace as with As, b with Bs etc.

or for yours $replace(%_foobar2000_version%,foobar2000 v,, beta ,ß, RC,rc)

edit: stupid smileys
Title: Foobar2000 format strings
Post by: upNorth on 2003-09-14 13:01:08
@anza: The good thing with your way is that it looks for a space after the, that's something I would have done myself too. This one was just a fix for hermit22, but I like the idea of this kind of sorting.

When it comes to compact, I like a compact and clean display, but I have to admitt that compact code isn't my cup of tea. I pasted my new playlist formatting in MS Word, and it reports it to be 27412 character long. Seems like I can't tell when enough is enough...   
And it can't even predict the next track I want to hear 

@playerman: I'll borrow that blinking code. Would be great for my 'Paused' indicator 
Edit: The fact that status bar isn't updated when playback is paused ruined that plan.
Title: Foobar2000 format strings
Post by: playerman on 2003-09-14 15:08:33
Quote
You dont need to pile up $replaces like that, e.g.

$replace(abcd,a,A,b,B ) to replace as with As, b with Bs etc.

or for yours $replace(%_foobar2000_version%,foobar2000 v,, beta ,ß, RC,rc)

oh good, undocumented feature. implemented immediately.
Title: Foobar2000 format strings
Post by: hermit22 on 2003-09-14 18:09:30
Thanks upNorth.  I can't believe I missed the 'o' in stricmp.
Title: Foobar2000 format strings
Post by: upNorth on 2003-09-17 23:59:46
Got to keep this thread alive 
I have added a new formatting at foobar2000 formatting strings web site (http://pelit.koillismaa.fi/fb2k/index.php).
It is alot more flexible, and among other things it uses file- and directory names to try to fill in the gaps if tags are missing.

Screenshots:
Album/single mode (hybrid coloring) (http://www.stud.ntnu.no/~mortek/foobar2000/screenshot2.png) Album mode, but with single mode enabled for singles.
Single mode (http://www.stud.ntnu.no/~mortek/foobar2000/screenshot3.png) diplaying some of the optional extra info.

Album mode with the default color scheme and single mode enabled for singles.
(http://www.stud.ntnu.no/~mortek/foobar2000/screenshot1.png)
Title: Foobar2000 format strings
Post by: jormartr on 2003-09-21 16:02:11
Hi,  I am using the dynamic format string by UpNorth, but I have the lines bad aligned, and that happens with other formats similars to this one.
From the fourth song to the end of the album, the song title appear more to the left side than in the first three lines, which have the artist, album and album info.
Does anyone know why this happen?



edit: I wrote with text how appeared in my screen, but when submited the post, did no appear the same as I wrote it
Title: Foobar2000 format strings
Post by: Somebody on 2003-09-21 16:53:00
I love it, upNorth!
Title: Foobar2000 format strings
Post by: upNorth on 2003-09-21 19:07:20
@jormartr: Make sure you use a fixed width font. The recommended one is Lucida Console.

@Somebody: I'm glad you like it 
Title: Foobar2000 format strings
Post by: Linkin on 2003-09-23 18:43:19
i like the page too, but i have a problem with this style:
http://pelit.koillismaa.fi/fb2k/strings.php?f=14# (http://pelit.koillismaa.fi/fb2k/strings.php?f=14#)

1.whats that for a playlist selection color?

2. why does it look like that for me? i mean those strange signs which are supposed to be lines
http://home.arcor.de/jpichler/fb2k.jpg (http://home.arcor.de/jpichler/fb2k.jpg)
Title: Foobar2000 format strings
Post by: DotNoir on 2003-09-23 19:03:40
Are you sure you use the right fonts?

Quote
Playlist font Dotum 8pt
Status bar font Courier New 7pt


Hmmm... on another note... I'm just so damn lazy, so excuse me, but UpNorth... I have a little problem with width of codec and bitrate information, since I have over 1000kbps apes and wavs on my playlist... Or actually the problem is that I have over and under 1000kbps files on the same album... so the formatting goes like this:

[      ]       |
[1000]       |
[      ]       |

You have perfectly tagged code and I tried to modify it, but with no luck... sorry to bother you...

edit^n : UpNorth I really love your code and hard work your doing... So, if you don't have such a problem, don't go and spend your time with this... I can live with it... I was just reporting and when I get enough time I will try and solve it by myself.
Title: Foobar2000 format strings
Post by: billcow on 2003-09-23 20:14:25
Quote
1.whats that for a playlist selection color?


Seeing as I made the config, I oughta be able to answer that methinks. The selection color there is black, same as the background. But there should be others that will also work well, such as rgb(32,32,32) (dark grey), which offers higher visibility. I think the highlight color I used was rgb(64,64,64), but i'm not completely sure.

Quote
2. why does it look like that for me? i mean those strange signs which are supposed to be lines
http://home.arcor.de/jpichler/fb2k.jpg (http://home.arcor.de/jpichler/fb2k.jpg)


Okay, like DotNoir said, it *is* an issue of font. See, you have to find a font that supports those characters. I haven't made a list of all of them, but most of the Unicode fonts should have them. The other problem is that some fonts (for reasons I'm unsure of - probably something to do with a oversized character width and kerning for every character) don't look too great, as there is a small gap at the intersections of the columns. You can kinda see that in the screenshot, but some fonts are much worse.

Incidentally, it also works with fixed-width fonts if you use foo_syfm (shameless plug. you could do it manually i suppose) to convert to ANSI upon load. They probably wont have the gap problem

In any case, the easiest thing to do is load up character map and look at all yer fonts with that - usually the "box-drawing" characters (aka lines and such) show up at the end of the list.

Hope that helped - from the looks of the post it'll probably give you a purty durn nasty headache first though.
Title: Foobar2000 format strings
Post by: upNorth on 2003-09-23 21:33:43
@DotNoir: I don't use apes, wavs and other lossless codecs alot myself, but I have now fixed this (i hope...) for Monkey's Audio and PCM and uploaded it.
Are these wavs you have PCM? If it's anything other than PCM, please tell me the name foobar will identify it by and I'll add it.

Btw: Is there any other codecs where this might be a problem? The problem only arise when the name of the codec is below four characters and the bitrate may exceed 999kbps.

Btw2: Is there any codecs with a two character name in the %__codec% tag?
Title: Foobar2000 format strings
Post by: DotNoir on 2003-09-23 21:56:18
Thank you very much UpNorth... I'm sorry I'm such a lazy bastard that I didn't couldn't think of this solution by myself. Thank you for your great job. Appreciate it very much. Now my playlist is aligned correctly. And yes, those are PCM, but I do'nt have many of wavs, but thought I'd mention them too...

I can't think of any codecs having only two letters, but of course it is possible... hmmmm... xm? modules? What about those? I do'nt have them myself, but just occured while trying to think hard
Title: Foobar2000 format strings
Post by: Lobuz on 2003-09-24 01:34:49
wow !!!
Why didn't I know about so powerfull gui options. Why there's no other formattings in official foobar?

Anyway I have a small feature request to upNorth. 

Could be the one archive file (zip or rar ) taken as whole album or if there are subdirectories those subdirectories treaten as albums. It's In the case when there are no tags. But the names of files have at least 1 common strings of artist and | or album.
The same if tags are messed when it's OST. But it's rather obvious that those files make album.
And if there is only a song name ( without - ) display the name of  directory or archive file for this album.

Or for examle when archive have 9 tracks with proper tags and 3 files without tags I'd like it to be treated as whole album too. And those files have additional numbers (no crossing) of tracks in the names of files.

Could be the folders with file names with proper tracks numbers (but with messed tags) and proper common strings (album and | or artsit) be treaten as full albums?

Those could have a little different  colour to mark that it's not properly taged.

I assume that in album mode the biterate is average for all tracks. Could it be an option to show biterates for every track in album if they are different?

Regards
Lobuz
Title: Foobar2000 format strings
Post by: sony666 on 2003-09-24 02:58:35
I use the standard String, just added

%__codec% %__bitrate%k

on the right side, just before %_length%
There is a slight alignment glitch when playtime is 10:00 or more, but I'm too lazy to fix that
Title: Foobar2000 format strings
Post by: p0wder on 2003-09-24 21:25:03
@upNorth:  Is there any way to disable the "Various Artists" function?  I would just like it to display the title without Various Artists - Title.

Oh yeah, and what is the |A| for on the very right?

(http://www.freewebs.com/djpowder/foo_shot.png)
Title: Foobar2000 format strings
Post by: seezar on 2003-09-24 21:34:15
upNorth,

I'm using your formatting string and love it but one problem is that I cant seem to get the single mode to work. I've gone into the config and "enabled" it as far as I can tell but apparently I'm missing something.
Title: Foobar2000 format strings
Post by: upNorth on 2003-09-24 22:13:50
Quote
Could be the one archive file (zip or rar ) taken as whole album or if there are subdirectories those subdirectories treaten as albums. It's In the case when there are no tags. But the names of files have at least 1 common strings of artist and | or album.
I can't really comment on this as I don't use archives at all (I personally don't see any reason to). But, I think my comments below will apply to this too.

Quote
The same if tags are messed when it's OST. But it's rather obvious that those files make album.
And if there is only a song name ( without - ) display the name of  directory or archive file for this album.

Or for examle when archive have 9 tracks with proper tags and 3 files without tags I'd like it to be treated as whole album too. And those files have additional numbers (no crossing) of tracks in the names of files.

Could be the folders with file names with proper tracks numbers (but with messed tags) and proper common strings (album and | or artsit) be treaten as full albums?

Those could have a little different  colour to mark that it's not properly taged.
I was expecting something like this. To understand how formatting works you can start by reading SatCP's comments for the foobarXP (http://pelit.koillismaa.fi/fb2k/strings.php?f=34) formatting especially "THE ADVANCED PLAYLIST AND ITS PROBLEM":
Quote
Foobar2000 cannot see any relation between two tracks in the playlist. Thus to display the extended album information where several tracks are related to each other (and form an album) we need a work-around
There is also informating about this somewhere in the thread you are currently reading.

The problem with quessing is that there are alot of different ways to name files and directories. After thinking it through and reading this thread File Name Art (http://www.hydrogenaudio.org/forums/index.php?showtopic=7706&st=0&&) I implemented some guessing that hopefully will either make a right guess, or leave it as is. I could have made something that would work very well with my own naming convention, but that might/would result in strange and currupted display for others. Another problem is that implementing something like this and taking it further could IMHO really benfit from/needs more powerful tools like loops ( $while(), $for() ).


Quote
I assume that in album mode the biterate is average for all tracks.
Because of the reasons given above this is only the bitrate for that particular track (in my formatting the third track). It's only an indication, and it's not ideal, but the best that can be done (if you don't want to calculate the average for every album manually and add the result to a tag).

Quote
Could it be an option to show biterates for every track in album if they are different?
This is also impossible because of the reasons above. I use the foo_syfm (http://www.hydrogenaudio.org/forums/index.php?showtopic=11808&) plugin with a shortcut key for Next TAGZ string[/i] to easily switch between different formattings that display different info. Single mode with codec info enabled will show this.


If anything is unclear just ask and I'll try my best to give an answer, but others might be capable of explanationing it better than me.

Btw:I might have a look at archives at some point, but I don't know when, if ever...

Btw2: You are not the first one not understanding how album oriented formattings works at first. It took me some time too... 
Title: Foobar2000 format strings
Post by: upNorth on 2003-09-24 22:39:28
@p0wder: What kind of tags does those files have? Never seen anything like that before. Does the artist tag have the value: "Various Artists"
and the title tag both the name of the artist and the title?

|A| means that a %__replaygain_album_gain% tag is present.
|T| means that a %__replaygain_track_gain% tag is present.


@seezar:
To enable single mode:
Code: [Select]
$puts(album_mode,0)

To enable single mode inside album mode (for files that are not part of an album):
Code: [Select]
$puts(enable_single_mode_view_for_singles_in_album_mode,1)

And have a look at the other settings in the config area. I tried to make them informative, but I don't know if i succeeded...
Title: Foobar2000 format strings
Post by: p0wder on 2003-09-25 00:51:12
The artist tag is "Various Artists".  The title tag has the original artist, then the track name.  My other trance CDs are similar, however, not all have the "Various Artists" artist tag and they work fine.  Here is an example:

(http://www.freewebs.com/djpowder/foo_shot2.png)

I read the readme file and found this:

"*Various artists albums will be recognised if any of these three strings (without quotes) exists in the names of the two closest direcories: 'VA - ', 'v.A.' or 'Various Artists'. Not case-sensitive. "

The name of the directory does have "Various Artists" in it.  I tried renaming the directory leaving out "Various Artists" but this didn't work.
Title: Foobar2000 format strings
Post by: p0wder on 2003-09-25 03:43:53
upNorth, nevermind, I found the problem.  I added a "Performer" tag to the Various Artists albums.  Removing the performer tags fixed the problem, but I also had to remove "Various Artists" from the directory name.  It would be nice if you could disable this function so I can keep "Various Artists" in the directory name.

One more question for you.  What does this setting do?:

$puts(show_trackrating,1)

Thanks for making this format string, by the way.  It rocks!
Title: Foobar2000 format strings
Post by: smok3 on 2003-09-25 11:37:48
my humble (album mode  ) try:
snap
http://users.volja.net/smoker/pub/foobar2000.png (http://users.volja.net/smoker/pub/foobar2000.png)
config
http://users.volja.net/smoker/pub/foobar2000.cfg (http://users.volja.net/smoker/pub/foobar2000.cfg)

edit: singles 'detection' added, you will need to tag all the singles with additional tag 'FOOBAR=single' to make this work, so there is no work if you use album view mostly... (any better ideas on how to do that?),

hybrid snap:
http://users.volja.net/smoker/pub/foobar_hybrid.png (http://users.volja.net/smoker/pub/foobar_hybrid.png)

(you dont need fixed width fonts for this config)
Title: Foobar2000 format strings
Post by: foosion on 2003-09-25 13:36:30
Quote
Another problem is that implementing something like this and taking it further could IMHO really benfit from/needs more powerful tools like loops ( $while(), $for() ).

This would surely give formatting strings more computational power, enough to create a formatting string that does not terminate.
For this reason I'd prefer user-defined, recursive functions, as they will terminate when the stack overflows.
Title: Foobar2000 format strings
Post by: Geezer on 2003-09-26 17:21:52
Thanks guys.

Just uninstalled 0.667 and installed 0.7.

Then went to the formatting site at http://pelit.koillismaa.fi/fb2k/ (http://pelit.koillismaa.fi/fb2k/) and installed a good config.

Smooth!
Title: Foobar2000 format strings
Post by: upNorth on 2003-09-26 17:33:33
Quote
Quote
Another problem is that implementing something like this and taking it further could IMHO really benfit from/needs more powerful tools like loops ( $while(), $for() ).

This would surely give formatting strings more computational power, enough to create a formatting string that does not terminate.

Unleash hell! 

I agree, it's pretty much asking for trouble to add support for something like this. The point I was trying to make was that very complex formatting options needs more powerful tools to be realistic.
Title: Foobar2000 format strings
Post by: foosion on 2003-09-27 09:30:44
Quote
I agree, it's pretty much asking for trouble to add support for something like this. The point I was trying to make was that very complex formatting options needs more powerful tools to be realistic.

Perhaps it may be feasible to use loops that are known to terminate, like
Code: [Select]
// executes y for each meta field with name x
$foreach_meta(x,y)

But I guess, you are longing more for a construct like
Code: [Select]
// executes y x times, where variable z counts up from 1 to x
// modifications of z inside y are ignored
$foreach_n(x,y,z)

I don't know, if Peter will ever implement something like this. If he does, don't blame anyone but yourself, if the following runs slowly:
Code: [Select]
$foreach_n(1000000,<insert elaborate expression here>,n)

Title: Foobar2000 format strings
Post by: mai9 on 2003-10-02 02:48:16
I am trying to use that Blue playlist by UpNorth, I use Win98SE and those graphical characters are replaced by '?' when copy&paste. And Lucida doesn't have graph chars, so I am using Terminal instead.

Here's the problem, I can't make the last tracknumber use a different graph character.


Code: [Select]
//******************************************
//** TRACKNUMBER
//*
$if($strcmp(1,$get(is_album)),

$get(c_frame)$if($strcmp(1,$get(is_last)),'?',$if($strcmp(1,$get(is_first)),'Â','  Ã'))
$ifgreater($get(t_tracknumber),9,
$get(c_trno)$num($get(t_tracknumber),2),
$get(c_trno_dim)0$get(c_trno)$num($get(t_tracknumber),1)
)

$get(c_frame)$if($strcmp(1,$get(is_last)),'??',$if($strcmp(1,$get(is_first)),'Ú ','Ã '))

)

Â, Ã and Ú is what I can see, but it doesn't show any '?' anywhere, and I suppose they should be showed in the last tracknumber.
Title: Foobar2000 format strings
Post by: kode54 on 2003-10-02 04:13:54
Copy the characters you want manually from Character Mapper. If that doesn't work... then I guess it's a problem with Unicode support, or lack thereof.
Title: Foobar2000 format strings
Post by: mai9 on 2003-10-02 07:22:35
Quote
Copy the characters you want manually from Character Mapper. If that doesn't work... then I guess it's a problem with Unicode support, or lack thereof.

yes, I already did that.

Â, Ã and Ú are lines and corners with Terminal font in win98SE.

But I am saying that the '?' characters are not used, and therefore, not seen in the interface.

I smell that '?' characters are the ones to be used in the last track of the album. And it doesn't use them.  Anybody knows why?
Title: Foobar2000 format strings
Post by: kode54 on 2003-10-02 12:11:44
Quote
Quote
Copy the characters you want manually from Character Mapper. If that doesn't work... then I guess it's a problem with Unicode support, or lack thereof.

yes, I already did that.

Â, Ã and Ú are lines and corners with Terminal font in win98SE.

But I am saying that the '?' characters are not used, and therefore, not seen in the interface.

I smell that '?' characters are the ones to be used in the last track of the album. And it doesn't use them.  Anybody knows why?

Whoops, wasn't really paying attention.

You see, his code requires that every last track in every one of your albums have a "LASTTRACK" item in the tag:


Code: [Select]
//last track (decision)
$puts(is_last,$if(%lasttrack%,1,0))
Title: Foobar2000 format strings
Post by: Lyx on 2003-10-02 18:47:02
hmm, i'm trying to do a nice playlist design, but there's one function in the formatting help, which i don't understand:

Quote
$blend(a,b,c,d)
generates a color in c/d between colors a and b


I don't really get the syntax of this function - if i would want to generate a color between black and white (which would be grey), how would the function look like?

Any help on this would be greatly appreciated

- Lyx
Title: Foobar2000 format strings
Post by: musicmusic on 2003-10-02 19:35:53
a and b are colour codes – i.e. 000000.

The colour returned will be in between, or equal to, a or b. Where in between these is decided by c divided by d, which will be a scale of 0 to 1, 0 will return a, 1 will return b.

Example, $blend($rgb(0,0,0),$rgb(255,255,255),%_time_elapsed%,%_time_total%)

As you progress through the song, the colour returned by this function will fade from black to white (use this example on the statusbar)

PS. This is all from memory, may be some discrepancies.

Edit: so if you wanted the colour exactly in between black and white, use

$blend($rgb(0,0,0,0,0,0),$rgb(255,255,255,255,255,255),1,2)
Title: Foobar2000 format strings
Post by: Lyx on 2003-10-02 20:11:35
thank you! I got it  you helped me alot.

I think i might post the results on the fb2k formatting site and give you some credits - but this may take a while, since right now, only the playlist, osd and window-title are done

- Lyx
Title: Foobar2000 format strings
Post by: musicmusic on 2003-10-02 20:45:46
Quote
thank you! I got it  you helped me alot.

No problem

Quote
I think i might post the results on the fb2k formatting site and give you some credits


It was only a small explanation, Im sure you will be writing the rest (well, all) of your strings.
Title: Foobar2000 format strings
Post by: Lyx on 2003-10-02 20:51:44
Well, 99% of the code is written from scratch by me. But i used a small part of upNorth's exellent routine for guessing artist/track-info from the filename (although i have modified most of it).

- Lyx
Title: Foobar2000 format strings
Post by: musicmusic on 2003-10-02 20:57:58
Quote
Well, 99% of the code is written from scratch by me. But i used a small part of upNorth's exellent routine for guessing artist/track-info from the filename (although i have modified most of it).

- Lyx

Hmm i havent looked at his but i wrote my own a few days ago, maybe (hopefully) his is better (ill look now).. i didnt like mine but it works with the untagged files (to guess only artist and title values) i have anyway, which will be sorted/tagged one day...
Title: Foobar2000 format strings
Post by: global on 2003-10-04 05:14:42
G'day all
sorry to make this my first post but, gotta start somewhere...I've read everypage of this thread but havent found the answer..so

any help with fixing the way this looks would be good

Look Here (http://www.boomspeed.com/redrap/ss.jpg) 

~global...TIA
Title: Foobar2000 format strings
Post by: AstreaEdge on 2003-10-04 06:58:39
Set playlist font to "Lucida Console". Set statusbar font to "Lucida Sans Unicode". Read the information provided on the Foobar Formatting site when changing format. Nearly all of the formats on the site detail which fonts to use for the the playlist and the status bar for optimal results.
Title: Foobar2000 format strings
Post by: mai9 on 2003-10-04 08:39:47
Quote
You see, his code requires that every last track in every one of your albums have a "LASTTRACK" item in the tag:


Code: [Select]
//last track (decision)
$puts(is_last,$if(%lasttrack%,1,0))

ok, thanks. Now I understand 
Title: Foobar2000 format strings
Post by: global on 2003-10-04 08:56:02
Quote
Set playlist font to "Lucida Console". Set statusbar font to "Lucida Sans Unicode". Read the information provided on the Foobar Formatting site when changing format. Nearly all of the formats on the site detail which fonts to use for the the playlist and the status bar for optimal results.

Thankyou,Thankyou...all is good now
Title: Foobar2000 format strings
Post by: DustMagnet on 2003-10-05 23:38:14
For those using the FAKETRACK tag to force formatting for albums with missing songs, here's a Masstagger script (useable in Foobar v.7.1 betas) that you might want to use to autonumber the tags:

copy TRACKNUMBER to REALNUMBER
auto tracknumber
copy TRACKNUMBER to FAKETRACK
copy REALNUMBER to TRACKNUMBER
remove REALNUMBER

This has already saved me a lot of work. ;-)

Be sure to save the script so that you need only enter it once.
Title: Foobar2000 format strings
Post by: anza on 2003-10-12 16:21:45
A nice little "now playing indicator" for all of your formattings  Works at least with Lucida Console, not sure about other fonts.

$puts(np,$if(%_isplaying%,YOUR COLOR CODE HERE' '
$select($substr($rand(),1,1),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835))
$select($substr($rand(),1,1),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835))
$select($substr($rand(),1,1),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835))
$select($substr($rand(),1,1),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835))
$select($substr($rand(),1,1),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835),$char(9834),$char(9835)),)
)

edit: typo
Title: Foobar2000 format strings
Post by: MachineHead on 2003-10-12 17:11:11
My one and only meager contribution to this thread.

Code: [Select]
'[color=aqua]'
'[list]'
'[*]' '[color=black]'Foobar2000 is now playing:'[/color]' '[color=blue]'%title%'[/color]'  
'[*]' '[color=black]'From the album:'[/color]' '[color=blue]'%album%'[/color]'  
'[*]' '[color=black]'By:'[/color]' '[color=blue]'%artist%'[/color]'
'[/list]'
'[/color]'


Use in the copy command for what is now playing. (Right click on sys tray icon)

Looks like this:

[/color]

Modify as you see fit.
Title: Foobar2000 format strings
Post by: Burrito on 2003-10-12 17:59:49
I don't like the default foobar playlist with these tabs and "album" information and such...not easy to read, too cluttered.

I prefer Winamps way of a playlist - minimalistic but enough information for me.
I never load all of my songs into foobar and then use it as some sort of "media library" because thats not what it is...its a file player!
Maybe im just one of the old guys around here that prefers to work "file based" instead of "application based".

I changed the default playlist format string be work like Winamps playlist - just better. If no "artist" tag is found, but a "title" tag, it dispays "unknown artist" instead of nothing, like Winamp does.

Just want to help some newbies that just want to have their normal playlist back after the switch to fb.

Code: [Select]
$num(%_playlist_number%,$len(%_playlist_total%)). 
$if(%title%,$if2(%artist%,unknown artist)' - '%title%,%_filename%)
$tab(4)
$if(%_isplaying%,'=> ')
[$pad_right(%_length%,5,0)]
Title: Foobar2000 format strings
Post by: Lyx on 2003-10-12 18:14:36
Hi,

I've added a new Style to the Foobar2000 Formatting Strings Website (http://pelit.koillismaa.fi/fb2k/index.php)

It's called "Gems". Contrary to some other styles, this one has been nearly completely written from scratch(with 2 small exceptions - see the notes on the formatting site).

Have fun
- Lyx


EDIT: OSD-String removed - you can now find it together with the other strings at the fb2k formatting site.
Title: Foobar2000 format strings
Post by: smok3 on 2003-10-12 22:24:56
is there a %_playlist_name% type of tag in 0.7.1 ?
Title: Foobar2000 format strings
Post by: musicmusic on 2003-10-12 22:45:38
Quote
is there a %_playlist_name% type of tag in 0.7.1 ?

In playlist & copy command yes, it is %_playlist_name%.

Not in sort incoming files where i wanted it though
Title: Foobar2000 format strings
Post by: smok3 on 2003-10-13 02:56:46
Quote
Quote
is there a %_playlist_name% type of tag in 0.7.1 ?

In playlist & copy command yes, it is %_playlist_name%.

Not in sort incoming files where i wanted it though 

updated my config, so it uses either playlist name (like pjharvey_single) or additional tag (foobar=single) to display the entire playlist or just the tagged songs as singles.

http://users.volja.net/smoker/pub/foobar2000.cfg (http://users.volja.net/smoker/pub/foobar2000.cfg)
Title: Foobar2000 format strings
Post by: cRoMo on 2003-10-13 14:06:14
UpNorth, is it possible that You add the "bonus track" displaying stuff (as it is implemented in your's "hybrid" formatting) into "dynamic" formatting?
Title: Foobar2000 format strings
Post by: arman68 on 2003-10-13 15:40:39
Quote
Here's a nice bonus - the settings & string for foo_osd which are also visible in the Gems-Screenshot on the fb2k formatting site.

This looks fantastic! And it is a great base for any other OSD. Thanks.

@Kode54: how about using this (or a variation) as the default format string for foo_osd?
Title: Foobar2000 format strings
Post by: musicmusic on 2003-10-13 17:48:35
Lyx: Nice string! But $char(1472) is a hebrew character. If you use the gdi+ version of the osd, that line goes backwards in an odd way, took me a while to work out what was going on..

In fact , colour codes seem to do odd things to the characters too in the gdi+ version.. oh well no gdi+ for me.
Title: Foobar2000 format strings
Post by: Lyx on 2003-10-13 18:15:44
oh, thanks for the report - i don't use the gdi+ version, so i didn't notice it.

I'll look into changing it into another (similiar) char. I did like the char, because it isn't just a vertical dash, but also looks a bit "gem"-ish .

However - i won't change anything to the color-codes, since this would be a major bug in foo_osd gdi+, and no fault of my string.

I'll update this post as soon as i've changed the char-problem.

There will be at least one additional future update of my osd-string - a decent transition in the progressbar, and general tidy up and de-junk the code - but i can't promise when this happens (I've worked far over 100hours on the gem-style. The funny thing is that i usually hate programming and maths *grin* I'm burned out and won't do anything too fb2k-string-like for a while, except for bug-squashing.)

- Lyx

EDIT: char-problem solved and string updated. However, i may be wrong, but it appears that the problem with the char in reality means that foo_osd gdi+ has unicode-problems - so if you have files/tags with unicode-characters, it may be possible that future problems appear. If this happens, use foo_osd in the non-gdi+ version instead.
Title: Foobar2000 format strings
Post by: musicmusic on 2003-10-13 19:12:01
Quote
However - i won't change anything to the color-codes, since this would be a major bug in foo_osd gdi+, and no fault of my string.

Yes i know/wasnt expecting you to change it, it was more of a general comment. I thought it would have parsed out the colour codes anyway, it might be something directly related to the colours / colour changing otherwise.
Title: Foobar2000 format strings
Post by: upNorth on 2003-10-13 19:14:04
Quote
UpNorth, is it possible that You add the "bonus track" displaying stuff (as it is implemented in your's "hybrid" formatting) into "dynamic" formatting?
Done! Contents of the %bonustrack% tag will be displayed after the title in a darker color.
See if it works like you want it to, if not I'm open to suggestions. I originally added this tag to "hybrid" to do what the optional coloring of parentheses does now, so I don't use this myself anymore...


A couple of days ago I also added support for utilizing the playlist name do do what smok3 is talking about a few posts up. Mine ("dynamic") looks for '-s-' (without quotes) in the playlist name as default, but that can be changed in the config area. The presence of this indicator will force single mode for that playlist/tab.
Title: Foobar2000 format strings
Post by: Lyx on 2003-10-13 19:15:56
yep, i didn't take any offense and did know that it was just a (interesting) comment.

Don't know for sure - maybe the gdi+ version has problems with $blend, $transition or combination of both.

- Lyx
Title: Foobar2000 format strings
Post by: musicmusic on 2003-10-13 19:21:12
Quote
yep, i didn't take any offense and did know that it was just a (interesting) comment.

Umm, ok
Quote
Don't know for sure - maybe the gdi+ version has problems with $blend, $transition or combination of both.
Assuming you've seen what i meant about the colour codes, it does weird things to the spacing, i dont see why not, but i cant be bothered to test
Title: Foobar2000 format strings
Post by: smok3 on 2003-10-20 13:33:15
latest greatest
http://users.volja.net/smoker/pub/foobar2000.cfg (http://users.volja.net/smoker/pub/foobar2000.cfg)
snapshot
http://users.volja.net/smoker/pub/foobar2000.png (http://users.volja.net/smoker/pub/foobar2000.png)

3 modes of display:
1. album (default)
2. single (either missing album or artist tags, tagged with additional tag 'foobar=single' or playlist name includes 'single' , like 'pj_singles')
3. various artists (either tagged with 'foobar=va' or 'various=1' or directory name includes 'va-')

p.s. the 'square' curve is there only to give a visual feedback about the correct ordering when in album mode.
p.s.2 playlist font = Lucida Sans Unicode (but can be anything you want)

edit: updated to be compatible with freedb tagger plugin, also colors are now configurable in the header of the playlist. (not tested very much at this point)

(http://users.volja.net/smoker/pub/fb2k_inline.png)
Title: Foobar2000 format strings
Post by: cRoMo on 2003-10-25 10:44:01
Quote
Done! Contents of the %bonustrack% tag will be displayed after the title in a darker color.

Well, it works, but still not the way it used to do in Hybrid formatting. All the bonus songs in my albums collections are tagged like this: %bonustrack%=yes. In this case Your formatting displays "yes" after the title name of bonus track in playlist. The Hybrid would display the predefinied text instead of tag's content, for example ": BONUS :". So my idea for You is to make Your formatting to display that predefinied text instead of tag's content.

PS. Sorry for such a big delay in answering, have been busy recently
Title: Foobar2000 format strings
Post by: panzemeyer on 2003-10-25 11:03:11
Quote
I don't like the default foobar playlist with these tabs and "album" information and such...not easy to read, too cluttered.

I prefer Winamps way of a playlist - minimalistic but enough information for me.
I never load all of my songs into foobar and then use it as some sort of "media library" because thats not what it is...its a file player!

Funny, the very reason why i'm using foobar is because it allows me to play files and browse through my entire audio collection without switching from a file explorer to a player on and on. Plus, its unique sorting capabilities, which you obviously can't fully benefit if you only load a few files at a time in foobar 
Title: Foobar2000 format strings
Post by: upNorth on 2003-10-25 11:47:39
@cRoMo: I have updated "dynamic", please test it and see if it does what "hybrid" used to do, and what you would like it to do. I have changed it to display *Bonustrack* if a %bonustrack% tag is present and the contents of the tag doesn't matter...
Title: Foobar2000 format strings
Post by: cRoMo on 2003-10-25 16:23:32
@upNorth: Thanks! Work's great now. Seems that You've a perfect formatting, at least it is perfect for me 
Title: Foobar2000 format strings
Post by: Burrito on 2003-10-25 16:41:55
Quote
Funny, the very reason why i'm using foobar is because it allows me to play files and browse through my entire audio collection without switching from a file explorer to a player on and on. Plus, its unique sorting capabilities, which you obviously can't fully benefit if you only load a few files at a time in foobar 

Ahh, yes. Forget to mention it...i changed the sorting of foobar back to "%_filename%", because it annoyed the hell out of me if it tried to sort untagged/bad tagged files and got the play order all wrong.

What people are trying to do here with playlist formating is, imho, trying a program to do what it was never designed to do in the first place...eg. the use of fixed width fonts to allow them to "hack together" a table of files sorted by album...would never work with my badly tagged files!

It is just the oldschool way i'm using windows that shines thru here. Explorer is always open anyway, because i do so much with it.

How i said before..my way of using windows is more file and less app-based.
I might be able to overcome my habits handling files the day foobar gets a real "Media Library", though... 

With "unique sorting capabilities" you mean "Sort incoming files by:", right?

Everyone his own foobar, i would say. 
Title: Foobar2000 format strings
Post by: quazi on 2003-10-27 03:32:23
upNorth, after using your 'dynamic' format for the past 16 hours or so (as long as I've had foobar  ), I noticed something.  Your concept of eliminating repetitive data is very nice (grouping the artist, album, genre, etc., and replacing it with 'white space' on the left), but I'm curious why you didn't cluster it by artist as well?

Code: [Select]
-------[Artist]-------+-----------[Album]-------+01+-track01---------------
                      |MP3      [year] Genre    |02| track02
                      |192                      |03| track03
                      |VBR                      |04| track04
                                                |05| track05
                                                |06| track06
                      +------[Another Album]----+01+-track01---------------
                      |MP3      [year] Genre    |02| track02
                      |192                      |03| track03
                      |VBR                      |04| track04
                                                |05| track05
                                                |06| track06
-------[Artist]-------+-----------[Album]-------+01+-track01---------------
                      |MP3      [year] Genre    |02| track02
                      |192                      |03| track03
                      |VBR                      |04| track04
                                                |05| track05
                                                |06| track06


(http://www.tinkafoo.com/temp/foobar-small.gif) (http://www.tinkafoo.com/temp/foobar-fullsize.gif)

It would shift most of the data to the right, and move the 'white space' (which is currently colored black) to the left side under the artist -- which would be listed for the first album instead of all of them.

I can see how this would be a problem though:
- If the artist has enough tracks, and you scroll far enough, you could be in a situation where you won't see the artist's name anywhere on screen.
- Since the second album's title is longer than the others, you would have to adjust all albums for the sake of consistency.
- (an inherent problem) If I scramble this playlist, the layout won't make any sense whatsoever.
- Also, how many people really use foobar fullscreen in 1280x960?

(aside from this minor criticism, thank you for an excellent format!)
Title: Foobar2000 format strings
Post by: DotNoir on 2003-10-27 06:14:59
AFAIK there's no way disabling the artist the way you want, because the format strings are album/tracknumber specific, so the album tag is eliminated by examining the tracknumbers. And like I said before there's no way that I know to disable repeating artist tags. I might be wrong, but I'm quite sure about this.
Title: Foobar2000 format strings
Post by: curian on 2003-10-27 19:21:26
Hi!

For example I have a directory structure like C:\dir\di1\dir2 etc...
What shall I do if I want to get the directory from dir1.
I want to cut off the first two levels.
but I dont know how many levels should I cut off, it depends on the current track in its directory.

I can't figure out a good code 
Title: Foobar2000 format strings
Post by: kode54 on 2003-10-27 22:09:23
RTFM? :B



$directory() on %_path%


Quote
Quote
Don't know for sure - maybe the gdi+ version has problems with $blend, $transition or combination of both.
Assuming you've seen what i meant about the colour codes, it does weird things to the spacing, i dont see why not, but i cant be bothered to test

Please elaborate. I am not having a problem with that character and GDI+, so I assume you must have changed the code in some way.
Title: Foobar2000 format strings
Post by: billcow on 2003-10-28 02:39:45
Actually, if you want to kludge things again (ah, gotta love that word. strikes terror into the hearts of all who hear it  ), you can show only the first artist. Just use some additional tag %firstalbum% or something for the first album by each artist. Yeah, it's a pain, but so is adding %lasttrack%, am I right?
Title: Foobar2000 format strings
Post by: stripe on 2003-10-28 03:51:35
While fb's playlist system is really powerful, it could use a lot of improvement as well.  For me the best example of this is how one of the most common organizational features is based on a 'hack'. (using the tracknumber to selectively show data)

Some kind of integration of the album list component into to the actual playlist structure would add a TON of flexibility.  Or of course global variables would make for some infinitely more friendly looking playlists.

stripe/ben
Title: Foobar2000 format strings
Post by: bidz on 2003-10-28 19:30:31
@upNorth:

In non-album mode, the bitrates of the MPC files are not shown - here's a screenshot (look on the bottom):

(http://home.c2i.net/bidz/pics/fb2k2.jpg)

Is it possible to fix this? - I'm using Foobar2000 0.7.2 and your latest updated format strings..
Title: Foobar2000 format strings
Post by: upNorth on 2003-10-28 21:28:05
@bidz:
Thanks for your feedback. I have fixed it and uploaded a new version, please tell me if it didn't do the trick. As I encode my musepack files with the standard profile I have not seen this obvious problem in my code before now.
I also improved the codec related code a little i general.


Btw: Any feedback is appreciated as it's hard to make sure all possible variations works as they should.


Edit: Spelling
Title: Foobar2000 format strings
Post by: Rasi on 2003-10-28 23:42:32
i dont even know how to enable non-album-view... thought it would recognise automatically what to use, but it doesnt obviously... anyone can help?
Title: Foobar2000 format strings
Post by: smok3 on 2003-10-29 02:10:02
Quote
i dont even know how to enable non-album-view... thought it would recognise automatically what to use, but it doesnt obviously... anyone can help?

depends entirely on specific playlist script. (with my config it is either missing album or artist tags, tagged with additional tag 'foobar=single' or playlist name includes 'single' , like 'pj_singles')
Title: Foobar2000 format strings
Post by: bidz on 2003-10-29 04:55:12
Quote
@bidz:
Thanks for your feedback. I have fixed it and uploaded a new version, please tell me if it didn't do the trick. As I encode my musepack files with the standard profile I have not seen this obvious problem in my code before now.
I also improved the codec related code a little i general.


Btw: Any feedback is appreciated as it's hard to make sure all possible variations works as they should.


Edit: Spelling

Yep, worked fine now  superb!.. thanks!
Title: Foobar2000 format strings
Post by: curian on 2003-10-29 09:33:36
I've tried $directory(%_path%) already, but it extracts only the n-th directory in the structure, but I need every dir from the given level.
'drive:\firstdir\' should be cut off, and everything above this should be displayed.
Title: Foobar2000 format strings
Post by: DotNoir on 2003-10-29 09:49:08
Then you have to use something like this

Code: [Select]
$replace(%_path%,F:\mp3\,)


or well, a you have to manually enter every [drive letter]\[directory]

Code: [Select]
$replace($replace($replace(%path%,d:\blaa,),e:\blaa,),f:\blaa,)

edit as stated on another thread... this should work the same as above
Code: [Select]
$replace(%path%,d:\blaa,,e:\blaa,,f:\blaa,)
Title: Foobar2000 format strings
Post by: upNorth on 2003-10-29 11:01:22
Quote
I've tried $directory(%_path%) already, but it extracts only the n-th directory in the structure, but I need every dir from the given level.
'drive:\firstdir\' should be cut off, and everything above this should be displayed.

You can try one of these:

Without filename:
Code: [Select]
$puts(PATH,$replace(%_path%,%_filename_ext%,))
$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\'))))
$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))


With filename (and extension):
Code: [Select]
$puts(PATH,$right(%_path%,$sub($len(%_path%),$strchr(%_path%,'\'))))
$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))


Remove 0-5 levels without filename:
Code: [Select]
$puts(Remove_X_levels,4)
$puts(PATH,$replace(%_path%,%_filename_ext%,))
$ifgreater($get(Remove_X_levels),0,$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))),)
$ifgreater($get(Remove_X_levels),1,$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))),)
$ifgreater($get(Remove_X_levels),2,$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))),)
$ifgreater($get(Remove_X_levels),3,$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))),)
$ifgreater($get(Remove_X_levels),4,$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))),)
$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))
Select the number of levels/directories to remove in the first line.
If you want the filenames too, change the second line to:
Code: [Select]
$puts(PATH,%_path%)




Edit: Minor change in the first code
Edit 2: Added the 0-5 code. I've got to stop now...
Title: Foobar2000 format strings
Post by: DotNoir on 2003-10-29 11:41:46
and as always we can count on UpNorths help... that's (again) a nice piece of code, man... Damn you're good.
Title: Foobar2000 format strings
Post by: MachineHead on 2003-10-31 14:32:29
Quote
My one and only meager contribution to this thread.

Code: [Select]
'[color=aqua]'
'[list]'
'[*]' '[color=black]'Foobar2000 is now playing:'[/color]' '[color=blue]'%title%'[/color]'  
'[*]' '[color=black]'From the album:'[/color]' '[color=blue]'%album%'[/color]'  
'[*]' '[color=black]'By:'[/color]' '[color=blue]'%artist%'[/color]'
'[/list]'
'[/color]'


Use in the copy command for what is now playing. (Right click on sys tray icon)

Looks like this:

  • Foobar2000 is now playing: Black Star 

  • From the album: Swansong 

  • By: Carcass
[/color]

Modify as you see fit.

Can someone offer a suggestion on how to I would go about modifying this for currently playing and queued files in the copy command?

What I'm looking for is how to make fb2k use the copy command for the, 'What are you listening to now?', thread. I pasted a small playlist lastnight but it seems a bit skewed when you look at it. Obviously, all the tracks cannot be playing at the same time.

Would it even be possible to assign a certain copy command for the currently playing track, and have a different set of copy commands for the queued files?

And by queued I Mean simply selecting tracks from a playlist > R-Click and copy names. Then a paste to the forum.

I thought that it should look something like this:

[/color]

And next up is:

[/color]
[/color]
[/color]
[/color]
[/color]


Note: I manually entered the will be here in the forum. I'd like to just be able to use some sort of string to capture this info.

Any suggestions appreciated.
Title: Foobar2000 format strings
Post by: foosion on 2003-10-31 17:28:00
@MachineHead:
Assuming you use Default order, you could select some tracks starting with the currently playing. Then you can detect the currently playing one with %_isplaying%, every other track will be in the 'up next' queue.
The structure of the code is like this (output strings are quoted for clarity):
Code: [Select]
'foobar2000 '$if(%_isplaying%,'is now','will be')' playing '

// rest of track info, I suggest you modify this :)
%artist% '['%album% #%tracknumber%']' %title%$char(10)

$if(%_isplaying%,
'And next up is:'$char(10)
,)

Of course you still need to add some formatting code to make it look good. However, there is one disadvantage: The 'And next up is:' will show even if there is only one track in the selection.
Title: Foobar2000 format strings
Post by: MachineHead on 2003-11-01 13:14:44
foosion,

Thanks for the tips. Still trying to get it just right, but the results look like this now:

[/color]
[/color]
[/color]
[/color]


Not sure whether it is a forum thing, or the copy command itself, but without 'listing' the 'Followed By:' spacing is off, ie: No indent. Still trying to figure the html on this particular forum for adding a space without the bulleted list.

One other spacing issue is the large gap between 'Followed By:' and the next item in the playlist.

At any rate, thanks again.

For anyone interested, (LOL!), here is the code:

Code: [Select]
'[color=GRAY]'
'[list]'
'[*]'
'[color=black]' '[b]'Foobar'[/b]' '[/color]' '[b]'
'[color=GRAY]' '[i]'2000'[/i]' '[/color]' '[/b]'
'[color=BLACK]' '[b]' $if(%_isplaying%,'is now') 'playing:' '[/b]' '[/color]'
'[color=BLUE]' '[b]' %title%$char(10) '[/b]' '[/color]'
'[*]'
'[color=black]' '[b]'From the album:'[/b]' '[/color]'
'[color=BLUE]' '[b]'%album%'[/b]' '[/color]'  
'[*]'
'[color=black]' '[b]'By:'[/b]' '[/color]' '[color=BLUE]' '[b]'%artist%'[/b]' '[/color]'
'[/list]'
$if(%_isplaying%,'[color=BLACK]' '[list]' '[*]' '[b]' 'Followed By:' '[/b]' '[/list]' '[/color]'$char(10),)
'[/color]'


Copy and paste into fb2k's Copy Command. Would highly recommend selecting no more than few songs from a playlist. Otherwise you may run into problems with a tremendously large post in the forum. Which in turn could give the forum spastic seizures.

Modify as you see fit. 
Title: Foobar2000 format strings
Post by: fantomex on 2003-11-02 18:40:45
hello, i'm wondering if someone would please help me to get foobar to display total track length of all selected files like in older versions? i don't really want to learn to hack my own format strings...
Title: Foobar2000 format strings
Post by: musicmusic on 2003-11-02 19:16:31
Quote
hello, i'm wondering if someone would please help me to get foobar to display total track length of all selected files like in older versions? i don't really want to learn to hack my own format strings...

tried prefs / display / default user interface / show total time of selected tracks

or do you want it in the actual scripted/title formatted part of the status bar (which wasnt possible last time i checked)?
Title: Foobar2000 format strings
Post by: fantomex on 2003-11-02 20:19:36
i guess a combination, because i thought it was part of the formatting for the status bar..
but there it was! thanks a lot.. stupid of me
Title: Foobar2000 format strings
Post by: curian on 2003-11-10 00:18:16
@UpNorth
Thanks a lot :>
Title: Foobar2000 format strings
Post by: Sergio on 2003-11-10 11:52:31
I get these random (or so they appear to me) indentations in the playlist.

http://sergio.swordsmennet.com/images/form...attingerror.gif (http://sergio.swordsmennet.com/images/formattingerror.gif)
It occurs two times throughout the two Forrest Gump soundtrack disks.

What causes this to occur and how can I fix it?

Another unrelated question, how can I format it so that is gives the "artist - song title" instead of just the title? It also displays the artist of the first song as the album artist.
Title: Foobar2000 format strings
Post by: DotNoir on 2003-11-10 13:27:03
Quote
I get these random (or so they appear to me) indentations in the playlist.

http://sergio.swordsmennet.com/images/form...attingerror.gif (http://sergio.swordsmennet.com/images/formattingerror.gif)
It occurs two times throughout the two Forrest Gump soundtrack disks.

What causes this to occur and how can I fix it?

Another unrelated question, how can I format it so that is gives the "artist - song title" instead of just the title? It also displays the artist of the first song as the album artist.

You might have different genres in your files through the album, that changes the padding... Select them all and right click, choose show file info (multiple items) and look every field that has (varies/unchanged) if genre or some other "static" field has that, you have to change it to the same... Unless it's a various artists compilation, then artist can be like that too. Also check if you have accidentally put something else than a number in your tracknumber field (somehow I managed to do this with improper "guess values from filename" string)

And if you have a various artists compilation, write a tag called "various" and put it as "1" or something (I leave it blank myself)

Hmmm... Hope I am of help...

edit: And now that I looked at the picture again, your problem is the various collection thing... It is displaying the artist in from of the song, well, no it's not, but still it is, so put a VARIOUS-tag to those files
Title: Foobar2000 format strings
Post by: JohnnyLC on 2003-11-14 07:30:42
I'm using the "dynamic" title format by upNorth (thanks upNorth~), but there's a problem...
It cannot align the double-width characters correctly, I have enabled "Count double-width characters as two regular characters" in foobar preferences, but that still doesn't work.

Here's the playlist
http://www.luckywayinc.com/images/fb-str_w..._width_prob.png (http://www.luckywayinc.com/images/fb-str_width_prob.png)

Does anybody know how to solve this problem?
Thanks~ 
Title: Foobar2000 format strings
Post by: billcow on 2003-11-15 04:55:38
Have you tried the setting to count double width characters *and* "ambiguous" characters as two characters? Could be your locale settings or some random font-related bug screwing it up.
Title: Foobar2000 format strings
Post by: JohnnyLC on 2003-11-15 05:42:55
Yeah, I actually also tried "Count double-width characters and ambiguous characters as two regular characters"...

What might be the problem in locale settings, I choose Chinese for Language for non-Unicode programs in Regional and Language Options (I'm using English Windows XP).

Thank you~ 
Title: Foobar2000 format strings
Post by: billcow on 2003-11-15 21:45:24
Actually, the reference to locale settings was more of an explanation for why the ambiguous characters setting might help than another theory. Aside from that I'm out of ideas. The closest I've ever come to using a different language in windows is setting my keyboard to use a Dvorak layout.
Title: Foobar2000 format strings
Post by: greenirft on 2003-11-18 07:09:42
Full screenshot of Fb2k
http://css.engineering.uiowa.edu/~mdpotter...r/fb2k/full.png (http://css.engineering.uiowa.edu/~mdpotter/fb2k/full.png)

Config
http://css.engineering.uiowa.edu/~mdpotter.../greenrift.fb2k (http://css.engineering.uiowa.edu/~mdpotter/fb2k/greenrift.fb2k)

I believe that the Playlist formatting is all my own. About the only thing unique about it is that I almost remove (but not completely) the artist and album after the 1st track has been displayed, also artists starting with "The ..." are now "..., The". Eventually I plan on working that part into my sort string. Compliation CD's don't display %artist%, only %trackartist% (%artist% is set to Various Artists for compliations. They also have a %various% == 1 tag in them). Single tracks (those of which I do not have a full album) are tagged with a %singletrack% == 1 tag so that only the artist and the title are shown (or, if no artist, just the title).

The systray formatting (http://css.engineering.uiowa.edu/~mdpotter/fb2k/systray.png) is also my own. On %singletrack% == 1 it doesn't display anything other than artist and title. On %various% it does not display artist but does display trackartist on the same line as title.

The status bar is taken from someone else and slightly modified I think. Can't tell you where exactly because I don't remember, but upNorth is probably a good guess.

I've been slowly tweaking it, getting closer and closer to perfect. There are some other things I might eventually add, but I probably won't mess around with the config for atleast a few more days.
Title: Foobar2000 format strings
Post by: aron on 2003-11-27 06:03:36
Quote
Got to keep this thread alive 
I have added a new formatting at foobar2000 formatting strings web site (http://pelit.koillismaa.fi/fb2k/index.php).
It is alot more flexible, and among other things it uses file- and directory names to try to fill in the gaps if tags are missing.

Screenshots:
Album/single mode (hybrid coloring) (http://www.stud.ntnu.no/~mortek/foobar2000/screenshot2.png) Album mode, but with single mode enabled for singles.
Single mode (http://www.stud.ntnu.no/~mortek/foobar2000/screenshot3.png) diplaying some of the optional extra info.

Album mode with the default color scheme and single mode enabled for singles.
(http://www.stud.ntnu.no/~mortek/foobar2000/screenshot1.png)

upnorth:

how were you able to get the playlist to display the last track of an album like that? (with the ascii line like: |_)

on my playlist, it simply ends with a "|"

is there some kind of way that it knows what the last track is?
Title: Foobar2000 format strings
Post by: picmixer on 2003-11-27 07:55:01
You will need a "lasttrack" tag on every of your lasttracks of an album.

Simply set it to yes or something similar.  The main thing that is important is that it's present, so that the formattig will recognize it as the last track of an album.
Title: Foobar2000 format strings
Post by: upNorth on 2003-11-28 22:06:06
@anon: Another solution apart from the one suggested by picmixer, is to format your tracknumbers like this: xx/xx or xx\xx.

Scrolling text in playlist
I have just finished small, general purpose code for making text scroll in playlist. It might be useful for anyone with a column based formatting. I don't know if this is old news, but I just realized yesterday that %_time_elapsed% is now supported in playlist too. This was not the case when I wanted to make an animated "now playing marker" some time ago.

It could have been more compact, but I left it like this for readability.

Code: [Select]
//*****************Code to make text scroll in playlist********************
// Usage:
//                "input"   - the tag or variable you would like to scroll.      
//                "length" - the total visible width (e.g. the width of the column)
//                "step"    - scroll speed (number of characters to jump for each step)
//                "space"  - sets the minimum space before it start over again.      
//                "pause"  - number of secounds between rounds      
//                "smart"   - only scroll when needed (1=yes, 0=no)
//*************************************************************************
//---START OF CONFIG---
$puts(input,%album%)
$puts(length,20)
$puts(step,2)
$puts(space,6)
$puts(pause,3)
$puts(smart,0)
//----END OF CONFIG----

$if($and(%_isplaying%,$or($strcmp(0,$get(smart)),$and($strcmp(1,$get(smart)),$greater($len($get(input)),$get(length))))),

//add spacing to the end and make sure it's long enough
$puts(input,$pad($get(input)$repeat(' ',$get(space)),$get(length)))

//create counter
$puts(counter,$mul($get(step),$mod($right(%_time_elapsed%,2),$add($get(pause),$div($len($get(input)),$get(step))))))

//create output
$puts(front,$cut($get(input),$get(counter)))
$puts(end,$right($get(input),$sub($len($get(input)),$get(counter))))
$puts(output,$padcut($get(end)$get(front),$get(length)))
,
$puts(output,$padcut($get(input),$get(length)))
)

//**************************END OF CODE************************************

//Test output
$padcut(%artist%,15)'│ '$padcut(%title%,20)'│ '$get(output)'│'

The part after END OF CODE is just for testing and should be removed if you want to use this code in your own formatting string. Use $get(output) to get the result.

Btw: I have done some testing, but I might have overlooked some bugs. 

Edit: Added this to my "dynamic" formatting string (http://pelit.koillismaa.fi/fb2k/strings.php?f=40). Album title in "single mode" will scroll if it is too long to fit in the column.
Title: Foobar2000 format strings
Post by: siorin on 2003-12-01 04:47:01
Can I show playlist total time and total number of songs in main window title or status bar? (like iTunes)
I know if I selected all songs of playlist it show total play time,But I don't like this way.
And I know also %_playlist_total% this works only playlist.
Title: Foobar2000 format strings
Post by: haloeight on 2003-12-01 17:29:26
I've got a question for you formatting gurus.

Is there any way to get the title of a stream being played , instead of just the address being displayed?

My playlist string is simple (I like it this way), its just set to display filenames, and adjusts itself for cue files, but I'd like it if the name of a radio station were displayed rather than IP addresses and ports. I couldn't find a tag in the help to display the title of what's being played.

The station is proton radio (http://www.protonradio.com/index.php). At the top of the screen they have a real time display of what's being played with the name of the show & artist...is there any way to get that to display in foobar?

here's a copy of my playlist string if its at all helpful.

Code: [Select]
$num(%_playlist_number%,3). $if($strcmp($ext(%_path%),cue),[%_subsong% - %artist% - %title%],%_filename%)[$char(9)%_length%]
Title: Foobar2000 format strings
Post by: gwaihir on 2003-12-01 18:51:41
@upNorth :
Firstly, thank you for the elegant formatting string. It ROCKS!!

Besides the regular tags (I currently use Artist, Album, Title, Genre, Date, Comment, Track Number fields) what other tags do I need for proper formatting display using your formatting string.

Just discovered APE tags. So, what other tags do I need and how do I implement it?
Title: Foobar2000 format strings
Post by: upNorth on 2003-12-01 19:14:18
@poorimpulsectrl: I might be wrong, but this is what I think you need to do:
First of all, enable this:
Preferences->Display->Show dynamic info (........
and this:
Preferences->HTTP Reader->Enable dynamic track titles

I guess that will make no difference with your current formatting as you don't use %artist%, %title% and %station%, but you can try this modified version I just put together or just add those tags.
Code: [Select]
$num(%_playlist_number%,3)'. '

$if($strstr(%_path_raw%,'http://'),$if2(%artist%' - ',)$if2(%title%,),

$if($strcmp($ext(%_path%),cue),
$if2(%station%': ,')$if2(%_subsong%' - ',)$if2(%artist%' - ',)$if2(%title%,)
,
%_filename%
)

$char(9)$if2(%_length%,)
)
It seems to work, but no guarantee 
Title: Foobar2000 format strings
Post by: haloeight on 2003-12-01 19:47:50
Thank you upNorth. I actually have those options checkmarked but without the correct tag (I'm assuming %station%) it just shows the IP address. I just replaced my playlist string with the one you provided, but nothing ended up showing up for the station. The ip addresses were removed but I take it this means Proton doesn't put in their playlists what's playing currently or their name and this is why it's not showing up.
Title: Foobar2000 format strings
Post by: upNorth on 2003-12-01 19:57:34
Quote
Thank you upNorth. I actually have those options checkmarked but without the correct tag (I'm assuming %station%) it just shows the IP address. I just replaced my playlist string with the one you provided, but nothing ended up showing up for the station. The ip addresses were removed but I take it this means Proton doesn't put in their playlists what's playing currently or their name and this is why it's not showing up.

This is what that formatting string displays here:
Quote
003. Proton Radio - Particles (07-06-2003) Part 3 - House
So I guess it's like this:
%station% = Proton Radio
%artist% = Particles (07-06-2003) Part 3
%title% = House
Title: Foobar2000 format strings
Post by: haloeight on 2003-12-01 20:27:41
Strange. I wonder what's going wrong on my end here. I'll try again ... it just displays question marks where "Proton Radio" is displaying for you, then nothing beside that (just a blank)

edit : if I just put in %artist% , it shows the name of the show playing. But not if I just click on the playlist. I have to go into my title formatting, click the apply button and then it shows up. Even after restarting the player and only having the %artist% tag in there as the sole tag. %station% doesn't seem to want to do anything.
Title: Foobar2000 format strings
Post by: R@M on 2003-12-02 20:54:48
Here is my formating string for streaming radio. It i is not finished,  but it does it's work. it has a little workaround for the problem mentioned above.

Code: [Select]
//  Playlistformat for internet-radio-stations
//  Custom tags for non-streaming info:
//  bitrate       --> Bitrate of stream in kbps
//  codec        --> MP3, MP3Pro, Vorbis
//  channels   --> Number of channels
//  station      --> Name of station
//  url             --> Homepage of station or stream url (btw. if you call stream url in your
//                          Browser, you will get the status page of the station)
$num(%_playlist_number%,4)
$if(%_isplaying%,1F23D1>>,  )
$if(%artist%,FF6262$padcut(%artist%,35),1C67D9$padcut(%station%,35))
 |

E6C07B|FF9393
FF6262$if(%artist%,$if($strcmp($substr(%artist%,3,$len(%artist%)),%title%),$padcut(
$substr(%artist%,36,$len(%artist%)),30),$padcut(%title%,30)),1C67D9$padcut(%url%,30))
 |
3333E1
$puts(%cod%,$if2(%__codec%,%codec%))

$if($strcmp($lower($get(%cod%)),mp3pro),PRO,$if($strcmp($lower($get(%cod%)),vorbis),OGG,$padcut($get(%cod%),3)))
$num($if2(%__bitrate%,%bitrate%),3) kbps Ch: $if2(%__channels%,%channels%)

$if(%_isplaying%,1F23D1<<,  )
$char(09)FF4A4A%genre%


Editt: code updated a bit . For stations, that streams titles like Proton Radio,  %artist% is continued in %title% column.

Cya(o) Rainer
Title: Foobar2000 format strings
Post by: MachineHead on 2003-12-03 02:35:40
Any chance of finding out how to replace upNorth's dynamic playing now marker with the note symbol from crni's formatting? And as long as I'm at it, changing it to blue.

Heh - blue note...
Title: Foobar2000 format strings
Post by: ginipig1 on 2003-12-03 06:00:52
Okay, I'm absolutely *new* to foobar, and all things post-winamp.mp3. Although I'm a quick learner, and ripping-encoding(mpc.aac.ape) came easily to me, I'm finding difficulty in coding format strings. I've read the help file contained within foobar.directory, but I can't really make sense of it all.

My questions are:
1) How long did it take you guys to actually get a firm grasp of coding format strings?
2) In light of the *incredible* screenshots on http://pelit.koillismaa.fi/fb2k/index.php (http://pelit.koillismaa.fi/fb2k/index.php), how do I arrange it so that artist's tracks are grouped together, rather than by album?

By the time I'd compiled a lengthy list of mp3's, I realized that it was too late to freedb/musicbrainz every single mp3 I owned, and am thus paying for it in 'lack-of-album-details'-iosis. It's okay, since I'm a simple kind of person (read: simple, not ignorant.) But I'd really appreciate it if somebody gave me some pointers getting to the following stage:

-artist-        trackname          encode.method          time          replaygain
...........        trackname          encode.method          time          replaygain
...........        trackname          encode.method          time          replaygain

etc.

Much thanks, in advance

edit: trackname line didn't belong in artist column
Title: Foobar2000 format strings
Post by: einniow on 2003-12-03 13:22:56
MachineHead> paste symbols from character map software (MS) to this part :

Code: [Select]
//******************************************
//** Now playing marker
//*
$if($strcmp(1,$get(show_now_playing_marker)),
$if(%_isplaying%,$transition('► ♫ ♪ ♫ ♪ ♫ ♪ ♫',$get(c_now_playing_pointer),$get(c_background)))
)


anyway it looks like big squares in foobar's config editor.... it seems to look normal on the forum & looks nice in the playlist
Title: Foobar2000 format strings
Post by: haloeight on 2003-12-03 17:06:41
Quote
Here is my formating string for streaming radio. It i is not finished,  but it does it's work. it has a little workaround for the problem mentioned above.

Code: [Select]
//  Playlistformat for internet-radio-stations
//  Custom tags for non-streaming info:
//  bitrate       --> Bitrate of stream in kbps
//  codec        --> MP3, MP3Pro, Vorbis
//  channels   --> Number of channels
//  station      --> Name of station
//  url             --> Homepage of station or stream url (btw. if you call stream url in your
//                          Browser, you will get the status page of the station)
$num(%_playlist_number%,4)
$if(%_isplaying%,1F23D1>>,  )
$if(%artist%,FF6262$padcut(%artist%,35),1C67D9$padcut(%station%,35))
 |

E6C07B|FF9393
FF6262$if(%artist%,$if($strcmp($substr(%artist%,3,$len(%artist%)),%title%),$padcut(
$substr(%artist%,36,$len(%artist%)),30),$padcut(%title%,30)),1C67D9$padcut(%url%,30))
 |
3333E1
$puts(%cod%,$if2(%__codec%,%codec%))

$if($strcmp($lower($get(%cod%)),mp3pro),PRO,$if($strcmp($lower($get(%cod%)),vorbis),OGG,$padcut($get(%cod%),3)))
$num($if2(%__bitrate%,%bitrate%),3) kbps Ch: $if2(%__channels%,%channels%)

$if(%_isplaying%,1F23D1<<,  )
$char(09)FF4A4A%genre%


Editt: code updated a bit . For stations, that streams titles like Proton Radio,  %artist% is continued in %title% column.

Cya(o) Rainer

Thank you...I'll give it a shot.
Title: Foobar2000 format strings
Post by: atici on 2003-12-03 17:30:45
Why is it not possible that foo_syfm plug_in cannot change the background color and the fonts? Could Foobar API be modified accordingly so that these values could be changed by an outside plug-in?
Title: Foobar2000 format strings
Post by: billcow on 2003-12-03 22:39:18
I suppose I can field this one. The reason foo_syfm can't change fonts/colors is because foobar has two types of variables (for purposes of storing settings - i'm not talking about %blah% or $puts(blah,blah) in formatting strings) - global (any plugin can set it) and private (only the plugin that created it can change it).

While the actual formatting strings are global variables, and thusly can be changed by any plugin, the fonts and colors are private variables, and thus can only be changed by the UI plugin (or in pre-0.7 versions, the foobar core itself).


In theory the API could be changed (not really the API but the standard UI plugin). However, there is also the small detail that the global variable API only supports integers (numbers) or strings, while the private variable API supports any binary data you care to give it. So while that's certainly not anything that can't be delt with, it would be a minor pain. Mainly the reason (which, don't get me wrong, i respect) is that Peter thinks it's a bad idea.
Title: Foobar2000 format strings
Post by: atici on 2003-12-03 22:46:22
Why not make the fonts and colors global as well then? Wouldn't that solve the problem?  This thing makes Foobar very attractive really. It would be a pity if there's not any solution to create an entire format package still conforming to good programming principles.

BTW I don't understand why the default look of almost every software (Opera, WinAmp, Foobar,...) is extremely ugly. It is still possible to keep the eye-candy and clutter at minimum still maintaining a good look. I bet if Foobar looked this good by default there would be many more people who loved it immediately.

But then again who cares about popularity? (Not me)
Title: Foobar2000 format strings
Post by: foosion on 2003-12-03 23:26:59
Quote
In theory the API could be changed (not really the API but the standard UI plugin). However, there is also the small detail that the global variable API only supports integers (numbers) or strings, while the private variable API supports any binary data you care to give it. So while that's certainly not anything that can't be delt with, it would be a minor pain. Mainly the reason (which, don't get me wrong, i respect) is that Peter thinks it's a bad idea.

1. I don't think there should be an API for the standard UI only. IMHO there should be global variables that hold general user preferences for colors and fonts, so this might go to the core. Colors could be stored as config_var_int with names like "color:<description where it should be used>" (example: "color:Playlist text"). A page in preferences would then list all those showing only the description part, so there would be a central place to configure colors. Note that this scheme is already used with config_var_string and names like "titleformat:Playlist".

2. The public variables can hold arbitrary data; as long as the you know the details about how it is stored (i.e. header files for the config_var subclasses in question), you will be able to access it. Fixed size binary data (structs) are already supported by the SDK. For I example I have found that there is a config_var_struct in my fb2k installation called "infobox_font" - I wonder what that might hold...

3. I guess Peter has been busy with more important things.
Title: Foobar2000 format strings
Post by: billcow on 2003-12-04 03:51:51
Yeah, I do agree that it'd be nice, but once again, it's up to Peter in the end, and I respect that.

In any case, I'm thinking about taking up work on it again. The planned features are (unless I get tired of it):
1) dynamic re-coloring of the formatting string - invert brightness, hue shift, desaturate (aka make black/white/grey) in a customizable way
2) warning pop-up if the font specified for the UI doesn't match in terms of monospaced/variable width (if I can figure out a good way to find the font - it should be possible to read it from the raw config file, even if i can't change it (which I know I can't))
3) customizable translation of special characters - like a text file defining the mappings

Any suggestions/comments? (post them in the foo_syfm thread to not clutter this one any further)
Title: Foobar2000 format strings
Post by: MachineHead on 2003-12-04 09:49:48
Quote
MachineHead> paste symbols from character map software (MS) to this part :

Code: [Select]
//******************************************
//** Now playing marker
//*
$if($strcmp(1,$get(show_now_playing_marker)),
$if(%_isplaying%,$transition('► ♫ ♪ ♫ ♪ ♫ ♪ ♫',$get(c_now_playing_pointer),$get(c_background)))
)


anyway it looks like big squares in foobar's config editor.... it seems to look normal on the forum & looks nice in the playlist

Thank you. Works like a charm. 
Title: Foobar2000 format strings
Post by: pIv on 2003-12-04 11:39:55
I change MachineHead code - add sample animation.

Code: [Select]
//******************************************
//** Now playing marker
//*


$if($strcmp(1,$get(show_now_playing_marker)),

$if($strcmp(1,$get(animate_now_playing_marker)),
 $if(%_isplaying%,FFFFFF|FFFFFF$repeat('<',$mod(%_time_elapsed_seconds%,7))),
$if(%_isplaying%,FFFFFF|FFFFFF'► ♫ ♪ ♫ ♪ ♫ ♪ ♫')

)

)


pIv
Title: Foobar2000 format strings
Post by: Schinkentoni on 2003-12-04 13:51:21
Quote
anyway it looks like big squares in foobar's config editor.... it seems to look normal on the forum & looks nice in the playlist

I'm sorry but all I get are '?' in both config editor and playlist. But it looks normal when I copy everything into MS Word
Title: Foobar2000 format strings
Post by: haloeight on 2003-12-04 16:15:23
in the screenshot this user posted here (http://musepack.org/misc/Desktop_screenshot.png), it appears as though in their playlist the track current playing displays in a different color (yellow) regardless of what file the cursor has selected (the gray bar). How can I do this to my playlist ?
Title: Foobar2000 format strings
Post by: musicmusic on 2003-12-04 16:31:40
Quote
in the screenshot this user posted here (http://musepack.org/misc/Desktop_screenshot.png), it appears as though in their playlist the track current playing displays in a different color (yellow) regardless of what file the cursor has selected (the gray bar). How can I do this to my playlist ?

When setting the colour code, use

$if(%_isplaying%,<playing colour code>,<not playing colour code>)

Putting in the respective colour codes in the placeholder.

e.g. $if(%_isplaying%,0BC886|26DF50,ffffff|FFB18E)

You can leave the marker thing (first/last char of colour code, square thing) out of the $if statement if you want, but you may want to have some other changes for playing.
Title: Foobar2000 format strings
Post by: haloeight on 2003-12-04 16:34:44
Thank you musicmusic.

Right now I have the same color to display the track being played as for my selection color. If I select teh track that is currently playing the text color changes to blue. Is there any way I can set it to something else?
Title: Foobar2000 format strings
Post by: ssamadhi97 on 2003-12-04 16:47:05
Quote
I'm sorry but all I get are '?' in both config editor and playlist. But it looks normal when I copy everything into MS Word

Change your playlist font to a unicode font.
Title: Foobar2000 format strings
Post by: Schinkentoni on 2003-12-04 17:30:37
Quote
Change your playlist font to a unicode font.

Thanks for your answer but it did not work.
The '?' appears already in the fb config editor, or can I somehow change the font used there?
Title: Foobar2000 format strings
Post by: haloeight on 2003-12-04 18:15:35
Quote
Thank you musicmusic.

Right now I have the same color to display the track being played as for my selection color. If I select teh track that is currently playing the text color changes to blue. Is there any way I can set it to something else?

never mind, rtfm'd and found the solution...sorry for the dumb question, operating on four hours sleep here
Title: Foobar2000 format strings
Post by: MachineHead on 2003-12-04 20:30:51
Quote
I change MachineHead code - add sample animation.

Code: [Select]
//******************************************
//** Now playing marker
//*


$if($strcmp(1,$get(show_now_playing_marker)),

$if($strcmp(1,$get(animate_now_playing_marker)),
 $if(%_isplaying%,FFFFFF|FFFFFF$repeat('<',$mod(%_time_elapsed_seconds%,7))),
$if(%_isplaying%,FFFFFF|FFFFFF'► ♫ ♪ ♫ ♪ ♫ ♪ ♫')

)

)


pIv

Thanks. This works as well, but you get the < as the animation unless you change it.

Try this:

Code: [Select]
//******************************************
//** Now playing marker
//*


$if($strcmp(1,$get(show_now_playing_marker)),

$if($strcmp(1,$get(animate_now_playing_marker)),
$if(%_isplaying%,CECAC8|CECAC8$repeat(' ♪',$mod(%_time_elapsed_seconds%,7))),
))


Note that the color is something I picked for my set-up. Choose your own by editing the CECAC8 portion.
Title: Foobar2000 format strings
Post by: haloeight on 2003-12-06 04:35:41
Thanks to the help of people in this thread I have it so that the current track playing is displayed in a different color than the rest of the playlist. However it seems as though this only applies to the number and name of the track, not %_length%. %_length% is displaying in a different color. I tried messing around with it and reading the help file, using an "if" statement in front of length , but couldn't get it to adjust colors to the same ones being used for the track and song being played.

Since I put the color code ahead of everything else I thought it should apply to any text displayed. I understand from the help file that foobar will just invert selection text if no other code is provided, but I don't know how to get the color of the length of the track currently playing to change.

here's the code for anyone who might be able to offer this programming moron some help. thanks.

Code: [Select]
$if(%_isplaying%,0F8BF0|0F8BF0,C0C0C0|636363)

$num(%_playlist_number%,3)'. '

$if($strstr(%_path_raw%,'http://'),$if2(%artist%,),$if($strcmp($ext(%_path%),cue),$if2(%_subsong%' - ',)$if2(%artist%' - ',)$if2(%title%,),%_filename%))

$char(9) %_length%
Title: Foobar2000 format strings
Post by: DustMagnet on 2003-12-06 04:58:17
$char(9) kills the color coding. You have to initialize it again after the tab:

Code: [Select]
$char(9) $if(%_isplaying%,0F8BF0|0F8BF0,C0C0C0|636363)%_length%
Title: Foobar2000 format strings
Post by: haloeight on 2003-12-06 05:06:32
Thank you DustMagnet.

Are there any resources you guys are relying upon to gain this wisdom in what to do, or is it just programming principles you already know? I know of the formatting strings site, and surely there is lots of information in this thread for dummies to pick up on...I'm just curious if there's a more comprehensive "here's how you do this" than the help file.
Title: Foobar2000 format strings
Post by: DustMagnet on 2003-12-06 13:47:47
You're welcome. 

Most of what I know about formatting strings has come from following the Format Strings thread (http://www.hydrogenaudio.org/show.php/showtopic/4899) for code ideas, and the official help page for syntax. I also learned a lot through trial-and-error. Programming experience is not necessary, but it does help -- if you're already familiar with one language, it's easier to pick up another.
Title: Foobar2000 format strings
Post by: Alanity on 2003-12-06 14:38:26
Quote
Thank you DustMagnet.

Are there any resources you guys are relying upon to gain this wisdom in what to do, or is it just programming principles you already know? I know of the formatting strings site, and surely there is lots of information in this thread for dummies to pick up on...I'm just curious if there's a more comprehensive "here's how you do this" than the help file.

I have no previous experience of anything like this so it took two nights staying up until daylight to work out what was going on in hybrid just so I could make a simpler version... (i was bored...)
I agree there should be a simple tutorial for us dummies.. It shouldn't be too hard to sort out.

Btw hello all, I've been lurking for months and just bothered to register.. 
Title: Foobar2000 format strings
Post by: viveztigrou on 2003-12-07 23:35:03
does someone can put his .cfg online? i am not a coding man  ... i would like to see your work 
Title: Foobar2000 format strings
Post by: upNorth on 2003-12-08 16:18:21
Quote
does someone can put his .cfg online? i am not a coding man   ... i would like to see your work 

foobar2000 formatting strings web site (http://pelit.koillismaa.fi/fb2k/index.php)
Title: Foobar2000 format strings
Post by: aron on 2003-12-09 04:33:45
i have formatting strings to display the playlist in album mode -- that is, like:
http://shovelbeating.org/~nirvana/fb2.jpg (http://shovelbeating.org/~nirvana/fb2.jpg) , but when there are no tags, all that is displayed is "?.?" because the formatting is incomplete. how do i make it show filenames if there is no tag data?

the formatting i am currently using is:

Code: [Select]
// BASICS //////////////////////////////////////////////////////////////////////////////////////////////////

// COLORS DISPATCH
// color_bac = Background
// color_gri = Grid
// color_num = Playlist number, ReplayGain
// color_art = Artist, Composer
// color_alb = Album
// color_con = Conductor, Performer, Performyear
// color_tec = Tech.info, Label, Date, Genre, Style, Artistdate
// color_tit = Title, Track, Time
// color_ind = Playing indicator
// color_zer = Zeros playlist
// color_zeo = Zeros playlist

// SET COLORS
$puts(color_bac,271815|695F5F)
$puts(color_gri,AA9E9A|AA9E9A)
$puts(color_num,474141|474141)
$puts(color_art,FFFFFF|FFFFFF)
$puts(color_alb,FFFFFF|FFFFFF)
$puts(color_con,AA9E9A|AA9E9A)
$puts(color_tec,AA9E9A|AA9E9A)
$puts(color_tit,$if(%_isplaying%,FFFFFF|FFFFFF,695F5F|271815))
$puts(color_ind,$if(%_isplaying%,000000|000000,000000|000000))
$puts(color_zer,474141|474141)
$puts(color_zeo,695F5F|695F5F)

// SET COLOMN WIDTHS
$puts(colomn_1,2)
$puts(colomn_2,6)
$puts(colomn_3,75)
$puts(colomn_4,100)
$puts(colomn_5,30)
// COMMENTED SO RG AND TIME ARE FIXED IN PLACE.
//$puts(colomn_6,24)

// END OF COLOMN ONE
$repeat($char(9),$get(colomn_1))

// ALBUMS /////////////////////////////////////////////////////////////////////////////////////////////////

// ANALYSIS FOR LINES ORGANISATION
$puts(x,0)$puts(y,0)$puts(z,0)
$if(%conductor%,$puts(x,2),)
$if(%performer%,$puts(y,3),)
$if(%solists%,$puts(z,4),)
$puts(t,$add($add($get(x),$get(y)),$get(z)))

// ARTIST & ARTIST DATES, INCLUDING TRICK TO HANDLE VARIOUS ARTISTS ALBUMS
$if($strcmp($num(%tracknumber%,1),1),
$if($strcmp($substr(%_directoryname%,10,24),'Various Artists'),
$get(color_art)'Various Artists',
$get(color_art)%Artist%' '$get(color_tec)[%artistdate%])
$get(color_gri)$repeat('—',50),)

// ALBUM
$if($strcmp($num(%tracknumber%,1),2),
$get(color_alb)%album%,)

// DATE, GENRE, STYLE & TYPE
$if($strcmp($num(%tracknumber%,1),3),
$get(color_tec)%date%' '[%genre%]' '[' / '%style%][' / '%type%],)

// PERFORMYEAR & CONDUCTOR
$if($strcmp($num(%tracknumber%,1),4),
$if($strcmp($get(x),2),
$get(color_con)%performyear%' '%conductor%,),)

// PERFORMER
$if($strcmp($num(%tracknumber%,1),5),
$if($or($strcmp($get(t),5),$strcmp($get(t),9)),
$get(color_bac)%performyear%' '$get(color_con)%performer%,),)
$if($strcmp($num(%tracknumber%,1),4),
$if($or($strcmp($get(t),3),$strcmp($get(t),7)),
$get(color_con)%performyear%' '$get(color_con)%performer%,),)

// SOLISTS
$if($strcmp($num(%tracknumber%,1),6),
$if($strcmp($get(t),9),
$get(color_bac)%performyear%' '$get(color_con)%solists%,),)
$if($strcmp($num(%tracknumber%,1),5),
$if($or($strcmp($get(t),6),$strcmp($get(t),7)),
$get(color_bac)%performyear%' '$get(color_con)%solists%,),)
$if($strcmp($num(%tracknumber%,1),4),
$if($strcmp($get(t),4),
$get(color_con)%performyear%' '$get(color_con)%solists%,),)

// APE CODEC ANALYSIS
$if($stricmp($info(codec),monkey''s audio),
$puts(v_codec,$info(codec))
$puts(v_version,$info(version))
$puts(v_compression,$caps($info(compression))),)

// MPC CODEC ANALYSIS
$if($stricmp($info(codec),musepack),
$puts(v_codec,$caps($info(codec)))
$puts(v_version,$info(mpc_encoder))
$if($stricmp($info(mpc_profile),''Thumb''),
$puts(v_compression,'Thumb'),)
$if($stricmp($info(mpc_profile),''Radio''),
$puts(v_compression,'Radio'),)
$if($stricmp($info(mpc_profile),''Standard''),
$puts(v_compression,'Standard'),)
$if($stricmp($info(mpc_profile),''Xtreme''),
$puts(v_compression,'Xtreme'),)
$if($stricmp($info(mpc_profile),''Insane''),
$puts(v_compression,'Insane'),)
$if($stricmp($info(mpc_profile),''BrainDead''),
$puts(v_compression,'BrainDead'),)
$if($stricmp($info(mpc_profile),''quality 10''),
$puts(v_compression,'Quality 10'),)
$if($stricmp($info(mpc_profile),''Unstable/Experimental''),
$puts(v_compression,'Unstable/Experimental'),),)

// LABEL, SOURCE, CODEC, CDn°
$if($strcmp($get(t),9),
$if($strcmp($num(%tracknumber%,1),7),
$get(color_tec)%label%,)
$if($strcmp($num(%tracknumber%,1),8),
$get(color_tec)'['%source%']  '
$if(%discnumber%,'[CDn°]  ',)
$get(v_codec)' / '$get(v_version)' / '$get(v_compression),),)
$if($or($or($strcmp($get(t),5),$strcmp($get(t),6)),$strcmp($get(t),7)),
$if($strcmp($num(%tracknumber%,1),6),
$get(color_tec)%label%,)
$if($strcmp($num(%tracknumber%,1),7),
$get(color_tec)'['%source%'] '
$if(%discnumber%,'[CDn°]  ',)
$get(v_codec)' / '$get(v_version)' / '$get(v_compression),),)
$if($or($or($strcmp($get(t),2),$strcmp($get(t),3)),$strcmp($get(t),4)),
$if($strcmp($num(%tracknumber%,1),5),
$get(color_tec)%label%,)
$if($strcmp($num(%tracknumber%,1),6),
$get(color_tec)'['%source%'] '
$if(%discnumber%,'[CDn°]  ',)
$get(v_codec)' / '$get(v_version)' / '$get(v_compression),),)
$if($strcmp($get(t),0),
// REMOVED LABEL INFO, FOR NOW AT LEAST.
//$if($strcmp($num(%tracknumber%,1),4),
//$get(color_tec)[%label%],)
// ...AND CHANGED THIS NEXT LINE TO USE PLAYLIST LINE FOUR, NOT FIVE.
$if($strcmp($num(%tracknumber%,1),4),
$get(color_tec)['['%source%']']
$if(%discnumber%,'[CDn°]  ',)
$get(v_codec)' '$get(v_version)' '$get(v_compression),),)

// END OF COLOMN THREE
$repeat($char(9),$get(colomn_3))

// TRACK NUMBER
$char(32)$get(color_bac)
$ifgreater($len(%tracknumber%),1,,)
$get(color_tit)%tracknumber%
$if($strcmp($num(%tracknumber%,1),1),
$get(color_tit)'. ',
$get(color_tit)'. ')

// TITLE, INCLUDING TRICK TO HANDLE VARIOUS ARTISTS ALBUMS
$if($strcmp($substr(%_directoryname%,10,24),'Various Artists'),
$get(color_tec)%artist%': '$get(color_tit)%title%,
$get(color_tit)%title%)
$if($strcmp($num(%tracknumber%,1),1),
$get(color_gri)' '$repeat('—',100),)

// END OF COLOMN FOUR
$repeat($char(9),$get(colomn_4))

// GRID TRANSITION REMOVED.

// END OF COLOMN FIVE
$repeat($char(9),$get(colomn_5))

// ALBUM REPLAYGAIN
// $get(color_gri)
// $if(%__replaygain_album_gain%,
// $get(color_num)'A ',
// $get(color_bac)'A ')
// $if(%__replaygain_track_gain%,
// $get(color_num)'T',
// $get(color_bac)'T')
// $get(color_gri)


// END OF COLOMN SIX
$repeat($char(9),$get(colomn_6))

// LENGTH
$get(color_bac)
$ifgreater($len(%_length%),4,,)
$get(color_tit)%_length%

// SINGLES /////////////////////////////////////////////////////////////////////////////////////////////////


it is incomplete. also, how could i add support for more codecs? i have been looking at other formats, but it seems everyone does it differently. i want it to show mp3 codec info (bitrate).

can anyone help out?

thanks to man, as it is HIS work.
Title: Foobar2000 format strings
Post by: geovogs on 2003-12-10 08:51:51
Hi!
Please, tell me how I can set stereo for Lame 3.93 MMx in foobar2000's conversion options.
I have default joint stereo.

Thank You.
Geo.
Title: Foobar2000 format strings
Post by: berryblunt on 2003-12-14 23:56:05
here´s my playlist string :
-->

$puts(altcol,FFFFFF)

$if(%_isplaying%,0000F0|$get(altcol),)
$num(%_playlist_number%,$len(%_playlist_total%)).$char(32)

956500|$get(altcol)
['['%album%']' ]$if(%tracknumber%,'['#[%disc%/]$num(%tracknumber%,2)']' ,)

0071E1|$get(altcol)
$if(%artist%,%artist%000000|$get(altcol)' - ',)

007900|$get(altcol)
$if2(%title%,$upper($replace(%_filename%,_, )))
$tab(1)

0000F0|$get(altcol)
$if(%_ispaused%,' PAUSE ',$if(%_isplaying%,$if(%_length%,'['$progress(%_time_elapsed_seconds%, %_time_total_seconds%, 25,'||','-')'] PLAY ',' PLAY STREAM ')))

$if(%_isplaying%,0000F0|$get(altcol),000000|$get(altcol))
$pad_right($if3(%_length%,%_time_elapsed%,'stream'),7)
' '['|'$upper($ext(%_path%))'|']
<--
Title: Foobar2000 format strings
Post by: QQuxa on 2003-12-17 22:55:46
page with all the format strings and screenshots doesnt seem to be updated lately.. are there any other pages? i'd love to see some nice colors and formatting on my foobar, but I don't really have time to do it by myself:(

and many of formattings from that page don't really suite me, cost lots of my music ain't properly tagged =/

ideas?
Title: Foobar2000 format strings
Post by: upNorth on 2003-12-18 00:17:08
I just uploaded the next version of my "dynamic" formatting. It's not quite finished, but it seems to work ok. It's at the bottom of the page in a box called Test (next version of playlist). The reason I uploaded it is because it can work without tags, also in album mode. It will use tags, but try to guess the missing ones from filename and path. As I've said already, it's not quite finished, but you can try it.

The default naming scheme it looks for is:
artist - album\filename
If your naming scheme is something like:
artist\album\filename
you need to change this:
Code: [Select]
$puts(guessing_scheme,1)
into
Code: [Select]
$puts(guessing_scheme,2)
You can find it at the beginning of the code (the config area). This latter scheme might give strange results from time to time I guess.

Multidisc albums will work as long as an additional directory starts with "cd" or "disc" like this:
artist - album\CD 1\filename
Title: Foobar2000 format strings
Post by: mazy on 2003-12-19 23:37:38
i've uploaded preview of my current formatting string:

http://pelit.koillismaa.fi/fb2k/strings.php?f=55 (http://pelit.koillismaa.fi/fb2k/strings.php?f=55)

one screenshots (http://mazy.johanka.cz/my_pics/temp/foobar/mazy-foobar-008.png)
Title: Foobar2000 format strings
Post by: treech on 2003-12-23 02:03:15
I'de like to have an "album separator" thing, something like this "------------------", preferible across all the colums of the foobar window, if possible, how do i go about making one ?

i guess it's not that hard, but i haven't been able to make it break the line, everything looks really weird
Title: Foobar2000 format strings
Post by: nbv4 on 2003-12-24 20:30:59
whats the keyboard code to get the color character? In the formating string help file, it is listed as a box, but how do I get this character from my keyboard. It should be alt + XXX, the X's being on the numpad.
Title: Foobar2000 format strings
Post by: treech on 2003-12-25 22:23:43
.....just copy&paste
Title: Foobar2000 format strings
Post by: nbv4 on 2003-12-26 15:33:26
Quote
.....just copy&paste

Thats what I've been doing. There has to be a better way.
Title: Foobar2000 format strings
Post by: ozzimark on 2003-12-27 20:43:39
wow... after putting upnorth's window format on... i think i'm gonna actually put the time in over the break to hunt down which album most of my 4500+ songs are in just to make it look pretty
Title: Foobar2000 format strings
Post by: nbv4 on 2003-12-29 15:37:36
^^ do a google search for MusicBrainz
Title: Foobar2000 format strings
Post by: ReLiK on 2003-12-29 22:54:23
Does anybody know if or when it will be possible to allow separate playlists to have individual formatting styles?

Would love to have a such a feature.
Title: Foobar2000 format strings
Post by: anza on 2003-12-30 14:39:08
Quote
Does anybody know if or when it will be possible to allow separate playlists to have individual formatting styles?

Would love to have a such a feature.

It is already possible. At least upNorth's and my formattings use it (although both use only two formattings, "album" and "single"). It is possible to have as many formatting strings as you want. You'll only have to rename the playlists to have a character or a string that makes foobar use formatting of your choice.
Title: Foobar2000 format strings
Post by: nk215 on 2003-12-30 14:42:10
Quote
Does anybody know if or when it will be possible to allow separate playlists to have individual formatting styles?


Jejeje...

You already can do that!!!

You can try something like this:

If you have:

- playlist_name_a -> string_a
- playlist_name_b -> string_b
- playlist_name_c -> string_c
- playlist_name_n -> string_n

Code: [Select]
$if($stricmp(%_playlist_name%,playlist_name_a),string_a)
$if($stricmp(%_playlist_name%,playlist_name_b),string_b)
$if($stricmp(%_playlist_name%,playlist_name_c),string_c)
$if($stricmp(%_playlist_name%,playlist_name_n),string_n)


This is what I do to display individual formatting styles in playlist!!!

Byes

* Sorry for my english!!!
Title: Foobar2000 format strings
Post by: aron on 2003-12-31 07:38:29
here are my formatting strings . they're based on man's original strings. here are some screenshots:

http://shovelbeating.org/~nirvana/fb/Screen09.JPG (http://shovelbeating.org/~nirvana/fb/Screen09.JPG)
http://shovelbeating.org/~nirvana/fb/Screen10.JPG (http://shovelbeating.org/~nirvana/fb/Screen10.JPG)
http://shovelbeating.org/~nirvana/fb/Screen11.JPG (http://shovelbeating.org/~nirvana/fb/Screen11.JPG)

those instances show some examples of how it handles tags. what do you all think? if you would like to try it, feel free:

http://shovelbeating.org/~nirvana/fb/man3.fb2k (http://shovelbeating.org/~nirvana/fb/man3.fb2k) (foo_syfm file)

look in the "extra info" tab for color/font info. if you find anything wrong with it, let me know
Title: Foobar2000 format strings
Post by: mazy on 2003-12-31 14:15:06
aron, do you know that i loved your preview / original man's formatting string's look and so i designed my after it.

it is here (http://pelit.koillismaa.fi/fb2k/strings.php?f=55).

would you try to modify the colors etc?
Title: Foobar2000 format strings
Post by: cptmorgan on 2004-01-02 19:22:19
ive been trying to get a formating string to work for hours no and no luck.... when i load the config some colors are displayed but not all, also the playlist doesnt display properly either.  all my mp3s are tagged correctly... only thing i can think of is my file names....

a file location looks like this :

E:\mp3\archive\Sly_And_Robbie-Ultimate_Dub_Collection-CD-2002\01-sly_and_robbie-jah_in_dub.mp3

any ideas ?
Title: Foobar2000 format strings
Post by: mazy on 2004-01-02 20:33:02
which formatting string? your naming scheme looks almost like for scene releases, quite common i guess ...
Title: Foobar2000 format strings
Post by: cptmorgan on 2004-01-03 16:30:00
Quote
which formatting string? your naming scheme looks almost like for scene releases, quite common i guess ...

its with any format string i load....  for some reason they dont load properly.  dont know why it would be my filenames because the string pulls the information from the tags.... somone figure this out for me
Title: Foobar2000 format strings
Post by: DotNoir on 2004-01-03 16:40:02
One thing that sprang into my little head is that if the tag are ID3v2 and you don't have the component installed...
(get from here (http://www.cqasys.com/projects/kode54/index.php))

I'd blame the tagging if none of the playlist formats work...

edit. to find out if your tags are really screwed, I'd suggest you to put this as the formatting string, if it doesn't work, then you have some problem with tags :
%_playlist_number%. %artist% '|' %album% |$num(%tracknumber%,2)| %title%

if you get "playlistnumber. ? | ? |00| ?"

then you most propably have something spoony with your tags... If it displays correctly, I'd go and blame something between copy and paste (if you copy the formatting strings from the formatting string page...)
Title: Foobar2000 format strings
Post by: gwaihir on 2004-01-03 16:52:58
Mazy,
Your formatting string looks nice. Thanks for sharing. What font do you use?
Title: Foobar2000 format strings
Post by: anza on 2004-01-03 17:00:32
Quote
ive been trying to get a formating string to work for hours no and no luck.... when i load the config some colors are displayed but not all, also the playlist doesnt display properly either. all my mp3s are tagged correctly... only thing i can think of is my file names....

a file location looks like this :

E:\mp3\archive\Sly_And_Robbie-Ultimate_Dub_Collection-CD-2002\01-sly_and_robbie-jah_in_dub.mp3

any ideas ?

You'll have to manually change at least the background color. You'll also need to use correct font.
And after installing the ID3v2 plugin you'll need to reload infos of all your files (select all, right click, database, reload info from files).
Title: Foobar2000 format strings
Post by: mazy on 2004-01-03 23:21:39
gwaihir, it's free fant called eurofurence, you can get it on dafont.com ...

i've modified it a little bit though
Title: Foobar2000 format strings
Post by: cptmorgan on 2004-01-04 00:58:51
Quote
One thing that sprang into my little head is that if the tag are ID3v2 and you don't have the component installed...
(get from here (http://www.cqasys.com/projects/kode54/index.php))

I'd blame the tagging if none of the playlist formats work...

edit. to find out if your tags are really screwed, I'd suggest you to put this as the formatting string, if it doesn't work, then you have some problem with tags :
%_playlist_number%. %artist% '|' %album% |$num(%tracknumber%,2)| %title%

if you get "playlistnumber. ? | ? |00| ?"

then you most propably have something spoony with your tags... If it displays correctly, I'd go and blame something between copy and paste (if you copy the formatting strings from the formatting string page...)

i tried both what you and ansa said and still no luck.... i tested your playlist string and it displayed just fine.  This is really confusing cause all of my mp3s are tagged properly and i use the correct fonts/sizes.... there any other tests i can try to find out my problem ?
Title: Foobar2000 format strings
Post by: DotNoir on 2004-01-04 01:20:50
Can you upload a screenshot of your foobar2000 windows somewhere?
(where the playlist is screwed...)

thanks... or send an email to me, i can host it on ftp...
Title: Foobar2000 format strings
Post by: dreamliner77 on 2004-01-04 06:57:03
Alright, not sure if this is the right place or whatever, but I just started using fb2k today.  I know I'm a little behind the curve.  Anyway,  From what I can guess, apev2 tages were addded to all of my mp3's to include replay gain info.  Not a problem.  Kinda nice actually.  The question is, how do I get all the fields filled in without manually doing?  Is there a script for the masstagger that will do this from the title?  Similar to tag.exe?
Title: Foobar2000 format strings
Post by: picmixer on 2004-01-04 13:41:40
In case you have Foobar set to use APEv2 tags on mp3s in your "standard inputs" preferences, simply selecting all the files and right click to "Rewrite file tags from database should do what you want to.

Note that you will need to have the database enabled and all the files you want to modify will have to be already in the database.
Title: Foobar2000 format strings
Post by: aron on 2004-01-05 12:40:55
Quote
aron, do you know that i loved your preview / original man's formatting string's look and so i designed my after it.

it is here (http://pelit.koillismaa.fi/fb2k/strings.php?f=55).

would you try to modify the colors etc?


mazy i'm glad you like it. i didn't know you designed yours after it
sorry it took me some time to reply, by the way.

what would you want modified? i'm not very good yet... i still do a lot by looking at how other peoples' strings work. so i think you might be much better at it than i am. your formatting looks pretty good. i'll need to go home and check it out.

dreamliner77: i dont really think this is the right thread for your questions
Title: Foobar2000 format strings
Post by: ReLiK on 2004-01-05 14:00:34
Quote
Quote
Does anybody know if or when it will be possible to allow separate playlists to have individual formatting styles?

Would love to have a such a feature.

It is already possible. At least upNorth's and my formattings use it (although both use only two formattings, "album" and "single"). It is possible to have as many formatting strings as you want. You'll only have to rename the playlists to have a character or a string that makes foobar use formatting of your choice.

ah yes I see what you mean now. It works a treat. Thanks very much.

edit: does upNorth's formatting allow a track to be placed in 'Single' mode based upon a tag rather than playlist/tab name or directory name? So that if i want certain tracks to be in single mode within a directory the formatting string looks for a field called 'Single', value '1'.
Title: Foobar2000 format strings
Post by: upNorth on 2004-01-05 16:47:03
Quote
edit: does upNorth's formatting allow a track to be placed in 'Single' mode based upon a tag rather than playlist/tab name or directory name? So that if i want certain tracks to be in single mode within a directory the formatting string looks for a field called 'Single', value '1'.

In album mode you can add a singletrack tag to force the display of artist and title. If you want it to display all the info that you would have seen if you had switched to single mode, you can change this line:
Code: [Select]
$puts(enable_single_mode_view_for_singles_in_album_mode,0)
into
Code: [Select]
$puts(enable_single_mode_view_for_singles_in_album_mode,1)


OT: My system disc is dead, so I'm currently running Knoppix linux from a CD-ROM, hence I don't have access to my files or anything...   
Title: Foobar2000 format strings
Post by: ReLiK on 2004-01-05 17:47:50
Wow, I already knew your formatting string code was awesome, but you really have thought of everything. It still manages to make me smile. Truly excellent work. 
Title: Foobar2000 format strings
Post by: Dr PerLine on 2004-01-07 13:51:45
Hello, I have been using foobar2000 since the early 0.5 betas and I love it.  I stated  to mess around with formatting strings over Christmas and  this humble formatting string called Blue Tank (http://pelit.koillismaa.fi/fb2k/strings.php?f=59) is the result. I hope you will enjoy it!

Edit: Small Update to Blue Tank
Title: Foobar2000 format strings
Post by: billcow on 2004-01-07 20:50:08
Cripes that's a nice one. I've seen a lot of unique formatting strings, but never one that had support for variable *and* fixed-width fonts. Well, none that use columns anyway.

I gotta post my newest config up there. Been too lazy to do it.
Title: Foobar2000 format strings
Post by: RedDrake on 2004-01-13 15:11:04
Just started mucking around with the scripts for the Playlist/Status Bar last night, and so far i'm really glad i decided to use Foobar instead of the bloat that WinAMP has become (thanks AOL...).

Really quite like the scripting Dr PerLine did for the Playlist, but one quick (i hope) change i'd like to make .... Blue ain't my color, how hard is it to change the color something more my style? ie, Red or Green? From what i can make out of the script it looks to use a fairly simple RGB code. Also which strings need to be changed for what's Blue to be another color?

Thanks In Advance,
RedDrake
Title: Foobar2000 format strings
Post by: Dr PerLine on 2004-01-13 18:11:04
It should be fairly easy for you to change the colours, if you look at the bottom of the playlist edit window you see a change color box, if you click on the [...] you get up a pallet window from which you can select a colour. This the appears in the aforementioned box and this value can then be selected, copied and then pasted over a previous colour. When the colours are in 480000|5E0000 format the first number is the normal colour and the second one is the colour when its selected. If you still having trouble try the help file included, which can be accessed by clicking on help .

Here's a list of colours with blue in them:

Code: [Select]
$puts(cl_album,B70000|FFFFFF)
$puts(cl_title,90471C|FFFFFF)
$puts(cl_trackratingdim,780000|555555)
$puts(cl_length,B70000|FFFFFF)
$puts(cl_bonus_track,700000|FFFFFF)
$puts(cl_brackets,780000|888888)
$puts(cl_background_then_select,480000|5E0000)
$puts(cl_playlist_number_dim,90471C|90471C)
$puts(cl_track_number_dim,90471C|90471C)


And here's an alternative colour scheme in red which can be posted over the normal blue one:

Code: [Select]
// [ Colours ]

// The colours for various parts of the string
$puts(cl_artist,FFFFFF|FFFFFF)
$puts(cl_various_artist,8A8A8A|FFFFFF)
$puts(cl_album,0000B7|FFFFFF)
$puts(cl_title,040097|FFFFFF)
$puts(cl_title_playing,FFFFFF|FFFFFF)
$puts(cl_track_number,FFFFFF|FFFFFF)
$puts(cl_trackratinghi,FFFFFF|AAAAAA)
$puts(cl_trackratingdim,000078|555555)
$puts(cl_length,0000B7|FFFFFF)
$puts(cl_length_playing,FFFFFF|FFFFFF)
$puts(cl_other_info,7C7C7C|FFFFFF)
$puts(cl_lines,909090|909090)
$puts(cl_gain,555555|FFFFFF)
$puts(cl_bonus_track,000070|FFFFFF)
$puts(cl_brackets,000078|888888)
// The colour of the background followed by the selection colour, used to hide padding of chars in variable font mode
$puts(cl_background_then_select,00004F|00006C)
$puts(cl_playlist_number,FFFFFF|FFFFFF)
$puts(cl_playlist_number_dim,03006F|666666)
$puts(cl_track_number_dim,03006F|666666)


And a red status bar:
Code: [Select]
// [ Colours ]

$puts(cl_progress,000093)
$puts(cl_progressback,000009)
$puts(cl_text,000000)
$puts(cl_length,0000B7)


And uses the folowing other colours:

Playlist background: rgb(79,0,0)
playlist selection: rgb(108,0,0)
selection frame: rgb(128,0,0)

Hope this helps,
Title: Foobar2000 format strings
Post by: RedDrake on 2004-01-13 19:28:30
Thanks Mate! Very great help as i wasn't fully sure which color codes went to what. About the last thing i wanted to do was sit here with Notepad swappin' colors out to see which value changed what! =)


Much Obliged for the timely assisstance, Here's to the long *FUN* hours of Coding/Scripting (or learning it, however the cookie crumbles!)



RedDrake
Title: Foobar2000 format strings
Post by: Zoominee on 2004-01-13 23:30:33
Hi People! This thread is really full of ideas, thanks!

Here's two questions:

1) Can I get the File size info from the file info box into the playlist? It's not called %__filesize% or %__file_size%, I tried that.

2) Using <tab> for the columns, is there any way I can specify widths for the columns? Someone earlier on mentioned using several <tab>s to make the columns wider, but there must be a better way?

Since everyone is sharing their playlist formats here, have a look at mine. Sorry, I can't make a screenshot. I use variable-width font (the default font).

My playlist shows artist on the left column, then album name and year in the middle, and tracknumber, title in the next column. On the right it shows the time, or when it's playing also sometimes the time remaining. If the track is classical (i.e. if genre=Classical) then it also makes a column for performance artist and year (which are two more tags). (So for classical files there are five columns, and for other music there are four columns, which looks a bit funny if you have them both in one playlist but i like it this way.) My background colour is almost black, and the highlight colour is dark grey.

EDIT: Sorry, the tabs didn't show. I'll put $char(9) where they are.

Quote
// colours
$puts(darkred,202070|2F8FFF)$puts(verydarkred,000070|2F8FFF)$puts(brightred,0000FF|2F8FFF)
$puts(yellow,00FFFF|2F8FFF)
$puts(lightblue,FFEE30|2F8FFF)$puts(paleblue,888830|2F8FFF)
$puts(greenish,208020|2F8FFF)
$puts(white,FFFFFF|2F8FFF)

// check if all standard tags are present
$if($and($and(%title%,$not($strcmp(%title%,))),$and(%artist%,$not($strcmp(%artist%,)))),
$puts(alltags,1),)

$if($get(alltags),
// formatting for files with tags:

// 'album' formatting
$puts(year,%date%)
$if(($strcmp($get(year),)),$puts(year,%year%))
$if($not($get(year)),$puts(year,'(year?)'),$puts(year,'('$get(year)')'))
$puts(album,$get(year)' '%album%[ - CD$num(%disc%,1)]
)

//if 'album artist' tag is present
$if(%album artist%,
// set 'artist' to VA for VA albums, and to 'album artist' otherwise:
$if($get(va),$puts(artist,VA),$puts(artist,%album artist%))
//if 'artist' is different from 'album artist', append the former to the title
$if($strcmp(%album artist%,%artist%),$puts(title,%title%),
$puts(title,%title% '//' %artist%)),
//no 'album artist' found
$puts(artist,%artist%)
$puts(title,%title%)
$puts(tracknum,[$num(%tracknumber%,$if($greater(%tracknumber%,9),2,1))])
$if($strcmp($get(tracknum),'0'),$puts(tracknum,),$puts(tracknum,$get(tracknum)' '))
)

// formatting for files without all the tags:
,
$if(%title%,
$puts(title,%title%)$if(%artist%,$puts(artist,%artist%)),
$puts(artist,%_path%)$puts(title,%_filename%))
$if($strcmp($get(artist),),$puts(artist,$get(white)$get(title))$puts(title,))

)

//$num(%_playlist_number%,$len(%_playlist_total%)).' '

$get(darkred)[$get(artist)]
$char(9)
$get(yellow)[$get(album)]
$char(9)
$get(verydarkred)[$get(tracknum)]
$puts(title,$replace(%title%,'(',$get(paleblue)'(',')',')'$get(lightblue)))
$get(lightblue)[$get(title)]
$char(9)
$if($strcmp(%genre%,'Classical'),$get(greenish)['('%performance_year%')' %performance_artist%$char(9)])

$if(%_isplaying%,$get(brightred)'> ')
$if(%_isplaying%,
// blink elapsed/total
$get(brightred)$if($greater($mod(%_time_elapsed_seconds%,10),5),%_time_remaining%,%_time_elapsed%)
,$get(white)[%_length%])
$if(%_isplaying%,$get(brightred)' <')


For the Status bar text I have this:
Quote
$puts(ext,$upper($if2($ext(%__referenced_file%),$ext(%_path%))))
$puts(codec,$if(%__codec%,$caps2(%__codec%),$get(ext)))
$if($strcmp($get(codec),),
$if($stricmp($left(%_path_raw%,7),'cdda://'),$puts(codec,CDDA),)
,)
$if($strcmp(%genre%,'Classical'),000070' '[%artist%' - '][%title%][' ('%album%')'],
000070' '[%artist%' - ']%title%)$char(9)

00FFFF
$get(codec)' '
[%__bitrate%kbps ]['('%__bitrate_dynamic%kbps')' ][%__samplerate%Hz]' '
$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)),)
[ %__extrainfo%]$char(9)
005000$if2(%__replaygain_album_gain%,
000000
$if($greater($mod(%_time_elapsed_seconds%,2),0),,
'R?'))
' '
000000$if(%_time_total%,[%_time_elapsed%]'/'[%_time_total%],[%_time_elapsed%])


Have a nice day.
Title: Foobar2000 format strings
Post by: mazy on 2004-01-14 21:20:33
hello zoominee.

1) afaik, it's not available (only number of samples is, which can be used for approximate size)

2) i would like exact explanation on that myself ... for example i have found that $char(9)  isn't exactly like $tab(). as for columns, you can make columns with their width proportional to ratio of number of $char(9) used ...

for example, consider this example:

column 1 text $repeat($char(9), 10)column 2 text $repeat($char(9), 10)column 3 text $repeat($char(9), 20)

columns have 'width' of 10, 10 and 20, meaning that total width of the first two is the same width of the third (10 + 10 = 20)

you would get the same results using widths with that ratio, for example widths of 20, 20 and 40.

problem is, that you probably want your last column to be right-aligned (so you won't have any $char(9) after it). that could affect the ratio ...
Title: Foobar2000 format strings
Post by: dewey1973 on 2004-01-28 00:31:19
Does anyone have a new link to TAGZ.txt?  The one in the beginning of the thread is dead.
Title: Foobar2000 format strings
Post by: upNorth on 2004-01-28 01:29:50
I uploaded it for someone a while ago. You can find it here: TAGZ.txt (http://www.stud.ntnu.no/~mortek/foobar2000/TAGZ%20info.TXT)
Title: Foobar2000 format strings
Post by: dewey1973 on 2004-01-28 20:09:27
Quote
I uploaded it for someone a while ago. You can find it here: TAGZ.txt (http://www.stud.ntnu.no/~mortek/foobar2000/TAGZ%20info.TXT)

Thank You!
Title: Foobar2000 format strings
Post by: gizmo on 2004-02-05 03:20:33
anybody know how to make "OST  (xxxx)  bla bla bla"  album like in "VA -  (xxxx) bla bla bla"  as various artist????
Title: Foobar2000 format strings
Post by: NEMO7538 on 2004-02-05 05:18:00
This is my favorite playlist format. Enjoy !

Code: [Select]
// Set Colors
//
$puts(ColNumber,$if(%_isplaying%,00FFFF|00FFFF,003AB3|FFFFFF))
$puts(ColArtist,$if(%_isplaying%,00FFFF|00FFFF,98CBCB|98CBCB))
$puts(ColDate,$if(%_isplaying%,4080FF|4080FF,7796C8|7796C8))
$puts(ColAlbum,$if(%_isplaying%,00FF80|00FF80,35CAA9|35CAA9))
$puts(ColTrack,$if(%_isplaying%,FFFFFF|FFFFFF,006BD7|FFFFFF))
$puts(ColTitle,$if(%_isplaying%,FFFF80|FFFF80,D1C4AD|D1C4AD))
$puts(ColTime,$if(%_isplaying%,00FFFF|00FFFF,006BD7|FFFFFF))
$puts(ColBitrate,$if(%_isplaying%,FFFFFF|FFFFFF,003AB3|FFFFFF))


$puts(ColBegMark,460170|460170)
$puts(ColEndMark,$if(%_isplaying%,00FFFF|0000FF,00FFFF|0000FF))
$puts(ColEndLine,FFD7D7|FFD7D7)


$puts(Fill1,$transition($repeat(_,20),$get(ColBegMark),$get(ColEndMark)))
$puts(Fill2,$transition($repeat(_,40),$get(ColEndMark),$get(ColBegMark)))

//

$get(ColNumber)$num(%_playlist_number%,$len(%_playlist_total%))$get(ColEndLine)

$if(%tracknumber%,

$if($strcmp($strstr(%_playlist_name%,#),0),

//album view

$if($strcmp($strstr($directory(%_path%,1),%artist%),1),
//Single artist
$if($strcmp($num(%tracknumber%,1),1),$get(ColArtist)%artist%$get(Fill1)
,$if($strcmp($num(%tracknumber%,1),2),$get(ColDate)'['%date%']'
,$if($strcmp($num(%tracknumber%,1),3),$get(ColAlbum)%album%,
))),
//Various artist
$if($strcmp($num(%tracknumber%,1),1),$get(ColAlbum)%album%$get(Fill1)
,$if($strcmp($num(%tracknumber%,1),2),$get(ColDate)'['%date%']'
))
)

$tab(8)$get(ColEndLine) $get(ColTrack)$num(%tracknumber%,2).
$if($strcmp($strstr($directory(%_path%,1),%artist%),1),,$get(ColArtist)%artist%
$get(ColTrack) ¤ )

$get(ColTitle)%title%
$if($strcmp($num(%tracknumber%,1),1),$get(Fill2), )
$tab(14)
,

//singles view

$if($strcmp($strstr($directory(%_path%,1),%artist%),1),
//Single artist
$get(ColArtist)%artist%
$if(%_isplaying%,$get(Fill1),)
$tab(9)
$get(ColEndLine) $get(ColAlbum)%album%
$if(%_isplaying%,$get(Fill1),)
$tab(11)
$get(ColEndLine) $get(ColTrack)$num(%tracknumber%,2).
,
//Various artist
$get(ColAlbum)%album%
$if(%_isplaying%,$get(Fill1),)
$tab(9)
$get(ColEndLine) $get(ColTrack)$num(%tracknumber%,2).
$get(ColArtist)%artist%
$tab(11)
$get(ColEndLine) )
$get(ColTitle)%title%
$tab(16)
)

// Length and Bitrate
$char(9)
$if(%_isplaying%,$transition(>>>>>>>,$get(ColBegMark),$get(ColEndMark)),)
$get(ColEndLine) $get(ColTime)$pad_right([%_length%],5,0)
$get(ColEndLine) $get(ColBitRate)%__bitrate%k

,$get(Colalbum)%_path%$char(9)$get(ColTitle)[%title%])
Title: Foobar2000 format strings
Post by: mai9 on 2004-02-05 12:15:33
Nice playlist NEMO7538! will you add it to http://pelit.koillismaa.fi/fb2k/index.php (http://pelit.koillismaa.fi/fb2k/index.php) ?

one question: wouldn't you prefer to use this character "¯" than this "_" for album separator?
Title: Foobar2000 format strings
Post by: vip on 2004-02-05 12:58:38
looks awesome nemo, but i have a question .. for a majority of my playlist, it looks correct, but for others it looks like this http://www.destroyed.us/images/fb2kpl.png (http://www.destroyed.us/images/fb2kpl.png)

any idea what's going on ??
Title: Foobar2000 format strings
Post by: upNorth on 2004-02-05 13:35:00
Quote
looks awesome nemo, but i have a question .. for a majority of my playlist, it looks correct, but for others it looks like this http://www.destroyed.us/images/fb2kpl.png (http://www.destroyed.us/images/fb2kpl.png)

any idea what's going on ??

You just need to tag those files
Title: Foobar2000 format strings
Post by: vip on 2004-02-05 14:02:41