Help - Search - Members - Calendar
Full Version: Foobar2000 format strings
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25
R2D2
I need some help with my config, my first one, really proud, and it is almost done.
The only thing I can't get to work is a few if-strings. I want that if the playlist name ends with a ".", dot, then it puts album, 1, if it ends with a ",", then singles=1, if none of these, then artist = 1 (artistmode).

Can someone write a working code for this?
foosion
CODE
$if($strcmp($right(%_playlist_name%,1),'.'),$puts(album,1),
$if($strcmp($right(%_playlist_name%,1),','),$puts(singles,1),
$puts(artist,1)))
R2D2
Thanks, everything is fine, except the last thing. If singles is 1, then it writes the titles in the singles string, but then it writes the artist string too, that isn't good.

Could you change so artist is 1 only if the others are 0?
Czokalapik
CODE

$if($strcmp($right(%_playlist_name%,1),$or('.',',')),
$if($strcmp($right(%_playlist_name%,1),'.'),$puts(album,1),)
$if($strcmp($right(%_playlist_name%,1),','),$puts(singles,1),),
$puts(artist,1))
Czokalapik
hmmmm but i think foosion's string should work properly
TaSK
upNorth:

could you post your strings? the string site is down for me.. tnkz smile.gif

sweat.gif sweat.gif
upNorth
QUOTE(TaSK @ Jul 10 2004, 01:16 AM)
upNorth:

could you post your strings? the string site is down for me.. tnkz smile.gif

sweat.gif  sweat.gif
*

Sorry, can't do, because I'm not at home at the moment and I don't have all my foobar stuff with me. I'll try to remember posting it when I'm home for a short while next week (wednesday/thursday).
amppa
Yes, the server seems to be currently down, don't know why and there's nothing I can do right now. It will be back.. some day smile.gif
Sandman2012
What I use when I'm not using columns_ui:

user posted image

CODE
$puts(color_text,000000|000000)
$puts(color_1,408000|408000)
$puts(color_2,C08000|C08000)
$puts(color_3,AAAAAA|AAAAAA)
$puts(color_4,FFFFFF|FEF3ED)

$char(32)
$get(color_2)$if(%album artist%,%album artist%,%artist%)
$get(color_3)[ - %album% ]$tab(1)
$if(%tracknumber%,$get(color_2)$num(%tracknumber%,2). ,$get(color_4)00. )
$get(color_1)$if(%title%,%title%,%_filename_ext%)

$tab(1)
$get(color_2)$if(%_length%, %_length%,)$char(32)
TaSK
QUOTE(upNorth @ Jul 10 2004, 10:57 AM)
QUOTE(TaSK @ Jul 10 2004, 01:16 AM)
upNorth:

could you post your strings? the string site is down for me.. tnkz smile.gif

sweat.gif  sweat.gif
*

Sorry, can't do, because I'm not at home at the moment and I don't have all my foobar stuff with me. I'll try to remember posting it when I'm home for a short while next week (wednesday/thursday).
*


tnkz for your reply... waiting for it... smile.gif
TaSK
still no news?! sad.gif
Raja
Sandman: I really like that blue tone on the artist and length. What exactly is it?

EDIT: D'oh, sometimes I wish I would actually, ya know, READ things before I post.
amppa
The server is back online.
TaSK
Cool!! happy it's back! smile.gif
p0wder
Hey Sandman would you mind posting the status bar code as well? smile.gif
Sandman2012
The status bar string isn't mine. I used one from the foobar2k strings page, which still won't load for me. Here's the string, and as soon as the site is back I can look up the original author and credit him.

CODE
$puts(PIPE_COLOR,AAAAAA)
$puts(FONT_COLOR,)

$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),)
,)
' '$get(codec)
$if(%__bitrate_dynamic%kbps,
'  '$get(PIPE_COLOR)|$get(FONT_COLOR)'  '%__bitrate_dynamic%kbps,
'  '$get(PIPE_COLOR)|$get(FONT_COLOR)'  '[%__bitrate%kbps])
$if(%__samplerate%Hz%,'  '$get(PIPE_COLOR)|$get(FONT_COLOR)'  '%__samplerate%Hz)
$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,'  '$get(PIPE_COLOR)|$get(FONT_COLOR)'  'Stereo,'  '$get(PIPE_COLOR)|$get(FONT_COLOR)'  'Mono)),)
$if(%__extrainfo%,
'  '$get(PIPE_COLOR)|$get(FONT_COLOR)'  '%__extrainfo%)
$char(9)
$if(%_time_total%,[%_time_elapsed%]' '$get(PIPE_COLOR)/$get(FONT_COLOR)' '[%_time_total%],[%_time_elapsed%])' '
Nathan_
Hello!
This is my first attempt at a config, and is based on 'plisk v0.1.5' (by plisk). I'm kinda learning as I go, but I'm quite pleased with the colour coded genre column. I'm sure someone has done something similar before anyway. This is how I (crudely) smile.gif achieved this effect:

CODE

$if($stricmp([%genre%],punk rock),9BB3A9%genre%,)
$if($stricmp([%genre%],classic rock),ABB49A%genre%,)
$if($stricmp([%genre%],jazz),B78C80%genre%,)
$if($stricmp([%genre%],ska),91F3F9%genre%,)
$if($stricmp([%genre%],disco),F9ACDE%genre%,)
$if($stricmp([%genre%],ambient),C4C5BC%genre%,)
$if($stricmp([%genre%],funk),BB93AB%genre%,)
$if($stricmp([%genre%],pop),AE9CCF%genre%,)
$if($stricmp([%genre%],hip-hop),838FB4%genre%,)
$if($stricmp([%genre%],country),B1C8CF%genre%,)
$if($stricmp([%genre%],blues),845446%genre%,)
$if($stricmp([%genre%],r&b),DEBFA3%genre%,)
$if($stricmp([%genre%],indie rock),5C6D61%genre%,)
$if($stricmp([%genre%],dance),5B4E7C%genre%,)
$if($stricmp([%genre%],folk),BFC2CC%genre%,)
$if($stricmp([%genre%],punk),97F4B6%genre%,)
$if($stricmp([%genre%],reggae),D0B7CB%genre%,)
$if($stricmp([%genre%],cajun),A9CBCD%genre%,)
$if($stricmp([%genre%],latin),C691E6%genre%,)
$if($stricmp([%genre%],grunge),BCD3B4%genre%,)
$if($stricmp([%genre%],rock),8BC299%genre%,)


