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
Gaffa
QUOTE(taezou @ Mar 23 2003 - 10:38 AM)
mine is pretty simple compared to everyone else's

screen shot of it here

I like it, what is that font called?
taezou
QUOTE(Gaffa @ Mar 23 2003 - 07:42 AM)
I like it, what is that font called?

it's called mono 07_55, though i modified mine to extend the pipe so there are no vertical gaps.
Skates
taezou can you post that modified font or maybe email it to me or something by any chance?
voltron
QUOTE(Skates @ Mar 23 2003 - 10:32 AM)
taezou can you post that modified font or maybe email it to me or something by any chance?

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

voltron (at) attbi (dot) com
opaquefog
user posted image
opaquefog
foobar2000
it's simple
it's good
taezou
QUOTE(Skates @ Mar 23 2003 - 10:32 AM)
taezou can you post that modified font or maybe email it to me or something by any chance?

here's the font
haloeight
please forgive my n00b-boobery, but could someone please help me with something?

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

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

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

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

Help please?
/\/ephaestous
@poorimpulsectrl.

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

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

It means if the extension is .cue then show the embedded artist and title tags, else show the filename.
haloeight
You kick ass Nephaestous! I'll give it a shot. Thanks.

edit : just tried it and it seems as though it still displays the parent mp3 file instead of the subtrack names for cue files enqueued. sad.gif
Bushwack
well I don't use cue files for my mp3s and so I don't really understand what you're trying to do, but I think /\/ephaestous meant:

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

give that a try.
kalt
I was following that string for another use in my playlist, but I can tell you that it definitely worked for me. Thanks Bushwack!
haloeight
QUOTE(Bushwack @ Mar 25 2003 - 03:24 AM)
well I don't use cue files for my mp3s and so I don't really understand what you're trying to do, but I think /\/ephaestous meant:

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

give that a try.

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

I put in the code you gave, and it works! It's now showing the names of tracks contained in the cue file, now I'll just try and add the artist information myself. Thanks again to both you and Nephaestous.
haloeight
Two quick questions -

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

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

I've tried looking at the code other people have used here but haven't gotten anything to work right.
Canar
QUOTE
I looked at the text file and there doesn't seem to be anything listed for "Performer" information within cue files.


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

Edit: not meant to be inflammatory. Sorry. sad.gif
haloeight
Seeing as a] I'm not a programmer and b] it seems people are putting a lot of stuff into their codes that demonstrate knowledge beyond what's readily available in that text file, I thought it worth asking. But sorry if in so doing I terribly inconvenienced your existence.
mgoodgood
My playlist config
QUOTE
$if(%_isplaying%,$puts(maincol,FFFFFF),$puts(maincol,))
$puts(sidecol,FF8000)
$puts(separator,|)

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

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

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

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

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



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

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

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



font used is mono0755 from taezou smile.gif

screenshot here
psyqil
QUOTE(poorimpulsectrl @ Mar 25 2003 - 10:16 PM)
Seeing as a] I'm not a programmer and b] it seems people are putting a lot of stuff into their codes that demonstrate knowledge beyond what's readily available in that text file, I thought it worth asking. But sorry if in so doing I terribly inconvenienced your existence.

Sorry, my internet was down a whole week... mad.gif
%track_artist% is what you´re looking for, as in "$if(%track_artist%,%track_artist%,%artist%)"
feelyou
$select($add($mod(%_time_elapsed_seconds%,2),1),╭∩╮(︶︿︶)╭∩╮,╭-╮(⌒_⌒)╭-╮)
smok3
how would i do something like:

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

(to avoid some stupidly named songs...)

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


which is almost working... (since they usualy START with 'track...')
edit: what i mean is if there is some command to check 'if the string contains some other substring'?
Bushwack
smok3 try somthing like:
QUOTE
$if($strcmp($replace($lower(%title%),'track',),$lower(%title%)),%_filename_ext%,%title% )
smok3
uhmm, well there is no 'lower' or 'replace' in the help file, so iam not sure what is that supposed to do, but i guess i wasnt clear enough, so an example:

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

i would like filename displayed instead of the title... ph34r.gif
penvzila
z
haloeight
QUOTE(psyqil @ Mar 30 2003 - 07:09 PM)
QUOTE(poorimpulsectrl @ Mar 25 2003 - 10:16 PM)
Seeing as a] I'm not a programmer and b] it seems people are putting a lot of stuff into their codes that demonstrate knowledge beyond what's readily available in that text file, I thought it worth asking. But sorry if in so doing I terribly inconvenienced your existence.

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

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

edit : *#$%in awesome, psyqil, thanks again, displays everything I want it to now!
Bushwack
smok3 $replace and $lower shoud be in the help file, they are in mine anyways:
QUOTE
- $lower(x), $upper(x) - converts x to in lower/uppercase, eg. "$upper(%title%)"

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



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

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

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

