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
anza
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)))),))
musicmusic
anza: always try to keep colour codes outside the function:

CODE
////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.
B
OK, finally made my formatting string.

Screenshot

Formatting strings

Font used

Not too much colors, the way i like it ..
anza
QUOTE(musicmusic @ Apr 12 2003 - 12:43 AM)
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:
user posted image
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 my formatting for the statusbar (where the scroller would go), so you can have a look and hopefully undestand better what I want.
musicmusic
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)
LightYears
Here's mine, clean and simple
playlist
CODE

$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
$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)'%'']','-')'|'
anza
musicmusic, thanks for giving your hand on this one smile.gif 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 smile.gif I can do some complex codes with fb's formatting, but that scroller thing is hebrew for me blink.gif
Oh, weird that the pic won't work, it should...
LPTB
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
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)]
musicmusic
QUOTE(anza @ Apr 12 2003 - 05:38 PM)
musicmusic, thanks for giving your hand on this one smile.gif 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 smile.gif I can do some complex codes with fb's formatting, but that scroller thing is hebrew for me blink.gif
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
////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. huh.gif

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.
anza
Hey thanks! I'll try that out right away smile.gif I believe that I can modify that for my needs now, but I'll let you know if I get some problems.
billcow
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.
LPTB
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
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.
Jan S.
Screenshot

CODE
// 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%]
Ayaka
CODE
// 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

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
Anyone knows how I can fix this problem?
If there is no solution, I hope this problem will be fixed in ver0.6... smile.gif
Mafioso
Screenshot

CODE
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) |
DotNoir
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 wink.gif

/DotNoir
anza
Change this line:

$if(%tracknumber%,$num(%tracknumber%,2), ) |

to this:

$if(%tracknumber%,$cut($num(%tracknumber%,2),2), ) |

It should help smile.gif
DotNoir
Now I have this in my playlist code :
CODE
$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

edit: please post links to large images.

edit: Sorry. I was thinking about it, but (of course) hadn't read the rules... unsure.gif
Mafioso
Replace this:
CODE
$if($strcmp(%tracknumber%,1),FFFFFF|FFFFFF)
$if($strcmp(%tracknumber%,1),$puts(spacer,-),$puts(spacer, ))


with this:
CODE
$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.
DotNoir
Sorry to spam like this wink.gif 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 wink.gif

Thanks guys!

Oh, and thanks to Mafioso for the code...

/DotNoir (forever a noob, forever greatful)
rejj
QUOTE(DotNoir @ Apr 15 2003 - 06:19 AM)
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. smile.gif
amppa
Edited away tongue.gif
It still needs some modification..
superdumprob
I've only just started playing about with the format strings, so please bear with me.

I've "borrowed" (wink.gif) code from others in this forum and I extend my thanks to all in this thread.

CODE
$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($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
DotNoir
QUOTE(rejj @ Apr 14 2003 - 01:46 PM)
QUOTE(DotNoir @ Apr 15 2003 - 06:19 AM)
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. smile.gif

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 smile.gif And now you must realize that I have tagged almost all of my 10000 MP3s... So, well... My problem is quite "big" wink.gif 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 smile.gif

Also... Using this in the code :
CODE

$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

TAG 1
TAG 2


Another sample of playlist
And a tag...

Sorry to keep bothering you like this...
Mafioso
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
$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.
DotNoir
Thanks a million! Now it's working properly smile.gif Sorry about being such a bother though...
superdumprob
OK, well I'll my post quicker to read then. tongue.gif smile.gif 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
Moneo
QUOTE(superdumprob @ Apr 15 2003 - 10:03 AM)
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)
superdumprob
Thanks Moneo, sorry, I would have thought but I was a bit busy... sad.gif I will do next time.
Skibbi
Hi,
CODE

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

user posted image
superdumprob
I like your windows style Skibbi, what is it?
Mafioso
I made a new statusbar code:
CODE
////////////////////////
// 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

I've also added red a Red > and < in the playlist, to indicate which file is playing:
CODE
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,|)
Skibbi
QUOTE(superdumprob @ Apr 15 2003 - 05:59 AM)
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 but I'am not sure.
FooBaRaz
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...
voltron
are all your files tagged correctly?
FooBaRaz
no, what is a good tag editor?
nexus
Hi there, here's mine:

user posted image

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).
Schinkentoni
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?
Ghim
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
Bushwack
QUOTE(nexus @ Apr 15 2003 - 11:18 PM)

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.
Atlantis
QUOTE(Mafioso @ Apr 15 2003 - 04:30 PM)
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 smile.gif)
Hope you like it.

CODE
$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
Mafioso
Puased .. damn I've to watch my typin' smile.gif

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
$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
$puts(lenght_bar,$sub(160,$mul(2,$len(%artist%' - '%title))))


You may have to tweak those values

[Edit]
I've also changed
CODE
$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
$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.
smok3
my latest/greatest:
snap: http://users.volja.net/smoker/pub/foobar20...2000_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)
anza
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 smile.gif

user posted image
[foobar on my desktop]
[formatting strings]
nexus
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
Stefoufou
My first attempt smile.gif

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
ssamadhi97
QUOTE(Stefoufou @ Apr 16 2003 - 06:46 PM)

The Clash - London Calling?

Awesome, one of my favourite albums ever. smile.gif *gives it a spin*
sauzer
My Cheep Creates PlayList format strings.

user posted image

playlist

QUOTE

$if(%title%,%title%,%filename%) || FF1117[%artist%]000000 || 000000%album%[[%disc%/] - $num(%tracknumber%,2)]


Playlist selection color : #858585
Stefoufou
QUOTE(ssamadhi97 @ Apr 16 2003 - 10:57 AM)
QUOTE(Stefoufou @ Apr 16 2003 - 06:46 PM)

The Clash - London Calling?

Awesome, one of my favourite albums ever. smile.gif *gives it a spin*

i ve edited both my screenshot and code

yes the clash is wonderful smile.gif i very like gun of brixton because this song reminber me my winter holidays laugh.gif
Mike Giacomelli
Stefoufou:

I tried your playlist and a few others. All of them only display the year in about 1 in 100 songs. blink.gif

They worked fine in .586. Any idea why they don't in .6?
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.