My Config:

user posted image

What it's based on:

Plisk
Insolent
Here's mine. smile.gif

user posted image
R2D2
QUOTE(Insolent @ Jul 24 2004, 04:33 PM)
Here's mine. smile.gif

user posted image
*



You think you could release those buttons?
Insolent
QUOTE(R2D2 @ Jul 25 2004, 05:17 AM)
You think you could release those buttons?
*


They contain rollovers, so make sure you enable that option. smile.gif

user posted image
atici
QUOTE(Insolent @ Jul 26 2004, 02:21 AM)
They contain rollovers, so make sure you enable that option. smile.gif

user posted image
*



How do you import these buttons and enable the rollovers option? Sorry never knew this was possible.
R2D2
QUOTE(Insolent @ Jul 25 2004, 11:21 PM)
QUOTE(R2D2 @ Jul 25 2004, 05:17 AM)
You think you could release those buttons?
*


They contain rollovers, so make sure you enable that option. smile.gif

user posted image
*



Thanks.



Atici: It is possible with columns ui
Insolent
QUOTE(atici @ Jul 26 2004, 06:20 AM)
How do you import these buttons and enable the rollovers option? Sorry never knew this was possible.
*


You need Columns UI. Then you just import the buttons from the 'Other' tab in the Columns UI options.

QUOTE(R2D2 @ Jul 26 2004, 06:54 AM)
Thanks.
*


No probs. smile.gif
ASk
Mine was modified from format string called Blanked, first to fit with overall gui theme of my desktop

Then I decided to fix it for non-album playlists and add a formatting to copy name command that allows you to generate html playlists

Screenshots:

album style
singles style
generated html, from the 'lean' config

The strings are a bit large, so I will just give links to the foo_syfm config files:

Here - this generates prettier html, but at huge expence to file size. My HTML skills mostly suck, so I can't really think of a good way to cut down the size

Here - this generates uglier-looking html, but it's twice as small - 6.5k tracks give you a 450kb playlist (as opposed to 850kb for the former)


One question - is it possible to know the total playlist length in ui_default (in ui_columns, it would be possible to use global vars to sum the total song length)?

[edit: domain name was moved to another DNS, replaced the link with more permanent one. and again, now with final, updated url]
Shadikka
The first format I ever created, still it's my favourite smile.gif No plugins needed.
Screenshot

