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
MachineHead
foosion,

Thanks for the tips. Still trying to get it just right, but the results look like this now:

  • Foobar 2000 is now playing: Bug Alley (Featuring Brian Setzer On Guitar)
  • From the album: Bug Alley
  • By: Gary Hoey
  • Followed By:


  • Foobar 2000 playing: Earthquake
  • From the album: You Had It Coming
  • By: Jeff Beck

  • Foobar 2000 playing: Liquor Queen
  • From the album: Spit Blood
  • By: The Atomic Bitchwax



Not sure whether it is a forum thing, or the copy command itself, but without 'listing' the 'Followed By:' spacing is off, ie: No indent. Still trying to figure the html on this particular forum for adding a space without the bulleted list.

One other spacing issue is the large gap between 'Followed By:' and the next item in the playlist.

At any rate, thanks again.

For anyone interested, (LOL!), here is the code:

CODE
'[color=GRAY]'
'[list]'
'[*]'
'[color=black]' '[b]'Foobar'[/b]' '[/color]' '[b]'
'[color=GRAY]' '[i]'2000'[/i]' '[/color]' '[/b]'
'[color=BLACK]' '[b]' $if(%_isplaying%,'is now') 'playing:' '[/b]' '[/color]'
'[color=BLUE]' '[b]' %title%$char(10) '[/b]' '[/color]'
'[*]'
'[color=black]' '[b]'From the album:'[/b]' '[/color]'
'[color=BLUE]' '[b]'%album%'[/b]' '[/color]'  
'[*]'
'[color=black]' '[b]'By:'[/b]' '[/color]' '[color=BLUE]' '[b]'%artist%'[/b]' '[/color]'
'[/list]'
$if(%_isplaying%,'[color=BLACK]' '[list]' '[*]' '[b]' 'Followed By:' '[/b]' '[/list]' '[/color]'$char(10),)
'[/color]'


Copy and paste into fb2k's Copy Command. Would highly recommend selecting no more than few songs from a playlist. Otherwise you may run into problems with a tremendously large post in the forum. Which in turn could give the forum spastic seizures. laugh.gif

Modify as you see fit. wink.gif
fantomex
hello, i'm wondering if someone would please help me to get foobar to display total track length of all selected files like in older versions? i don't really want to learn to hack my own format strings...
musicmusic
QUOTE(fantomex @ Nov 2 2003, 06:40 PM)
hello, i'm wondering if someone would please help me to get foobar to display total track length of all selected files like in older versions? i don't really want to learn to hack my own format strings...

tried prefs / display / default user interface / show total time of selected tracks

or do you want it in the actual scripted/title formatted part of the status bar (which wasnt possible last time i checked)?
fantomex
i guess a combination, because i thought it was part of the formatting for the status bar..
but there it was! thanks a lot.. stupid of me
curian
@UpNorth
Thanks a lot :>
Sergio
I get these random (or so they appear to me) indentations in the playlist.

http://sergio.swordsmennet.com/images/form...attingerror.gif
It occurs two times throughout the two Forrest Gump soundtrack disks.

What causes this to occur and how can I fix it?

Another unrelated question, how can I format it so that is gives the "artist - song title" instead of just the title? It also displays the artist of the first song as the album artist.
DotNoir
QUOTE(Sergio @ Nov 10 2003, 01:52 PM)
I get these random (or so they appear to me) indentations in the playlist.

http://sergio.swordsmennet.com/images/form...attingerror.gif
It occurs two times throughout the two Forrest Gump soundtrack disks.

What causes this to occur and how can I fix it?

Another unrelated question, how can I format it so that is gives the "artist - song title" instead of just the title? It also displays the artist of the first song as the album artist.

You might have different genres in your files through the album, that changes the padding... Select them all and right click, choose show file info (multiple items) and look every field that has (varies/unchanged) if genre or some other "static" field has that, you have to change it to the same... Unless it's a various artists compilation, then artist can be like that too. Also check if you have accidentally put something else than a number in your tracknumber field (somehow I managed to do this with improper "guess values from filename" string)

And if you have a various artists compilation, write a tag called "various" and put it as "1" or something (I leave it blank myself)

Hmmm... Hope I am of help...

edit: And now that I looked at the picture again, your problem is the various collection thing... It is displaying the artist in from of the song, well, no it's not, but still it is, so put a VARIOUS-tag to those files
JohnnyLC
I'm using the "dynamic" title format by upNorth (thanks upNorth~), but there's a problem...
It cannot align the double-width characters correctly, I have enabled "Count double-width characters as two regular characters" in foobar preferences, but that still doesn't work.

Here's the playlist
http://www.luckywayinc.com/images/fb-str_w..._width_prob.png

