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
billcow
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(Dibrom @ Mar 15 2003 - 12:18 AM)
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(Dibrom @ Mar 15 2003 - 12:18 AM)
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 wink.gif

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(Dibrom @ Mar 15 2003 - 12:18 AM)
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(Dibrom @ Mar 15 2003 - 12:18 AM)
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(Dibrom @ Mar 15 2003 - 12:18 AM)
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. smile.gif

That's one thing I was thinking of. Does thinking the same thing as you make me a great mind by default?
Somebody
QUOTE(Rommel @ Mar 16 2003 - 03:04 PM)
@penvzila
the extension of the file in your screenshot link is .txt  huh.gif
I think your image is .png  smile.gif

That's the only way to trick geocities into having the image be displayed without bitching at you whenever you click the link.
justinj88
Here's my playlist string:
CODE
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.
billcow
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?
voltron
My updated formatting, for anyone who loves simplicity.

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

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

Window title
CODE
$if(%title%,%title%,%_filename%)

Status bar
CODE
%__bitrate%/$cut(%__samplerate%,2) - %_time_elapsed%/%_time_total%

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


And this is what it looks like in all its glory (5.6kb GIF):
user posted image

Comments are welcome.
Rommel
QUOTE(Somebody @ Mar 17 2003 - 12:03 AM)
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
floyd
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 wink.gif
billcow
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

// 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.
billcow
Last version doesn't work.

CODE

$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

$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.
ranor
While playing around with anza's replaygain/mp3pro indicators, I came up with this. Simple, effective and pretty cool looking IMHO. B)

screenshot

CODE
// 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/)
Playlist Background Color: White (255, 255, 255)
Playlist Selection Color: 235, 235, 235
Selected Item Frame: 154, 154, 154
floyd
QUOTE(billcow @ Mar 17 2003 - 03:26 PM)
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.
billcow
That's probably because I forgot to tell you to specify the number of characters displayed with $puts(WIDTH,###)
justinj88
QUOTE(billcow @ Mar 16 2003 - 11:22 PM)
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

:::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
musicmusic
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..
playerman
QUOTE(smok3 @ Mar 10 2003 - 12:37 PM)
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))...
penvzila
QUOTE(Somebody @ Mar 16 2003 - 03:03 PM)
QUOTE(Rommel @ Mar 16 2003 - 03:04 PM)
@penvzila
the extension of the file in your screenshot link is .txt  huh.gif
I think your image is .png  smile.gif

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)_
penvzila
wops
penvzila
QUOTE(DarkAngel @ Mar 14 2003 - 06:52 PM)

...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.
penvzila
QUOTE(justinj88 @ Mar 16 2003 - 05:52 PM)
Here's my playlist string:
CODE
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.

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

CODE
:::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.
playerman
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.
billcow
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.
ranor
I just updated my screenshot. Take a look. I'm really quite proud of it. biggrin.gif
anza
QUOTE(billcow @ Mar 18 2003 - 12:44 AM)
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 smile.gif
musicmusic
subtle colour fader for status bar if anyones interested:

CODE
$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.
musicmusic
QUOTE(anza @ Mar 18 2003 - 02:46 PM)
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 smile.gif

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

CODE
////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)))),))
fenterbug
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. sad.gif

CODE
$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%')'
ZiY0N
http://home.attbi.com/~billamral/TAGZ.TXT

Awsome documentation for tagz imo.


Thanks bamral, case, death, dibrom, lking, kode54, musicmusic smile.gif
billcow
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.
Dibrom
Here's what I've come up for a playlist script:

http://static.hydrogenaudio.org/extra/dibr...gz-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
// --------------------------------------------------------------------------------------- //
// [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" sad.gif).

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.
musicmusic
QUOTE(ZiY0N @ Mar 19 2003 - 05:36 AM)
http://home.attbi.com/~billamral/TAGZ.TXT

Awsome documentation for tagz imo.


Thanks bamral, case, death, dibrom, lking, kode54, musicmusic smile.gif

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 smile.gif
Bamral
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)
musicmusic
QUOTE(Bamral @ Mar 19 2003 - 02:49 PM)
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.
Bushwack
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 biggrin.gif

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.
Bamral
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
Yog-Sothoth
Hi guys, I'm using this code:
CODE
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)

Thx

Update: font - Euromode
smok3
my 'update' for 0.58, snapshot:
http://users.volja.net/smoker/pub/foobar05...fg_snapshot.gif

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

edit: @Yog-Sothoth: what font is that?
_io_
Just thought i'd add mine to the list, requires a %quality% tag.

picture (291KB)
Thadeus
And here is my foobar - I especialy like progres bar thx for idea of it smile.gif

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

 |\     |\
0|     O'
ak
QUOTE(Thadeus @ Mar 21 2003 - 01:35 AM)
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.
Funkstar De Luxe
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
$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
.$ext(%_filename_ext%)[ • %__bitrate%kbps][ • %__samplerate%Hz]

'['$progress(%_time_elapsed_seconds%,%_time_total_seconds%,25,»,'=')']  '
Thadeus
QUOTE(ak @ Mar 21 2003 - 01:53 AM)
$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
Messer
QUOTE(Thadeus @ Mar 21 2003 - 01:13 AM)
Thx, where can i find such list? Im only getting the one with Asci ahars not windows encoded

Put
CODE
%_playlist_number% - $char(%_playlist_number%)$char(9)

at the beginning of your playlist formatting string and add at least 65536 tracks wink.gif (you can add the same tracks multiple times).
ak
...or find the character in charmap and do some hex->dec conversion.
In case you don't have enough tracks available biggrin.gif .
McLone
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
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
//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
$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
$if($strstr(%_path_raw%,'http://'),'',$if($strstr(%VARIOUS%,'Yes'),'z'%album%,%artist% %year% %date% %album%))$num(%tracknumber%,3)


Copy Command / foo_textinfo.cfg
CODE
$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?
Supachikn
http://ruination.net/stuff/fb2ktitle.txt
AlfredSka
foobar2000 v0.586
KISS Theory in Action
[Edited on 3-26-03 to make use of $char(9) columns]

Screen Shot: Foobar Screen Shot

Playlist: (Font = Sylfaen)
CODE
$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
$if(%title%,
[%artist% - ]%title%,
$caps2(%_filename%))


Window Title:
CODE
$if(%title%,

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

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


Status Bar:
CODE
$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
FooBaRaz
I'm so clueless..I don't know how to do any of this stuff or where to enter it...
voltron
preferences >> title formatting >> help
taezou
mine is pretty simple compared to everyone else's

CODE

$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
anza
Anyone know how to show total length of an album in the album list? (or why not in somewhere else)
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.