Features:
-Playlist:
-Coloured PL numbers according the size of the number (9 colors)
-Colour-transitioned song artist - name according to the length of the song (brighter=longer)
-Coloured genre tag (~15 genres, I suppose, haven't counted them)
-Coloured length (0-2, 2-4, 4-6, 6-8, 8-10, 10-30, 30- minutes)
-Showing album

-Status bar:
-Codec, bitrate, sampling rate, bar

-Window title:
-Genre, artist - name, album, pos/length in secs, pos/length in basic, version

-Copy command:
-Simple format: <artist - name (length)>

And here we go. If someone thinks this message is too long becuase of these, I can move them to different files and link them..

Copy command:
CODE
<$if(%title%,[%artist% - ])$if2(%title%,%filename%) ['['%_length%']']>


System tray:
CODE
$caps($if([%genre%: ]%title%,[%artist% - ])$if2(%title%,%_filename%))


Playlist:
CODE
$if(%_isplaying%,$char(3)cc00cc$char(3)*np>    ,
$char(3)000000$char(3)
$if($greater(%_playlist_number%,$div(%_playlist_number%,9)),$char(3)220000$char(3))
$if($greater(%_playlist_number%,$mul($div(%_playlist_total%,9),2)),$char(3)440000$char(3))
$if($greater(%_playlist_number%,$mul($div(%_playlist_total%,9),3)),$char(3)660000$char(3))
$if($greater(%_playlist_number%,$mul($div(%_playlist_total%,9),4)),$char(3)880000$char(3))
$if($greater(%_playlist_number%,$mul($div(%_playlist_total%,9),5)),$char(3)aa0000$char(3))
$if($greater(%_playlist_number%,$mul($div(%_playlist_total%,9),6)),$char(3)cc0000$char(3))
$if($greater(%_playlist_number%,$mul($div(%_playlist_total%,9),7)),$char(3)ee0000$char(3))
$if($greater(%_playlist_number%,$mul($div(%_playlist_total%,9),8)),$char(3)ff0000$char(3))
)
%_playlist_number%/%_playlist_total%

$if(%_isplaying%,
$char(3)cc00cc$char(3)$if(%title%,[%artist% - ])$if2(%title%,%_filename%),
$transition(
$if(%title%,[%artist% - ])$if2(%title%,%_filename%),
$rgb(0,0,$div(%_length_seconds%,2))
,$rgb($div(%_length_seconds%,3),0,$div(%_length_seconds%,3))))

$if($or($not(%artist%),$not(%title%)),$char(3)0000ff$char(3)'('Incomplete tags!')')

$char(9)
$if(%genre%,
$char(3)000000$char(3)
$if($stricmp(%genre%,anime),$char(3)cc77cc$char(3))
$if($stricmp(%genre%,blues),$char(3)aa0000$char(3))
$if($stricmp(%genre%,dance),$char(3)008855$char(3))
$if($stricmp(%genre%,eurobeat),$char(3)cc5533$char(3))
$if($stricmp(%genre%,fantasy metal),$char(3)555575$char(3))
$if($stricmp(%genre%,game),$char(3)0088dd$char(3))
$if($stricmp(%genre%,gothic),$char(3)323232$char(3))
$if($stricmp(%genre%,gothic rock),$char(3)353535$char(3))
$if($stricmp(%genre%,hard rock),$char(3)447744$char(3))
$if($stricmp(%genre%,heavy metal),$char(3)333388$char(3))
$if($stricmp(%genre%,heavy rock),$char(3)447744$char(3))
$if($stricmp(%genre%,hip-hop),$char(3)887700$char(3))
$if($stricmp(%genre%,humour),$char(3)bbaa00$char(3))
$if($stricmp(%genre%,jpop),$char(3)dd0022$char(3))
$if($stricmp(%genre%,jrock),$char(3)22bb00$char(3))
$if($stricmp(%genre%,metal),$char(3)555555$char(3))
$if($stricmp(%genre%,other),$char(3)999999$char(3))
$if($stricmp(%genre%,pop),$char(3)bb00bb$char(3))
$if($stricmp(%genre%,rock),$char(3)885544$char(3))
$if($stricmp(%genre%,soundtrack),$char(3)009999$char(3))
$if($stricmp(%genre%,techno),$char(3)558800$char(3))
$if($stricmp(%genre%,trance),$char(3)77aa00$char(3))
$if($stricmp(%genre%,vocal),$char(3)770077$char(3))
'('%genre%')'
)$char(3)$char(3)

[%album% ]

$if($not($greater(%_length_seconds%,120)),$char(3)880000$char(3))
$if($greater(%_length_seconds%,120),$char(3)ff0000$char(3))
$if($greater(%_length_seconds%,240),$char(3)00aa00$char(3))
$if($greater(%_length_seconds%,360),$char(3)0066aa$char(3))
$if($greater(%_length_seconds%,480),$char(3)0099dd$char(3))
$if($greater(%_length_seconds%,600),$char(3)0000cc$char(3))
$if($greater(%_length_seconds%,1800),$char(3)0000ff$char(3))
[%_length%]


Window title:
CODE
['('%genre%')' ]
$if(%title%,[%artist% - ])
$if2(%title%,%_filename%) ']['

[%album%
[#%track% ]
['('%year%')']
'][' ]

$if(%_ispaused%,Paused,
%_time_elapsed_seconds%/%_time_total_seconds% secs ']['
%_time_elapsed%/%_time_total%) '][' %_foobar2000_version%


Status bar:
CODE

$codec()' ' '][ '
[%__bitrate%kbps ]['('%__bitrate_dynamic%kbps')' ][%__samplerate%Hz]' ][ '
$caps($channels())
[ %__extrainfo%]' ][ '
$progress2(%_time_elapsed_seconds%,%_time_total_seconds%,15,
$char(3)ff6622$char(3),
$char(3)000000$char(3))$char(3)$char(3)
$if(%_time_total%,[%_time_elapsed%]' / '[%_time_total%],[%_time_elapsed%])
aron
QUOTE(Lav @ Mar 21 2004, 05:31 PM)
Works fine for me, Czokalapik. :/


Hm. I finally got around to actually doing some work on mine, and i think i'm actually starting to really understand how foobar's scripting works. I still wish it was more like mIRC, but eh. :,)

Here's mine. It's mostly modified from... this one. Heh.
*




i realize you posted this a relatively long time ago, but i noticed it and wanted to say i like what you did, making a long line on the first track, and the artist shown on the second. i thought of making it that way originally, except i had some albums that were only 2 (long) tracks total, like "in a silent way" by miles davis. if i ever go back to default ui, maybe i'll start changing it around again...

btw, when i made this script, i was kind of unsure about a lot of things and learning as i went. did you notice any things in the code that were unnecessary / did nothing?
Zoominee
My favourite formatting strings... shows a lot of information, both on the playlist and in the status bar. Sorry, no screen shot, but feel free to try it out on your foobar! Some of the tags I'm using are non-standard, but everything should work fine with standard tags. FYI, my colour scheme has black playlist background and the status bar background is kind of grey.

Playlist:
CODE
//what the flags mean
// a - bad audio %audioproblem%
// c - comment (not shown)
// d - date missing
// f - codec not mp3
// i - information missing (%artist%, %title%, %album%)
// l - live recording (%live%)
// p - hasn't been played
// r - replaygain missing
// t - temporary folder (i.e. not in homedir)
// u - information marked as uncertain (%uncertain%)
$puts(homedir,'F:\Christian\Music\')
// colours
$puts(darkred,2020A8|2F8FFF)$puts(verydarkred,0000A0|2F8FFF)$puts(brightred,0000FF|3333FF)
$puts(yellow,00FFFF|2F8FFF)$puts(orange,0080FF|2F8FFF)
$puts(lightblue,FFEE30|2F8FFF)$puts(paleblue,885530|6F8FCF)
$puts(greenish,208020|2F8FFF)
$puts(pink,C74BE0|6F8FCF)
$puts(white,FFFFFF|FFFFFF)
// change some colours if playing or not.
$if(%_isplaying%,$puts(darkred,$get(white))$puts(yellow,$get(white))
$puts(lightblue,$get(white)),$puts(brightred,$get(white)))

//filesize per minute
$puts(filesizebare,$div($mul(%_filesize%,60),%_length_seconds%))
$puts(filesizeinfo,$if($greater($get(filesizebare),1048576),
$num($left($num($muldiv($get(filesizebare),100,1048576),6),4),1)
.$right($muldiv($get(filesizebare),10,1048576),1)M,
$num($left($num($muldiv($get(filesizebare),100,1024),6),4),1)
K))

//codec
$puts(codec,$if(%__codec%,$caps2(%__codec%),$get(ext)))
$if($strcmp($get(codec),),
$if($stricmp($left(%_path_raw%,7),'cdda://'),$puts(codec,CDDA),)
,)

// column 1: artist
$puts(c1d,$substr(%_path%,1,$sub($len(%_path%),$len(%_filename%    ))))
$if(%artist%,$puts(c1a,%artist%),
$puts(flagI,I)
$if($strcmp($left($get(c1d),$len($get(homedir))),$get(homedir)),
$puts(c1p,$substr($get(c1d),$len($get(homedir).),$len($get(c1d)))),
$puts(c1p,$get(c1d)))
$puts(c1a,$get(c1p)))
$puts(c1a,$ifgreater($len($get(c1a)),0,$get(darkred)$get(c1a),))

// column 2: (year) album
$if(%year%,$puts(c2year,%year%),$if(%date%,$puts(c2year,%date%),
$if(%discyear%,$puts(c2year,%discyear%)$puts(flagD,D),$puts(c2year,NONE)$puts(flagD,D))))
$if($strcmp($get(c2year),NONE),$puts(c2year,),$puts(c2year,$get(orange)'('$get(c2year)') '))
$if(%album%,
$puts(c2a,$get(c2year)$get(yellow)$caps2(%album%)' '),$puts(c2a,$get(c2year))$puts(flagI,I))
$if(%disc%,$puts(c2a,$get(c2a)$get(greenish)CD %disc%))

// column 3: tn. title
$puts(tracknum,[$num(%tracknumber%,$if($greater(%tracknumber%,9),2,1))])
$if($or($strcmp($get(tracknum),'0'),$strcmp($len($get(tracknum)),'0')),$puts(tracknum,),$puts(tracknum,$get(tracknum)' '))
$if(%title%,$puts(c3t,%title%),$puts(c3t,%_filename%)$puts(flagI,I))
$puts(c3t,$replace($get(c3t),'(',$get(paleblue)'(',')',')'$get(lightblue)))
$puts(c3a,$get(verydarkred)$get(tracknum)$get(lightblue)$get(c3t))
$if(%version%,$puts(c3a,$get(c3a)': '$get(paleblue)%version%))

// column 4: (classical: performance info) (other: comment)
$if($strcmp(%genre%,Classical),
// classical case
$if($or(%performance_year%,%performance_artist%),
$if(%performance_year%,$puts(c4p,'('%performance_year%') '))
$if(%performance_artist%,$puts(c4p,$get(c4p)%performance_artist%))
$puts(c4a,$get(greenish)$get(c4p))
$if(%comment%,$puts(flagC,C)),
$if(%comment%,
$ifgreater($len(%comment%),26,
$puts(c4c,'('$left(%comment%,24)...')'),$puts(c4c,'('%comment%')')))
$puts(c4a,$ifgreater($len($get(c4c)),0,$get(pink),)$get(c4c))),
//other case
$if(%comment%,
$ifgreater($len(%comment%),26,
$puts(c4c,'('$left(%comment%,24)...')'),$puts(c4c,'('%comment%')')))
$puts(c4a,$ifgreater($len($get(c4c)),0,$get(pink),)$get(c4c))
)

// column 5: [playcounter: last play date]
$if(%play_date%,
//reformat date
$puts(c5_year,$substr(%play_date%,1,4))
$puts(c5_month,$substr(%play_date%,6,7))
$puts(c5_day,$substr(%play_date%,9,10))
$puts(c5_month,$select($get(c5_month),Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec))
$if($strcmp($substr($get(c5_day),1,1),0),$puts(c5_day,$substr($get(c5_day),2,2)))
$puts(c5a,$get(pink)'['%play_counter%': '$get(c5_day) $get(c5_month) $get(c5_year)']'),
$puts(c5a,$get(pink)' - - ')$puts(flagP,P))

// column 6: <flags> filesizeinfo tracklength
$if(%audioproblem%,$puts(flagA,A))
$if($strcmp($left(%_path%,$len($get(homedir))),$get(homedir)),,$puts(flagT,T))
$if($not(%__replaygain_album_gain%),$puts(flagR,R))
$if(%uncertain%,$puts(flagU,U))
$if($strcmp($get(codec),MP3),,$puts(flagF,F))
$if(%live%,$puts(flagL,L))
$ifgreater($len($get(flagA)$get(flagC)$get(flagD)$get(flagF)$get(flagI)$get(flagL)$get(flagP)$get(flagR)$get(flagT)$get(flagU)),0,
$puts(c6f,$get(white)
'<'$get(flagA)$get(flagC)$get(flagD)$get(flagF)$get(flagI)$get(flagL)$get(flagP)$get(flagR)$get(flagT)$get(flagU)'> '),)
$puts(c6a,$get(c6f)$get(greenish)$get(filesizeinfo) $get(brightred)%_length%)

// output
$replace(
$ifgreater($len($get(c1a)),0,$get(c1a),)$tab()
$ifgreater($len($get(c2a)),0,$get(c2a),)$tab()
$ifgreater($len($get(c3a)),0,$get(c3a),)$tab()
$ifgreater($len($get(c4a)),0,$get(c4a),)$tab()
$ifgreater($len($get(c5a)),0,$get(c5a),)$tab()
$ifgreater($len($get(c6a)),0,$get(c6a),),
$char(336),Ö,$char(337),ö,$char(368),Ü,$char(369),ü)


Status bar:
CODE
// nix counts how many seconds of displaytime i need
// displayorder is:
// 1. full title if artist/title is too long
// 2. Format string
// 3. number on album
// 4. Classical extra info
// 5. last played
// 6. Comment
// 7. Flags A, D/I/U, T
// 8. live or version
// 9. Xmas

$puts(homedir,'F:\Christian\Music\')
$puts(nix,0)
$puts(titleuncut,[%artist% - ]%title%[: %version%])
// 1
$ifgreater($len([%artist% - ]%title%),35,$puts(S1,Y)$puts(nix,$add($get(nix),5)),)
// 2
$puts(nix,$add($get(nix),5))$puts(S2,Y)
// 3
$if($or(%album%,%tracknumber%),$puts(S3,Y)$puts(nix,$add($get(nix),3)))
// 4
$if($strcmp(%genre%,Classical),$if($or(%performance_artist%,%performance_year%),
$puts(S4,Y)$puts(nix,$add($get(nix),3))))
// 5
$puts(S5,Y)$puts(nix,$add($get(nix),3))
// 6
$if(%comment%,$puts(S6,)$puts(nix,$add($get(nix),5)))
// 7
$if(%audioproblem%,$puts(flagA,A)$puts(S7A,Y)$puts(nix,$add($get(nix),1)))
$if($not($and(%artist%,%album%,%title%)),$puts(flagI,I))
$if($not($or(%year%,%date%)),$puts(flagI,I))
$if(%uncertain%,$puts(flagI,I))
$if($get(flagI),$puts(S7I,Y)$puts(nix,$add($get(nix),1)))
$if($strcmp($left(%_path%,$len($get(homedir))),$get(homedir)),,$puts(flagT,T))
$if($get(flagT),$puts(S7T,Y)$puts(nix,$add($get(nix),1)))
// 8
$if($or(%live%,%version%),$puts(S8,Y)$puts(nix,$add($get(nix),5)))
// 9
$if(%xmas%,$puts(S9,Y)$puts(nix,$add($get(nix),10)))

$puts(darkred,000070)$puts(black,000000)$puts(yellow,004080)$puts(green,005000)
$puts(red,0000B0)

// (format string)
$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),)
,)
$puts(codecinfo,$if($strcmp($get(codec),MP3),$get(yellow),$get(black))
$get(codec)$get(yellow)[ %__extrainfo%]' '
$if(%__bitrate_dynamic%,[%__bitrate_dynamic%kb/s ],%__bitrate%kb/s )[%__samplerate%Hz]' '
$if($and(%__mp3_stereo_mode%,$strcmp($get(codec),MP3)),['('%__mp3_stereo_mode%')'],
$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)),)))