Does anybody know how to solve this problem?
Thanks~ laugh.gif
billcow
Have you tried the setting to count double width characters *and* "ambiguous" characters as two characters? Could be your locale settings or some random font-related bug screwing it up.
JohnnyLC
Yeah, I actually also tried "Count double-width characters and ambiguous characters as two regular characters"...

What might be the problem in locale settings, I choose Chinese for Language for non-Unicode programs in Regional and Language Options (I'm using English Windows XP).

Thank you~ smile.gif
billcow
Actually, the reference to locale settings was more of an explanation for why the ambiguous characters setting might help than another theory. Aside from that I'm out of ideas. The closest I've ever come to using a different language in windows is setting my keyboard to use a Dvorak layout.
greenirft
Full screenshot of Fb2k
http://css.engineering.uiowa.edu/~mdpotter...r/fb2k/full.png

Config
http://css.engineering.uiowa.edu/~mdpotter.../greenrift.fb2k

I believe that the Playlist formatting is all my own. About the only thing unique about it is that I almost remove (but not completely) the artist and album after the 1st track has been displayed, also artists starting with "The ..." are now "..., The". Eventually I plan on working that part into my sort string. Compliation CD's don't display %artist%, only %trackartist% (%artist% is set to Various Artists for compliations. They also have a %various% == 1 tag in them). Single tracks (those of which I do not have a full album) are tagged with a %singletrack% == 1 tag so that only the artist and the title are shown (or, if no artist, just the title).

The systray formatting is also my own. On %singletrack% == 1 it doesn't display anything other than artist and title. On %various% it does not display artist but does display trackartist on the same line as title.

The status bar is taken from someone else and slightly modified I think. Can't tell you where exactly because I don't remember, but upNorth is probably a good guess.

I've been slowly tweaking it, getting closer and closer to perfect. There are some other things I might eventually add, but I probably won't mess around with the config for atleast a few more days.
aron
QUOTE(upNorth @ Sep 17 2003, 02:59 PM)
Got to keep this thread alive  smile.gif
I have added a new formatting at foobar2000 formatting strings web site.
It is alot more flexible, and among other things it uses file- and directory names to try to fill in the gaps if tags are missing.

Screenshots:
Album/single mode (hybrid coloring) Album mode, but with single mode enabled for singles.
Single mode diplaying some of the optional extra info.

Album mode with the default color scheme and single mode enabled for singles.
user posted image

upnorth:

how were you able to get the playlist to display the last track of an album like that? (with the ascii line like: |_)

on my playlist, it simply ends with a "|"

is there some kind of way that it knows what the last track is?
picmixer
You will need a "lasttrack" tag on every of your lasttracks of an album.

Simply set it to yes or something similar. The main thing that is important is that it's present, so that the formattig will recognize it as the last track of an album.
upNorth
@anon: Another solution apart from the one suggested by picmixer, is to format your tracknumbers like this: xx/xx or xx\xx.

Scrolling text in playlist
I have just finished small, general purpose code for making text scroll in playlist. It might be useful for anyone with a column based formatting. I don't know if this is old news, but I just realized yesterday that %_time_elapsed% is now supported in playlist too. This was not the case when I wanted to make an animated "now playing marker" some time ago.

It could have been more compact, but I left it like this for readability.

CODE
//*****************Code to make text scroll in playlist********************
// Usage:
//                "input"   - the tag or variable you would like to scroll.      
//                "length" - the total visible width (e.g. the width of the column)
//                "step"    - scroll speed (number of characters to jump for each step)
//                "space"  - sets the minimum space before it start over again.      
//                "pause"  - number of secounds between rounds      
//                "smart"   - only scroll when needed (1=yes, 0=no)
//*************************************************************************
//---START OF CONFIG---
$puts(input,%album%)
$puts(length,20)
$puts(step,2)
$puts(space,6)
$puts(pause,3)
$puts(smart,0)
//----END OF CONFIG----

$if($and(%_isplaying%,$or($strcmp(0,$get(smart)),$and($strcmp(1,$get(smart)),$greater($len($get(input)),$get(length))))),

//add spacing to the end and make sure it's long enough
$puts(input,$pad($get(input)$repeat(' ',$get(space)),$get(length)))

//create counter
$puts(counter,$mul($get(step),$mod($right(%_time_elapsed%,2),$add($get(pause),$div($len($get(input)),$get(step))))))

//create output
$puts(front,$cut($get(input),$get(counter)))
$puts(end,$right($get(input),$sub($len($get(input)),$get(counter))))
$puts(output,$padcut($get(end)$get(front),$get(length)))
,
$puts(output,$padcut($get(input),$get(length)))
)

//**************************END OF CODE************************************

//Test output
$padcut(%artist%,15)'│ '$padcut(%title%,20)'│ '$get(output)'│'

The part after END OF CODE is just for testing and should be removed if you want to use this code in your own formatting string. Use $get(output) to get the result.

Btw: I have done some testing, but I might have overlooked some bugs. smile.gif

Edit: Added this to my "dynamic" formatting string. Album title in "single mode" will scroll if it is too long to fit in the column.
siorin
Can I show playlist total time and total number of songs in main window title or status bar? (like iTunes)
I know if I selected all songs of playlist it show total play time,But I don't like this way.
And I know also %_playlist_total% this works only playlist.
haloeight
I've got a question for you formatting gurus.

Is there any way to get the title of a stream being played , instead of just the address being displayed?

My playlist string is simple (I like it this way), its just set to display filenames, and adjusts itself for cue files, but I'd like it if the name of a radio station were displayed rather than IP addresses and ports. I couldn't find a tag in the help to display the title of what's being played.

The station is proton radio. At the top of the screen they have a real time display of what's being played with the name of the show & artist...is there any way to get that to display in foobar?

here's a copy of my playlist string if its at all helpful.

CODE

$num(%_playlist_number%,3). $if($strcmp($ext(%_path%),cue),[%_subsong% - %artist% - %title%],%_filename%)[$char(9)%_length%]
gwaihir
@upNorth :
Firstly, thank you for the elegant formatting string. It ROCKS!! biggrin.gif

Besides the regular tags (I currently use Artist, Album, Title, Genre, Date, Comment, Track Number fields) what other tags do I need for proper formatting display using your formatting string.

Just discovered APE tags. So, what other tags do I need and how do I implement it?
upNorth
@poorimpulsectrl: I might be wrong, but this is what I think you need to do:
First of all, enable this:
Preferences->Display->Show dynamic info (........
and this:
Preferences->HTTP Reader->Enable dynamic track titles

I guess that will make no difference with your current formatting as you don't use %artist%, %title% and %station%, but you can try this modified version I just put together or just add those tags.
CODE
$num(%_playlist_number%,3)'. '

$if($strstr(%_path_raw%,'http://'),$if2(%artist%' - ',)$if2(%title%,),

$if($strcmp($ext(%_path%),cue),
$if2(%station%': ,')$if2(%_subsong%' - ',)$if2(%artist%' - ',)$if2(%title%,)
,
%_filename%
)

$char(9)$if2(%_length%,)
)
It seems to work, but no guarantee smile.gif
haloeight
Thank you upNorth. I actually have those options checkmarked but without the correct tag (I'm assuming %station%) it just shows the IP address. I just replaced my playlist string with the one you provided, but nothing ended up showing up for the station. The ip addresses were removed but I take it this means Proton doesn't put in their playlists what's playing currently or their name and this is why it's not showing up.
upNorth
QUOTE(poorimpulsectrl @ Dec 1 2003, 09:47 PM)
Thank you upNorth. I actually have those options checkmarked but without the correct tag (I'm assuming %station%) it just shows the IP address. I just replaced my playlist string with the one you provided, but nothing ended up showing up for the station. The ip addresses were removed but I take it this means Proton doesn't put in their playlists what's playing currently or their name and this is why it's not showing up.

This is what that formatting string displays here:
QUOTE
003. Proton Radio - Particles (07-06-2003) Part 3 - House
So I guess it's like this:
%station% = Proton Radio
%artist% = Particles (07-06-2003) Part 3
%title% = House
haloeight
Strange. I wonder what's going wrong on my end here. I'll try again ... it just displays question marks where "Proton Radio" is displaying for you, then nothing beside that (just a blank)

edit : if I just put in %artist% , it shows the name of the show playing. But not if I just click on the playlist. I have to go into my title formatting, click the apply button and then it shows up. Even after restarting the player and only having the %artist% tag in there as the sole tag. %station% doesn't seem to want to do anything.
R@M
Here is my formating string for streaming radio. It i is not finished, but it does it's work. it has a little workaround for the problem mentioned above.

CODE

//  Playlistformat for internet-radio-stations
//  Custom tags for non-streaming info:
//  bitrate       --> Bitrate of stream in kbps
//  codec        --> MP3, MP3Pro, Vorbis
//  channels   --> Number of channels
//  station      --> Name of station
//  url             --> Homepage of station or stream url (btw. if you call stream url in your
//                          Browser, you will get the status page of the station)
$num(%_playlist_number%,4)
$if(%_isplaying%,1F23D1>>,  )
$if(%artist%,FF6262$padcut(%artist%,35),1C67D9$padcut(%station%,35))
 |

E6C07B|FF9393
FF6262$if(%artist%,$if($strcmp($substr(%artist%,3,$len(%artist%)),%title%),$padcut(
$substr(%artist%,36,$len(%artist%)),30),$padcut(%title%,30)),1C67D9$padcut(%url%,30))
 |
3333E1
$puts(%cod%,$if2(%__codec%,%codec%))

$if($strcmp($lower($get(%cod%)),mp3pro),PRO,$if($strcmp($lower($get(%cod%)),vorbis),OGG,$padcut($get(%cod%),3)))
$num($if2(%__bitrate%,%bitrate%),3) kbps Ch: $if2(%__channels%,%channels%)

$if(%_isplaying%,1F23D1<<,  )
$char(09)FF4A4A%genre%


Editt: code updated a bit . For stations, that streams titles like Proton Radio, %artist% is continued in %title% column.

Cya(o) Rainer
MachineHead
Any chance of finding out how to replace upNorth's dynamic playing now marker with the note symbol from crni's formatting? And as long as I'm at it, changing it to blue.

Heh - blue note...
ginipig1
Okay, I'm absolutely *new* to foobar, and all things post-winamp.mp3. Although I'm a quick learner, and ripping-encoding(mpc.aac.ape) came easily to me, I'm finding difficulty in coding format strings. I've read the help file contained within foobar.directory, but I can't really make sense of it all.

My questions are:
1) How long did it take you guys to actually get a firm grasp of coding format strings?
2) In light of the *incredible* screenshots on http://pelit.koillismaa.fi/fb2k/index.php, how do I arrange it so that artist's tracks are grouped together, rather than by album?

By the time I'd compiled a lengthy list of mp3's, I realized that it was too late to freedb/musicbrainz every single mp3 I owned, and am thus paying for it in 'lack-of-album-details'-iosis. It's okay, since I'm a simple kind of person (read: simple, not ignorant.) But I'd really appreciate it if somebody gave me some pointers getting to the following stage:

-artist- trackname encode.method time replaygain
........... trackname encode.method time replaygain
........... trackname encode.method time replaygain

etc.

Much thanks, in advance

edit: trackname line didn't belong in artist column
einniow
MachineHead> paste symbols from character map software (MS) to this part :

CODE
//******************************************
//** Now playing marker
//*
$if($strcmp(1,$get(show_now_playing_marker)),
$if(%_isplaying%,$transition('► ♫ ♪ ♫ ♪ ♫ ♪ ♫',$get(c_now_playing_pointer),$get(c_background)))
)


anyway it looks like big squares in foobar's config editor.... it seems to look normal on the forum & looks nice in the playlist wink.gif
haloeight
QUOTE(R@M @ Dec 2 2003, 03:54 PM)
Here is my formating string for streaming radio. It i is not finished,  but it does it's work. it has a little workaround for the problem mentioned above.

CODE

//  Playlistformat for internet-radio-stations
//  Custom tags for non-streaming info:
//  bitrate       --> Bitrate of stream in kbps
//  codec        --> MP3, MP3Pro, Vorbis
//  channels   --> Number of channels
//  station      --> Name of station
//  url             --> Homepage of station or stream url (btw. if you call stream url in your
//                          Browser, you will get the status page of the station)
$num(%_playlist_number%,4)
$if(%_isplaying%,1F23D1>>,  )
$if(%artist%,FF6262$padcut(%artist%,35),1C67D9$padcut(%station%,35))
 |

E6C07B|FF9393
FF6262$if(%artist%,$if($strcmp($substr(%artist%,3,$len(%artist%)),%title%),$padcut(
$substr(%artist%,36,$len(%artist%)),30),$padcut(%title%,30)),1C67D9$padcut(%url%,30))
 |
3333E1
$puts(%cod%,$if2(%__codec%,%codec%))

$if($strcmp($lower($get(%cod%)),mp3pro),PRO,$if($strcmp($lower($get(%cod%)),vorbis),OGG,$padcut($get(%cod%),3)))
$num($if2(%__bitrate%,%bitrate%),3) kbps Ch: $if2(%__channels%,%channels%)

$if(%_isplaying%,1F23D1<<,  )
$char(09)FF4A4A%genre%


Editt: code updated a bit . For stations, that streams titles like Proton Radio,  %artist% is continued in %title% column.

Cya(o) Rainer

Thank you...I'll give it a shot.
atici
Why is it not possible that foo_syfm plug_in cannot change the background color and the fonts? Could Foobar API be modified accordingly so that these values could be changed by an outside plug-in?
billcow
I suppose I can field this one. The reason foo_syfm can't change fonts/colors is because foobar has two types of variables (for purposes of storing settings - i'm not talking about %blah% or $puts(blah,blah) in formatting strings) - global (any plugin can set it) and private (only the plugin that created it can change it).

While the actual formatting strings are global variables, and thusly can be changed by any plugin, the fonts and colors are private variables, and thus can only be changed by the UI plugin (or in pre-0.7 versions, the foobar core itself).


In theory the API could be changed (not really the API but the standard UI plugin). However, there is also the small detail that the global variable API only supports integers (numbers) or strings, while the private variable API supports any binary data you care to give it. So while that's certainly not anything that can't be delt with, it would be a minor pain. Mainly the reason (which, don't get me wrong, i respect) is that Peter thinks it's a bad idea.
atici
Why not make the fonts and colors global as well then? Wouldn't that solve the problem? huh.gif This thing makes Foobar very attractive really. It would be a pity if there's not any solution to create an entire format package still conforming to good programming principles.

BTW I don't understand why the default look of almost every software (Opera, WinAmp, Foobar,...) is extremely ugly. It is still possible to keep the eye-candy and clutter at minimum still maintaining a good look. I bet if Foobar looked this good by default there would be many more people who loved it immediately.

But then again who cares about popularity? (Not me)
foosion
QUOTE(billcow @ Dec 3 2003, 11:39 PM)
In theory the API could be changed (not really the API but the standard UI plugin). However, there is also the small detail that the global variable API only supports integers (numbers) or strings, while the private variable API supports any binary data you care to give it. So while that's certainly not anything that can't be delt with, it would be a minor pain. Mainly the reason (which, don't get me wrong, i respect) is that Peter thinks it's a bad idea.

1. I don't think there should be an API for the standard UI only. IMHO there should be global variables that hold general user preferences for colors and fonts, so this might go to the core. Colors could be stored as config_var_int with names like "color:<description where it should be used>" (example: "color:Playlist text"). A page in preferences would then list all those showing only the description part, so there would be a central place to configure colors. Note that this scheme is already used with config_var_string and names like "titleformat:Playlist".

2. The public variables can hold arbitrary data; as long as the you know the details about how it is stored (i.e. header files for the config_var subclasses in question), you will be able to access it. Fixed size binary data (structs) are already supported by the SDK. For I example I have found that there is a config_var_struct in my fb2k installation called "infobox_font" - I wonder what that might hold... tongue.gif

3. I guess Peter has been busy with more important things.
billcow
Yeah, I do agree that it'd be nice, but once again, it's up to Peter in the end, and I respect that.

In any case, I'm thinking about taking up work on it again. The planned features are (unless I get tired of it):
1) dynamic re-coloring of the formatting string - invert brightness, hue shift, desaturate (aka make black/white/grey) in a customizable way
2) warning pop-up if the font specified for the UI doesn't match in terms of monospaced/variable width (if I can figure out a good way to find the font - it should be possible to read it from the raw config file, even if i can't change it (which I know I can't))
3) customizable translation of special characters - like a text file defining the mappings

Any suggestions/comments? (post them in the foo_syfm thread to not clutter this one any further)
MachineHead
QUOTE(einniow @ Dec 3 2003, 07:22 AM)
MachineHead> paste symbols from character map software (MS) to this part :

CODE
//******************************************
//** Now playing marker
//*
$if($strcmp(1,$get(show_now_playing_marker)),
$if(%_isplaying%,$transition('► ♫ ♪ ♫ ♪ ♫ ♪ ♫',$get(c_now_playing_pointer),$get(c_background)))
)


anyway it looks like big squares in foobar's config editor.... it seems to look normal on the forum & looks nice in the playlist wink.gif

Thank you. Works like a charm. wink.gif
pIv
I change MachineHead code - add sample animation.

CODE
//******************************************
//** Now playing marker
//*


$if($strcmp(1,$get(show_now_playing_marker)),

$if($strcmp(1,$get(animate_now_playing_marker)),
 $if(%_isplaying%,FFFFFF|FFFFFF$repeat('<',$mod(%_time_elapsed_seconds%,7))),
$if(%_isplaying%,FFFFFF|FFFFFF'► ♫ ♪ ♫ ♪ ♫ ♪ ♫')

)

)


pIv
Schinkentoni
QUOTE(einniow @ Dec 3 2003, 01:22 PM)
anyway it looks like big squares in foobar's config editor.... it seems to look normal on the forum & looks nice in the playlist wink.gif

I'm sorry but all I get are '?' in both config editor and playlist. But it looks normal when I copy everything into MS Word
haloeight
in the screenshot this user posted here, it appears as though in their playlist the track current playing displays in a different color (yellow) regardless of what file the cursor has selected (the gray bar). How can I do this to my playlist ?
musicmusic
QUOTE(poorimpulsectrl @ Dec 4 2003, 04:15 PM)
in the screenshot this user posted here, it appears as though in their playlist the track current playing displays in a different color (yellow) regardless of what file the cursor has selected (the gray bar). How can I do this to my playlist ?

When setting the colour code, use

$if(%_isplaying%,<playing colour code>,<not playing colour code>)

Putting in the respective colour codes in the placeholder.

e.g. $if(%_isplaying%,0BC886|26DF50,ffffff|FFB18E)

You can leave the marker thing (first/last char of colour code, square thing) out of the $if statement if you want, but you may want to have some other changes for playing.
haloeight
Thank you musicmusic.

Right now I have the same color to display the track being played as for my selection color. If I select teh track that is currently playing the text color changes to blue. Is there any way I can set it to something else?
ssamadhi97
QUOTE(Schinkentoni @ Dec 4 2003, 02:51 PM)
I'm sorry but all I get are '?' in both config editor and playlist. But it looks normal when I copy everything into MS Word

Change your playlist font to a unicode font.
Schinkentoni
QUOTE(ssamadhi97 @ Dec 4 2003, 04:47 PM)
Change your playlist font to a unicode font.

Thanks for your answer but it did not work.
The '?' appears already in the fb config editor, or can I somehow change the font used there?
haloeight
QUOTE(poorimpulsectrl @ Dec 4 2003, 11:34 AM)
Thank you musicmusic.

Right now I have the same color to display the track being played as for my selection color. If I select teh track that is currently playing the text color changes to blue. Is there any way I can set it to something else?

never mind, rtfm'd and found the solution...sorry for the dumb question, operating on four hours sleep here
MachineHead
QUOTE(pIv @ Dec 4 2003, 05:39 AM)
I change MachineHead code - add sample animation.

CODE
//******************************************
//** Now playing marker
//*


$if($strcmp(1,$get(show_now_playing_marker)),

$if($strcmp(1,$get(animate_now_playing_marker)),
 $if(%_isplaying%,FFFFFF|FFFFFF$repeat('<',$mod(%_time_elapsed_seconds%,7))),
$if(%_isplaying%,FFFFFF|FFFFFF'► ♫ ♪ ♫ ♪ ♫ ♪ ♫')

)

)


pIv

Thanks. This works as well, but you get the < as the animation unless you change it.

Try this:

CODE

//******************************************
//** Now playing marker
//*


$if($strcmp(1,$get(show_now_playing_marker)),

$if($strcmp(1,$get(animate_now_playing_marker)),
$if(%_isplaying%,CECAC8|CECAC8$repeat(' ♪',$mod(%_time_elapsed_seconds%,7))),
))


Note that the color is something I picked for my set-up. Choose your own by editing the CECAC8 portion.
haloeight
Thanks to the help of people in this thread I have it so that the current track playing is displayed in a different color than the rest of the playlist. However it seems as though this only applies to the number and name of the track, not %_length%. %_length% is displaying in a different color. I tried messing around with it and reading the help file, using an "if" statement in front of length , but couldn't get it to adjust colors to the same ones being used for the track and song being played.

Since I put the color code ahead of everything else I thought it should apply to any text displayed. I understand from the help file that foobar will just invert selection text if no other code is provided, but I don't know how to get the color of the length of the track currently playing to change.

here's the code for anyone who might be able to offer this programming moron some help. thanks.

CODE

$if(%_isplaying%,0F8BF0|0F8BF0,C0C0C0|636363)

$num(%_playlist_number%,3)'. '

$if($strstr(%_path_raw%,'http://'),$if2(%artist%,),$if($strcmp($ext(%_path%),cue),$if2(%_subsong%' - ',)$if2(%artist%' - ',)$if2(%title%,),%_filename%))

$char(9) %_length%
DustMagnet
$char(9) kills the color coding. You have to initialize it again after the tab:

CODE
$char(9) $if(%_isplaying%,0F8BF0|0F8BF0,C0C0C0|636363)%_length%
haloeight
Thank you DustMagnet.

Are there any resources you guys are relying upon to gain this wisdom in what to do, or is it just programming principles you already know? I know of the formatting strings site, and surely there is lots of information in this thread for dummies to pick up on...I'm just curious if there's a more comprehensive "here's how you do this" than the help file.
DustMagnet
You're welcome. wink.gif

Most of what I know about formatting strings has come from following the Format Strings thread for code ideas, and the official help page for syntax. I also learned a lot through trial-and-error. Programming experience is not necessary, but it does help -- if you're already familiar with one language, it's easier to pick up another.
Alanity
QUOTE(poorimpulsectrl @ Dec 5 2003, 09:06 PM)
Thank you DustMagnet.

Are there any resources you guys are relying upon to gain this wisdom in what to do, or is it just programming principles you already know? I know of the formatting strings site, and surely there is lots of information in this thread for dummies to pick up on...I'm just curious if there's a more comprehensive "here's how you do this" than the help file.

I have no previous experience of anything like this so it took two nights staying up until daylight to work out what was going on in hybrid just so I could make a simpler version... (i was bored...)
I agree there should be a simple tutorial for us dummies.. It shouldn't be too hard to sort out.

Btw hello all, I've been lurking for months and just bothered to register.. smile.gif
viveztigrou
does someone can put his .cfg online? i am not a coding man wink.gif ... i would like to see your work smile.gif
upNorth
QUOTE(viveztigrou @ Dec 8 2003, 01:35 AM)
does someone can put his .cfg online? i am not a coding man  wink.gif ... i would like to see your work  smile.gif

foobar2000 formatting strings web site
aron
i have formatting strings to display the playlist in album mode -- that is, like:
http://shovelbeating.org/~nirvana/fb2.jpg , but when there are no tags, all that is displayed is "?.?" because the formatting is incomplete. how do i make it show filenames if there is no tag data?

the formatting i am currently using is:

CODE
// BASICS //////////////////////////////////////////////////////////////////////////////////////////////////

// COLORS DISPATCH
// color_bac = Background
// color_gri = Grid
// color_num = Playlist number, ReplayGain
// color_art = Artist, Composer
// color_alb = Album
// color_con = Conductor, Performer, Performyear
// color_tec = Tech.info, Label, Date, Genre, Style, Artistdate
// color_tit = Title, Track, Time
// color_ind = Playing indicator
// color_zer = Zeros playlist
// color_zeo = Zeros playlist

// SET COLORS
$puts(color_bac,271815|695F5F)
$puts(color_gri,AA9E9A|AA9E9A)
$puts(color_num,474141|474141)
$puts(color_art,FFFFFF|FFFFFF)
$puts(color_alb,FFFFFF|FFFFFF)
$puts(color_con,AA9E9A|AA9E9A)
$puts(color_tec,AA9E9A|AA9E9A)
$puts(color_tit,$if(%_isplaying%,FFFFFF|FFFFFF,695F5F|271815))
$puts(color_ind,$if(%_isplaying%,000000|000000,000000|000000))
$puts(color_zer,474141|474141)
$puts(color_zeo,695F5F|695F5F)

// SET COLOMN WIDTHS
$puts(colomn_1,2)
$puts(colomn_2,6)
$puts(colomn_3,75)
$puts(colomn_4,100)
$puts(colomn_5,30)
// COMMENTED SO RG AND TIME ARE FIXED IN PLACE.
//$puts(colomn_6,24)

// END OF COLOMN ONE
$repeat($char(9),$get(colomn_1))

// ALBUMS /////////////////////////////////////////////////////////////////////////////////////////////////

// ANALYSIS FOR LINES ORGANISATION
$puts(x,0)$puts(y,0)$puts(z,0)
$if(%conductor%,$puts(x,2),)
$if(%performer%,$puts(y,3),)
$if(%solists%,$puts(z,4),)
$puts(t,$add($add($get(x),$get(y)),$get(z)))

// ARTIST & ARTIST DATES, INCLUDING TRICK TO HANDLE VARIOUS ARTISTS ALBUMS
$if($strcmp($num(%tracknumber%,1),1),
$if($strcmp($substr(%_directoryname%,10,24),'Various Artists'),
$get(color_art)'Various Artists',
$get(color_art)%Artist%' '$get(color_tec)[%artistdate%])
$get(color_gri)$repeat('—',50),)

// ALBUM
$if($strcmp($num(%tracknumber%,1),2),
$get(color_alb)%album%,)

// DATE, GENRE, STYLE & TYPE
$if($strcmp($num(%tracknumber%,1),3),
$get(color_tec)%date%' '[%genre%]' '[' / '%style%][' / '%type%],)

// PERFORMYEAR & CONDUCTOR
$if($strcmp($num(%tracknumber%,1),4),
$if($strcmp($get(x),2),
$get(color_con)%performyear%' '%conductor%,),)

// PERFORMER
$if($strcmp($num(%tracknumber%,1),5),
$if($or($strcmp($get(t),5),$strcmp($get(t),9)),
$get(color_bac)%performyear%' '$get(color_con)%performer%,),)
$if($strcmp($num(%tracknumber%,1),4),
$if($or($strcmp($get(t),3),$strcmp($get(t),7)),
$get(color_con)%performyear%' '$get(color_con)%performer%,),)

// SOLISTS
$if($strcmp($num(%tracknumber%,1),6),
$if($strcmp($get(t),9),
$get(color_bac)%performyear%' '$get(color_con)%solists%,),)
$if($strcmp($num(%tracknumber%,1),5),
$if($or($strcmp($get(t),6),$strcmp($get(t),7)),
$get(color_bac)%performyear%' '$get(color_con)%solists%,),)
$if($strcmp($num(%tracknumber%,1),4),
$if($strcmp($get(t),4),
$get(color_con)%performyear%' '$get(color_con)%solists%,),)

// APE CODEC ANALYSIS
$if($stricmp($info(codec),monkey''s audio),
$puts(v_codec,$info(codec))
$puts(v_version,$info(version))
$puts(v_compression,$caps($info(compression))),)

// MPC CODEC ANALYSIS
$if($stricmp($info(codec),musepack),
$puts(v_codec,$caps($info(codec)))
$puts(v_version,$info(mpc_encoder))
$if($stricmp($info(mpc_profile),''Thumb''),
$puts(v_compression,'Thumb'),)
$if($stricmp($info(mpc_profile),''Radio''),
$puts(v_compression,'Radio'),)
$if($stricmp($info(mpc_profile),''Standard''),
$puts(v_compression,'Standard'),)
$if($stricmp($info(mpc_profile),''Xtreme''),
$puts(v_compression,'Xtreme'),)
$if($stricmp($info(mpc_profile),''Insane''),
$puts(v_compression,'Insane'),)
$if($stricmp($info(mpc_profile),''BrainDead''),
$puts(v_compression,'BrainDead'),)
$if($stricmp($info(mpc_profile),''quality 10''),
$puts(v_compression,'Quality 10'),)
$if($stricmp($info(mpc_profile),''Unstable/Experimental''),
$puts(v_compression,'Unstable/Experimental'),),)

// LABEL, SOURCE, CODEC, CDn°
$if($strcmp($get(t),9),
$if($strcmp($num(%tracknumber%,1),7),
$get(color_tec)%label%,)
$if($strcmp($num(%tracknumber%,1),8),
$get(color_tec)'['%source%']  '
$if(%discnumber%,'[CDn°]  ',)
$get(v_codec)' / '$get(v_version)' / '$get(v_compression),),)
$if($or($or($strcmp($get(t),5),$strcmp($get(t),6)),$strcmp($get(t),7)),
$if($strcmp($num(%tracknumber%,1),6),
$get(color_tec)%label%,)
$if($strcmp($num(%tracknumber%,1),7),
$get(color_tec)'['%source%'] '
$if(%discnumber%,'[CDn°]  ',)
$get(v_codec)' / '$get(v_version)' / '$get(v_compression),),)
$if($or($or($strcmp($get(t),2),$strcmp($get(t),3)),$strcmp($get(t),4)),
$if($strcmp($num(%tracknumber%,1),5),
$get(color_tec)%label%,)
$if($strcmp($num(%tracknumber%,1),6),
$get(color_tec)'['%source%'] '
$if(%discnumber%,'[CDn°]  ',)
$get(v_codec)' / '$get(v_version)' / '$get(v_compression),),)
$if($strcmp($get(t),0),
// REMOVED LABEL INFO, FOR NOW AT LEAST.
//$if($strcmp($num(%tracknumber%,1),4),
//$get(color_tec)[%label%],)
// ...AND CHANGED THIS NEXT LINE TO USE PLAYLIST LINE FOUR, NOT FIVE.
$if($strcmp($num(%tracknumber%,1),4),
$get(color_tec)['['%source%']']
$if(%discnumber%,'[CDn°]  ',)
$get(v_codec)' '$get(v_version)' '$get(v_compression),),)

// END OF COLOMN THREE
$repeat($char(9),$get(colomn_3))

// TRACK NUMBER
$char(32)$get(color_bac)
$ifgreater($len(%tracknumber%),1,,)
$get(color_tit)%tracknumber%
$if($strcmp($num(%tracknumber%,1),1),
$get(color_tit)'. ',
$get(color_tit)'. ')

// TITLE, INCLUDING TRICK TO HANDLE VARIOUS ARTISTS ALBUMS
$if($strcmp($substr(%_directoryname%,10,24),'Various Artists'),
$get(color_tec)%artist%': '$get(color_tit)%title%,
$get(color_tit)%title%)
$if($strcmp($num(%tracknumber%,1),1),
$get(color_gri)' '$repeat('—',100),)

// END OF COLOMN FOUR
$repeat($char(9),$get(colomn_4))

// GRID TRANSITION REMOVED.

// END OF COLOMN FIVE
$repeat($char(9),$get(colomn_5))

// ALBUM REPLAYGAIN
// $get(color_gri)
// $if(%__replaygain_album_gain%,
// $get(color_num)'A ',
// $get(color_bac)'A ')
// $if(%__replaygain_track_gain%,
// $get(color_num)'T',
// $get(color_bac)'T')
// $get(color_gri)


// END OF COLOMN SIX
$repeat($char(9),$get(colomn_6))

// LENGTH
$get(color_bac)
$ifgreater($len(%_length%),4,,)
$get(color_tit)%_length%

// SINGLES /////////////////////////////////////////////////////////////////////////////////////////////////


it is incomplete. also, how could i add support for more codecs? i have been looking at other formats, but it seems everyone does it differently. i want it to show mp3 codec info (bitrate).

can anyone help out?

thanks to man, as it is HIS work.
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.