Now we compare the string we just generated to the lowercase %title% string (we could have used $stricmp instead and made the second $lower redundant) and then we use the $if to decide what to display based on the results of the comparison.
penvzila
shot
smok3
@bushwalk: tnx, ic what you were trying, i guess replace doesnt work in 0.586 (or iam just to dumb to make it work). blink.gif

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

(luckily they start with 'track' biggrin.gif )
sofia
playlist text color=007300
playlist bg color,playlist selection color,selected item frame color=000040


title formatting->playlist

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

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

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

Here's the screenshot

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

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

// Display
$get(display_text)

$char(9)
'['%_length%']'
ak
QUOTE(smok3 @ Apr 1 2003 - 04:30 PM)
(luckily they start with 'track'  biggrin.gif )

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

$if($strstr($lower(%title%),track),%_filename_ext%,%title%)
smok3
QUOTE(ak @ Apr 1 2003 - 09:32 PM)
QUOTE(smok3 @ Apr 1 2003 - 04:30 PM)
(luckily they start with 'track'  biggrin.gif )

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

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

yup, thats the one, cant belive i didnt saw the strstr thingy ph34r.gif (my latest cfg's are on my page as usual)
smok3
another one: has anyone done a tab distribution based on string lenghts, for example, i have 12 tabs reserved for album and artist, and i want those to be based on $len(%artist%) and $len(%album%)?
(so if the artist string is really short and album is really long then album should get more place) tongue.gif
nuhi
Is there any way to display artist and album only once in current playlist ?
Something like this:

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

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

I could make this, but i don't know the proper command for storing info so it's not "reseted" with the next song.
smok3
@nuhi
afaik you cant parse stored values to the next 'song', but there is something dumb that could work with some haxoring:

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

(will fail as soon as there is no song that will have tracknumber equal to 1 of course...)
nuhi
smok3, i can't believe that didn't cross my mind, it's working perfectly, maybe i'll post my playlist preset, it's quite nice now.

Thanx a lot...
rejj
I just grabbed fb2k today, and here is what I have come up with so far. Nothing special, but it does the job.
.. and yes, the format string is rather ugly (lots of ifs everywhere).

edit: I made a few minor modifications

CODE

// Currently playing song's colour
$puts(PC,FFFFFF|00FFFF)

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

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

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

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

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

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


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

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

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

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


and here is how it looks (15.6k image):
user posted image

The statusbar is taken from another thread, where someone came up with the clever idea of using the song name as a progress meter. Thanks to whoever that was (I can't remember sad.gif )
rejj
QUOTE(anza @ Apr 2 2003 - 04:24 AM)
This is something I just came up while playing a little with 0.6b2 smile.gif

Will the statusbar you pasted only work in 0.6 beta? It doesn't display anything in 0.586 unsure.gif
anza
I think it should work also with 0.586.. But at least it works with 0.6beta. I think you should try the beta4 out, as it's damn stable and REALLY cool smile.gif
nuhi
Screenshot [153kb]

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

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

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

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

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

Status bar:
$char(9)'|'$progress(%_time_elapsed_seconds%,%_time_total_seconds%,240,%_time_elapsed%666666' '$div($sub(%_time_total_seconds%,%_time_elapsed_seconds%),60):$num($mod($sub(%_time_total_seconds%,%_time_elapsed_seconds%),60),2),'666666|')'|'$char(9)
$ext(%_path%)'|'$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,stereo,mono)),)'|'$cut(%__samplerate%,2)'khz'$char(9)
Xecter
Playlist:
CODE
//IF
$if(%_isplaying%,FFFFF$padcut($num(%_playlist_number%,4),4)FFFFFF|$padcut(%_filename%,101)FFFFFF
FFFFFF|FFFFFF
$padcut(%_length%,7)
$padcut(%_length_seconds%s,5)
|FFFFFF
%__bitrate%,


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



And status bar:

CODE
•
0000FF
%_time_elapsed%

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


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



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

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



//Tab
$char(9)


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


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



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

CODE
$left($num($div($mul(10000,%_time_elapsed_seconds%),%_time_total_seconds%,),4),2)'.'$right($num($div($mul(10000,%_time_elapsed_seconds%),%_time_total_seconds%,),4),2)
Schinkentoni
Simple one


CODE
$if(%_isplaying%, 9F9F9F$num(%_playlist_number%,4).   [%artist%]$char(9) 9F9F9F %title% $char(9)  9F9F9F$if(%album%,%album%,)
$char(9) 9F9F9F %__bitrate% kbps $if(%__extrainfo%,%__extrainfo%,)$char(9) 9F9F9F%_length% Min.,000000|000000 $num(%_playlist_number%,4).   [%artist%]$char(9) 000000|000000 %title% $char(9) 000000|000000 $if(%album%,%album%,)
$char(9) 000000|000000 %__bitrate% kbps $if(%__extrainfo%,%__extrainfo%,)$char(9) 000000|000000 %_length% Min.)
Canar
Now that $blend's been fixed, here's my HSL->RGB converter.

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

CODE
$puts(hsl,
$ifgreater($get(hue),300,$blend($rgb(255,0,255),$rgb(255,0,0),$sub($get(hue),300),60),
$ifgreater($get(hue),240,$blend($rgb(0,0,255),$rgb(255,0,255),$sub($get(hue),240),60),
$ifgreater($get(hue),180,$blend($rgb(0,255,255),$rgb(0,0,255),$sub($get(hue),180),60),
$ifgreater($get(hue),120,$blend($rgb(0,255,0),$rgb(0,255,255),$sub($get(hue),120),60),
$ifgreater($get(hue),60,$blend($rgb(255,255,0),$rgb(0,255,0),$sub($get(hue),60),60),
$blend($rgb(255,0,0),$rgb(255,255,0),$get(hue),60)))))))

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

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


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

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

EDIT2: Now, if there was only a macro capability in FB2K or something, so I could actually use this for all my fields in my playlist. *sigh*
billcow
HSV->RGB converter

sat and val are in the range 0..256

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

CODE

$puts(hue,$mod($get(hue),360))$if($strchr($get(hue),-),$puts(hue,$add($get(hue),360)),)
$puts(hsv,
$ifgreater($get(hue),300,$blend($rgb(255,0,255),$rgb(255,0,0),$sub($get(hue),300),60),
$ifgreater($get(hue),240,$blend($rgb(0,0,255),$rgb(255,0,255),$sub($get(hue),240),60),
$ifgreater($get(hue),180,$blend($rgb(0,255,255),$rgb(0,0,255),$sub($get(hue),180),60),
$ifgreater($get(hue),120,$blend($rgb(0,255,0),$rgb(0,255,255),$sub($get(hue),120),60),
$ifgreater($get(hue),60,$blend($rgb(255,255,0),$rgb(0,255,0),$sub($get(hue),60),60),
$blend($rgb(255,0,0),$rgb(255,255,0),$get(hue),60)
))))))
$puts(hsv,$blend($rgb(255,255,255),$get(hsv),256,$get(sat)))
$puts(hsv,$blend($rgb(0,0,0),$get(hsv),128,$get(val)))
$puts(hsv,$blend($get(hsv),$rgb(255,255,255),128,$sub($get(val),128)))
$puts(hsv,$substr($get(hsv),1,7)|$substr($get(hsv),2,9))
maus
minor update...

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

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



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

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

playlist:
CODE

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

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


system tray:
CODE

$if(%artist%,%artist% - )$if(%title%, %title%,%_filename%)


window title:
CODE

%_path%


status bar:
CODE

'?'$progress(%_time_elapsed_seconds%,%_time_total_seconds%,75,0000FF%_time_elapsed%,?)'?' %_time_elapsed%[ / %_time_total%]


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

CODE

$puts(jukedir,I:\sound\final)
$puts(jukedirlength,$len($get(jukedir)))
$puts(songdir,$cut(%_path%,$get(jukedirlength)))
$if($strcmp($get(songdir),$get(jukedir)),
$if($stricmp(%artist%,Various Artists),
1 - %album% - %album% - $num(%tracknumber%,3),
1 - %artist% - %album% - $num(%tracknumber%,3))
,
0 - %_path%
)
moridin
CODE

// playlist nr, filename (ab 44 zeichen nur die ersten 40+... anzeigen)
FFFF80 $num(%_playlist_number%,3).  FFFFFF$if($longer(%_filename%,123456789012345678901234567890123456789012345678901234),$substr(%_filename%,1,50)...,%_filename%)
// Falls %title% länger als filename (wenn z.b. file = track1.mp3)
$if($longer(%title%,%_filename%),  B9C8D9[%title%]  ,)

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

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

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

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

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

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

user posted image

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

I was to lazy to do something about the other strings by now... I will try some of yours.
WavOX
SORRY! BLOCKED! tongue.gif
WavOX
SORRY! BLOCKED! tongue.gif
WavOX
Do u still feel that the status bar is insufficient for you even if u are using 0.6 beta? wink.gif

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

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

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


where $div(%_time_elapsed_seconds%,m) = set interval to m seconds,
$mod(#,n) = set n number of choice to display/ execute.
foosion
Here is a display formatting string for use with foo_dbsearch:
CODE
$ifgreater(%_total_tokens%,%_matched_tokens%,,$puts(INCLUDE,1))

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

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


This one makes use of what I called "search arguments". If you include {nrg} in the query, it restricts the results to files without replaygain album info. Likewise, including {rg} restricts results to files that have replaygain album info. Including neither in the query will not affect the search results.
ChS
Fairly modified version of khostri's code from first page of this thread:

Screenshot

Font: Sheldon

foobar Config download

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


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


CODE
$puts(RED,0000FF)


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

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


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


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


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


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


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


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


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


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


// track length
[%_length%]
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.