// left part
$if($or(%artist%,%title%),
$ifgreater($len($get(titleuncut)),35,
$ifgreater($len([%artist% - ]%title%),35,$puts(leftpart,[%artist%]),
$puts(leftpart,[%artist% - ]%title%)),
$puts(leftpart,$get(titleuncut)))
$if($get(leftpart),$get(darkred)$get(leftpart)$tab())
,)

// middle part
$puts(shix,$mod(%_time_elapsed_seconds%,$get(nix)))
$puts(shixu,0)
// Test: $get(shix)-$get(nix)' '
$get(black)
// 1
$if($get(done),,$if($get(S1),$puts(shixu,$add($get(shixu),5))
$ifgreater($get(shixu),$get(shix),
$get(darkred)$puts(done,Y)[%title%],)))
//2
$if($get(done),,$if($get(S2),$puts(shixu,$add($get(shixu),5))
$ifgreater($get(shixu),$get(shix),
$puts(done,Y)$get(yellow)$get(codecinfo),)))
//3
$if($get(done),,$if($get(S3),$puts(shixu,$add($get(shixu),3))
$ifgreater($get(shixu),$get(shix),$puts(done,Y)
$puts(tracknum,[$num(%tracknumber%,$if($greater(%tracknumber%,9),2,1))])
$if($or($strcmp($get(tracknum),'0'),$strcmp($len($get(tracknum)),'0')),$puts(tracknum,),$puts(tracknum,$get(tracknum)))
$get(black)
$if($strcmp(%genre%,Classical),
$if(%album%,$puts(S3S,Y)%album%)
$if(%year%,' ('%year%')',$if(%date%,' ('%date%')'))
$if($and(%tracknumber%,$get(S3S)),
$if(%disc%,', CD '%disc%', track ',', mvt ')$get(tracknum))
,
$if(%tracknumber%,track $get(tracknum) )
$if(%album%,on %album%$if(%disc%,', CD '%disc%))
$if(%year%,' ('%year%')',$if(%date%,' ('%date%')')))
,)))
//4
$if($get(done),,$if($get(S4),$puts(shixu,$add($get(shixu),3))
$ifgreater($get(shixu),$get(shix),$puts(done,Y)
$get(green)
[%performance_artist%]
$if($and(%performance_artist%,%performance_year%),', ')
[%performance_year%]
,)))
//5
$if($get(done),,$if($get(S5),$puts(shixu,$add($get(shixu),3))
$ifgreater($get(shixu),$get(shix),$puts(done,Y)
$get(black)
$if(%play_date%,
//reformat date
$puts(d_year,$substr(%play_date%,1,4))
$puts(d_month,$substr(%play_date%,6,7))
$puts(d_day,$substr(%play_date%,9,10))
$puts(d_month,$select($get(d_month),Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec))
$if($strcmp($substr($get(d_day),1,1),0),$puts(d_day,$substr($get(d_day),2,2)))
$if($strcmp($substr(%play_date%,14,14),':'),$puts(d_time, $substr(%play_date%,12,16)),)
last played $get(d_day) $get(d_month) $get(d_year)$get(d_time),
no record of time last played)
,)))
//6
$if($get(done),,$if($get(S6),$puts(shixu,$add($get(shixu),5))
$ifgreater($get(shixu),$get(shix),$puts(done,Y)
$get(black)[%comment%],)))
//7
$if($get(done),,$if($get(S7A),$puts(shixu,$add($get(shixu),1))
$ifgreater($get(shixu),$get(shix),$puts(done,Y)
$get(red)low audio quality,)))
$if($get(done),,$if($get(S7I),$puts(shixu,$add($get(shixu),1))
$ifgreater($get(shixu),$get(shix),$puts(done,Y)
$get(red)song information is uncertain/incomplete,)))
$if($get(done),,$if($get(S7T),$puts(shixu,$add($get(shixu),1))
$ifgreater($get(shixu),$get(shix),$puts(done,Y)
$get(red)temporary folder,)))
//8
$if($get(done),,$if($get(S8),$puts(shixu,$add($get(shixu),5))
$ifgreater($get(shixu),$get(shix),$puts(done,Y)
$get(black)
$if(%version%,'"'%version%'"')
$if($and(%version%,%live%),', ')
$if(%live%,$if($strcmp(%live%,.),live,recorded %live%))
,)))
//9
$if($get(done),,$if($get(S9),$puts(shixu,$add($get(shixu),10))
$ifgreater($get(shixu),$get(shix),$puts(done,Y)
$get(black)Merry Christmas!,)))

$tab()

// right hand side
$get(black)$if($greater(%_filesize%,1048576),
$num($left($num($muldiv(%_filesize%,100,1048576),6),4),1)
.$right($muldiv(%_filesize%,100,1048576),2)MB,
$num($left($num($muldiv(%_filesize%,100,1024),6),4),1)
.$right($muldiv(%_filesize%,100,1024),2)KB)
' '
$get(green)$ifgreater($mod(%_time_elapsed_seconds%,6),2,
'('$if2(%__replaygain_album_gain%,
$get(black)R$get(green))')',
')'$if2(%__replaygain_track_gain%,
$get(black)R$get(green))'(')
' '
$get(black)$if(%_time_total%,[%_time_elapsed%]'/'[%_time_total%],[%_time_elapsed%])
' ('$div($add($mul(%_time_elapsed_seconds%,100),50),%_time_total_seconds%)'%)'


Any improvements, PM me. Enjoy :-)
bredymer
I'm sorry if this has been asked, but i tryed searching and found nothing, but, is it possible to make every other artist name appear in a different color?

something along the lines of this?

0501. LittleEden - [Demo] Little earthquake [4:57]
0502. LittleEden - [Demo] On my way [3:35]
0503. LittleEden - [LittleEden - Demo 2002 #00] The Vanishing [3:24]
0504. Live - The Dolphin's Cry [4:25]
0505. Live - Turn my head [3:57]
0506. London Symphony Orchestra, Royal Choral Society - [Symphonic Rock-The British Invasion: Vol.1 #10] Nights In White Satin [4:51]
0507. Louis Armstrong - A kiss to build a dream on [3:04]
0508. Louis Armstrong - What a Wonderful World [2:08]

I really can't figure out a way to do this, but it would be so cool for getting an overview of a playlist.

many thanx in advance!
upNorth
No, it's not possible.

A formatting string works with one track at a time and doesn't have any memory og look ahead abilities.
juglesh
QUOTE(bredymer @ Sep 12 2004, 08:35 AM)
I'm sorry if this has been asked, but i tryed searching and found nothing, but, is it possible to make every other artist name appear in a different color?

something along the lines of this?

0501. LittleEden - [Demo] Little earthquake [4:57]
0502. LittleEden - [Demo] On my way [3:35]
0503. LittleEden - [LittleEden - Demo 2002 #00] The Vanishing [3:24]
0504. Live - The Dolphin's Cry [4:25]


kinda like this:http://www.hydrogenaudio.org/forums/index....ndpost&p=183374
bredymer
Thx Juglesh, verymuch indeed. Although it would have been nicer if I could choose the colors myself, but atleast i can control a color-range, so no artist will blend in with the background.

I changed it, so that every artist has his own color (based on length) and every album its own, also based on length. Works good, check it out!

CODE
// check if all standard tags are present
$if($meta_test(title,artist,album),
// formatting for files with tags:

// check if track belongs to VA album
$if($or($stricmp(%album artist%,VA),$stricmp($left(%album artist%,7),various)),$puts(va,1),)

// 'album' formatting
$puts(album,'['%album%[ - CD$num(%disc%,1)]']'[ '['$num(%tracknumber%,2)']']
)

//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%)
)

// formatting for files without all the tags:
,
$if(%title%,
$puts(title,%title%)$if(%artist%,$puts(artist,%artist%)),
$puts(title,$if($stricmp($left(%_path_raw%,7),'http://'),%_path_raw%,
%_filename_ext%)))
)

// coloring and outputting data

$puts(foo1,$mod($mul($len($get(artist)),30),255))
$puts(foo2,$mod($mul($get(foo1),2),255))
$puts(foo3,$mod($mul($len($get(album)),10),255))


$rgb(135,150,170,135,150,170)$num(%_playlist_number%,4)│' '
$rgb($get(foo1),$get(foo2),255)[$get(artist) - ]
$rgb($get(foo1),255,$get(foo3))[$get(album) - ]
$rgb(35,205,240,35,205,240)[$get(title)]
[$char(9)$rgb(185,185,205,185,185,205)│ $if($not($greater($len(%_length%),4)),' ')%_length%]
juglesh
yeah, pretty cool! if you decrease the 255 numbers, the colors wont be so glaring. make em too low and theyll turn to grey, though. play around with 'em, you'll see.
bredymer
I have decreased them a little, but I'm using this on a black background, so it's nice to keep the colors bright wink.gif
khiloa
my config is the default foobar one but with some colors:

CODE
// check if all standard tags are present
$if($meta_test(title,artist,album),
// formatting for files with tags:

// check if track belongs to VA album
$if($or($stricmp(%album artist%,VA),$stricmp($left(%album artist%,7),various)),$puts(va,1),)

// 'album' formatting
$puts(album,'['%album%[ - CD$num(%disc%,1)]']'[ '['$num(%tracknumber%,2)']']
)

//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%)
)

// formatting for files without all the tags:
,
$if(%title%,
$puts(title,%title%)$if(%artist%,$puts(artist,%artist%)),
$puts(title,$if($stricmp($left(%_path_raw%,7),'http://'),%_path_raw%,
%_filename_ext%)))
)

898989|898989
$num(%_playlist_number%,$len(%_playlist_total%)).' '

8080ff|8080ff
[$get(artist) - ]

ff9933|ff9933
[$get(album) - ]

5ab433|5ab433
[$get(title)]

898989|898989
//[$char(9)$if(%_isplaying%,'--> ')%_length%]
$char(9)
[$if(%_isplaying%,'--> ')%_length%]


I want the "now playing thing" to fade in (ex: dark grey ">" ; lighter grey ">" ; even lighter grey ">" ; then a white ">" but it doesn't do anything if i change the color codes right above that stuff.

I'm also willing to try a new config, as long as it is really simple. smile.gif

It appears as if the big foobar format string site is down. sad.gif
saverio
QUOTE(bredymer @ Sep 12 2004, 07:19 PM)
Thx Juglesh, verymuch indeed. Although it would have been nicer if I could choose the colors myself, but atleast i can control a color-range, so no artist will blend in with the background.

I changed it, so that every artist has his own color (based on length) and every album its own, also based on length. Works good, check it out!


Hi.

I changed a little the conditions, as to follow "compilation" tags put by iTunes.
Here is the relevant portion:

CODE

// check if track belongs to VA album
$if($or($stricmp(%album artist%,VA),$stricmp($left(%album artist%,7),various),%various%),$puts(va,1),)
///////  here the last "%various%" tag is added to the $or
....

//if 'album artist' tag is present
$if($or(%album artist%,%various%),
///////   and here the same "%various%" tag is orred with the other condition



Bye.


edit: removed the [ B ] tags in [ CODE ], they do not work.
khiloa
Can someone tell me how to add to this formatting:

CODE
$if(%artist%,
$puts(t_artist,$get(c_green)$padcut(%artist%,$get(l_min)))
,
$puts(t_artist,$get(c_lightbrown2)$padcut($get(t_filename),$get(l_min)))
)

$if(%station%,
$puts(t_artist,$get(c_lightorange)$padcut(%station%,$get(l_min)))
)

$puts(codec,)
$puts(column1,$get(t_artist))
$puts(padding,)
$puts(tracknumber,$get(c_lightbrown)' │ ')
$puts(title,$get(c_blue2)$get(t_title)$if($strcmp(1,$get(color_extra)),$get(c_darkblue2)$get(extra)))
$puts(divider,)
$puts(spacer_trno_title,)

//---show extra info (tracknumber/album)
$if($strcmp(1,$get(ext_info)),
$puts(trno,$get(c_lightbrown)$if(%tracknumber%,'├','│')$if(%tracknumber%,$get(c_orange)$num(%tracknumber%,2),'  ')$get(c_lightbrown)$if(%tracknumber%,'┤','│'))
$puts(alb,[ %album%][' ['Disc%disc%']'])
$puts(extra,$cut($get(extra),$sub($get(l_min2),$len($get(t_title)))))

$puts(title,
$get(c_blue2)$cut($get(t_title),$get(l_min2))
$if($strcmp(1,$get(color_extra)),$get(c_darkblue2)$get(extra))
$repeat(' ',$sub($get(l_min2),$add($len($get(t_title)),$len($get(extra)))))
$get(trno)$get(c_darkblue2)$get(alb))
)

)
//---


this code for the playlist numbers:

CODE
$ifgreater(%tracknumber%,9,
$puts(tracknumber,$get(c_orange)$num(%tracknumber%,2))
,
$puts(tracknumber,$get(c_darkorange)0$get(c_orange)$num(%tracknumber%,1))
)

$if($strcmp($num(%tracknumber%,1),1),
$puts(tracknumber,$get(c_lightbrown)'┬'$get(tracknumber)$get(c_lightbrown)'┬')
)

$ifgreater(%tracknumber%,1,
$if(%lasttrack%,
$puts(tracknumber,$get(c_lightbrown)'└'$get(tracknumber)$get(c_lightbrown)'┘')
,
$puts(tracknumber,$get(c_lightbrown)'├'$get(tracknumber)$get(c_lightbrown)'│')
),
)

//if singletrack or tracknumber == 0
$if($or($strcmp(1,$get(is_single)),$strcmp(%tracknumber%,'0')),
$if(%title%,
$puts(tracknumber,$get(c_lightbrown)' ── '$get(c_lightbrown))
,
$puts(tracknumber,)
)
)

//if no tracknumber
$if(%tracknumber%,,
$puts(tracknumber,$get(c_lightbrown)' ── ')
)

//if station
$if(%station%,
$puts(tracknumber,$get(c_lightbrown)' ── '$get(c_lightbrown))
)


All of this is from http://pelit.koillismaa.fi/fb2k/strings.php?f=16

the main formatting here is the "Single" version and the tracknumbers part comes from the "Album" version. Thanks for any help.
upNorth
@khiloa: Can you please try to explain what you are trying to achieve? It's a while since I looked through the full code of my "hybrid" formatting.

Note:
It's not the easiest thing to just cut and paste parts of it. Most of it belongs in a context and depends on parts of the previous code. You have for example skipped the definision of all the colors (e.g. "c_lightbrown"), and you also need to create the string at the end using a $get(blah) for every $puts(blah, ....).
khiloa
Well I have it basically finished now I think.. it currently looks like this:

[306] Berliner Philharmoniker - [01] Symphony no. 39 in E flat major K. 543 - I. Adagio - Allegro [01] Mozart Symphonies CD 2 8:16

(Slightly simplified the box edge formatting stuff in the example above)

Basically it is exactly the same as the default single mode formatting (with the album numbering coloring added in) but instead of the lightbrown line in front of the Album it has the album tracknumber.. and it has it at the default location where I want it..

here is the currentl "Single mode" formatting I have:

CODE
//**************************************
// START SINGLE MODE FORMATTING
//**************************************
$if($strcmp(0,$get(mode)),
$puts(c_green,$if(%_isplaying%,5C9917|5C9917,5C9917|5C9917))

$if(%artist%,
$puts(t_artist,$get(c_green)$padcut(%artist%,$get(l_min)))
,
$puts(t_artist,$get(c_lightbrown2)$padcut($get(t_filename),$get(l_min)))
)

$if(%station%,
$puts(t_artist,$get(c_lightorange)$padcut(%station%,$get(l_min)))
)

$puts(codec,)
$puts(column1,$get(t_artist))
$puts(padding,)
$puts(tracknumber,$get(c_lightbrown)' │ ')
$puts(title,$get(c_blue2)$get(t_title)$if($strcmp(1,$get(color_extra)),$get(c_darkblue2)$get(extra)))
$puts(divider,)
$puts(spacer_trno_title,)

//---show extra info (tracknumber/album)
$if($strcmp(1,$get(ext_info)),
$puts(trno,$get(c_lightbrown)$if(%tracknumber%,'├','│')$if(%tracknumber%,$get(c_orange)$num(%tracknumber%,2),'  ')$get(c_lightbrown)$if(%tracknumber%,'┤','│'))

//**************************************
// tracknumber
//**************************************
$ifgreater(%tracknumber%,9,
$puts(tracknumber,$get(c_orange)$num(%tracknumber%,2))
,
$puts(tracknumber,$get(c_darkorange)0$get(c_orange)$num(%tracknumber%,1))
)

$if($strcmp($num(%tracknumber%,1),1),
$puts(tracknumber,$get(c_lightbrown)'├'$get(tracknumber)$get(c_lightbrown)'┤')
)

$ifgreater(%tracknumber%,1,
$if(%lasttrack%,
$puts(tracknumber,$get(c_lightbrown)'└'$get(tracknumber)$get(c_lightbrown)'┘')
,
$puts(tracknumber,$get(c_lightbrown)'├'$get(tracknumber)$get(c_lightbrown)'┤')
),
)

//if singletrack or tracknumber == 0
$if($or($strcmp(1,$get(is_single)),$strcmp(%tracknumber%,'0')),
$if(%title%,
$puts(tracknumber,$get(c_lightbrown)' ── '$get(c_lightbrown))
,
$puts(tracknumber,)
)
)

//if no tracknumber
$if(%tracknumber%,,
$puts(tracknumber,$get(c_lightbrown)' ── ')
)

//if station
$if(%station%,
$puts(tracknumber,$get(c_lightbrown)' ── '$get(c_lightbrown))
)



//**************************************

$puts(alb,[ %album%][' ['Disc%disc%']'])
$puts(extra,$cut($get(extra),$sub($get(l_min2),$len($get(t_title)))))

$puts(title,
$get(c_blue2)$cut($get(t_title),$get(l_min2))
$if($strcmp(1,$get(color_extra)),$get(c_darkblue2)$get(extra))
$repeat(' ',$sub($get(l_min2),$add($len($get(t_title)),$len($get(extra)))))
$get(tracknumber)$get(c_darkblue2)$get(alb))
)

)
//---

//**************************************
// END SINGLE MODE FORMATTING
//**************************************


I'll get a picture of it if you want. Hope you can help.
khiloa
OKay, I've got it all working. smile.gif
phew
hello guys & gals

I'm desperately trying to work out a string for the textwriter plugin to give me the correct codec info depending on the filetype AND the propper quality information like CBR, VBR, q7, CDDA and so on...

The code below is what I'm using now but it doesn't show the CBR/VBR info right if it's not mp3. maybe someone out there is able to help me with my little problem? ;-)
I'd really be grateful!

Thanks a lot

phew


CODE

%_foobar2000_version%$char(13)$char(10)
$if(%_ispaused%,%_foobar2000_version% is paused.$char(13)$char(10)$char(13)$char(10),[%artist% - ]$if(%title%,['['%album%[ #[%disc%/]$num(%tracknumber%,2)]'] ']%title%,%_filename_ext%)$char(13)$char(10)


'['%_time_elapsed%[ $select($add($mod(%_time_elapsed_seconds%,4),1),'-','\','|','/') %_time_remaining%]']'
'['$progress(%_time_elapsed_seconds%,%_time_total_seconds%,15,'#','=')']') $if(%_time_total%,'['%_time_total%']' )
$if(%_ispaused%,,$if(%genre%,'['%genre%']',))
$char(13)$char(10)


[$num(%_playlist_number%,$len(%_playlist_total%))/][%_playlist_total% '['%_playlist_name%']']
$if(%__codec%,$caps2(%__codec%),$get(ext))
$if(%_isplaying%,$if(%__bitrate_dynamic%,%__bitrate_dynamic%kbps ),$if(%__bitrate%,%__bitrate% ))$if(%__extrainfo%,%__extrainfo% ,CBR )

$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,Stereo,Mono)),)$if(%date%, '['%date%']')
Hadda
Hi.
I have problem with my skin for foo_looks. But this may be solve by string formatting i think.
So this is my problem: I wont to get some value (this may be true or something) if track is selected. I know how i can change colour if track is selected but i'm interestig how to get this information oudside visible efect to get efect out from foobar playlist smile.gif.( I can get any formatting string of any index of playlist). Maybe someone can help.

Regards Hadda
vasya_pupkin
Here are mine strings. It's slightly changed version of Case's first strings smile.gif
formatting.txt
jlaczko
How can I show the name of a shoutcast station.
The following tags are wrong: %title%, %artist%, %album%, %disc%, %tracknumber%, %_filename_ext%, %_path%, %_filename%, ...

I need only simply see the name of the stations. When I have a playlist, which contains 20-30 radio stations, it's very uncomfortable change between them if I can't see the name of the stations...

(The Winamp/QCD can show the name perfectly...)

Thanks,
Laczkó József
smok3
%station%
phew
uhm... it doesn't seem like I'd get a reply...
jlaczko
QUOTE(smok3 @ Nov 2 2004, 08:29 AM)
%station%
*


The result is: ?
(A question mark)

I tested it with the following stations: all the "Digitally Imported", CLUB 977, ...
(every radio from www.shoutcast.com)

Does it work for anybody?
nObLe_SiN
user posted image

Does someone know how to make the playlist items look embossed or raised looking as in the screenshot above? See how each one kinda has a highlight color and a shadow color so it makes each row look sorta raised looking? Anyone know how to change those colors? Thanks!
anza
I think they just have different border colors (you'll need foo_ui_columns for that).
RyanVM
How would I go about formatting the title so that songs with "Soundtrack" as their genre are formatted like this?
CODE
[Album] - # - Artist - Song
GodsMadClown
Is http://pelit.koillismaa.fi/fb2k/ down? I can't seem to load it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.