picmixer
Jun 7 2003, 03:51
QUOTE(billcow @ Jun 7 2003 - 07:00 AM)
upNorth:
i'm going to have to ask you to post that foobar text thing. totally cool.
I'll second that. That really looks absolutely great. Any way you can maybe pass us the code for that? Would be greatly apreciated.
If you're not afraid of ugly code, try this out for the "foobar2000" text:
EDIT Fixed the code a bit, it was fucked up a bit

Screenshots
Here (wide text) and
here (narrow text)The best way to get this to foobar is to copy it to note/wordpad and use the replace thingy to replace <COLOR#>s with your color codes

CODE
$transition(
// wide text
//$select($sub($div($right($num(%_playlist_number%,4),2),2),1),
// narrow text
$select($sub($mod(%_playlist_number%,63),1),
######,
# #,
#,
,
######,
# #,
######,
,
######,
# #,
######,
,
######,
# # #,
### ##,
,
######,
# #,
######,
,
######,
# #,
### ##,
,
# # ,
## #,
# # #,
# ## ,
,
#### ,
# #,
#### ,
,
#### ,
# #,
#### ,
,
#### ,
# #,
#### ,
,)
,<COLOR1>,<COLOR2>)
picmixer
Jun 7 2003, 07:26
Nice work Anza. Thanks for posting that. Guess I'm on a mission now to find a way now to include that nicely into my own format string.
QUOTE(billcow @ Jun 6 2003 - 09:00 PM)
screenshotcodeno fancy coding stuff - just fancy coloring.
for idvah:
The "$if($greater(1,$mod(%_playlist_number%,2))..." part sets up alternating colors based on playlist index. "$puts(space,...)" sets a variable to be used in place of a space for padding purposes. In other words, if you use "$repeat($get(space),x)" as I have you will get a pseudo-adjustment for the background color.
upNorth:
i'm going to have to ask you to post that foobar text thing. totally cool.
thanks for showing me this, but I'm curious, is there a way to adapt this:
CODE
// Can be used with almost any type of font
// Recommended Asian Fonts : MS PGothic 8 (Japanese) , Gulim 8 (Korean)
// Recommended Western Fonts : Verdana 7 , Tahoma 8 , Arial 8 , MS Sans Serif 8
// PLAYLIST FONT DOES NOT HAVE TO BE MONOTYPED
$puts(opchar,808080 '[')
$puts(clchar,808080']')
// Show play status indicator (Note)
$if(%_isplaying%,AA00FF$char(9835),000000$char(9835))
// Playlist number
$get(opchar)00FFFF$num(%_playlist_number%,4)$get(clchar)
// Show directory information (I prefer sorting albums by directory than ID3)
$get(opchar)00FFAA%_directoryname%$get(clchar)
// For those guys who like sorting albums by ID3 more than directories,
// add slashes to the lines that show the directory info
// $get(opchar)00FFAA$if(%album%,%album%,Unknown Album)$get(clchar)
// Artist info
FFFF00 $if(%artist%,%artist%,'Unknown Artist')
// The dash
808080 -
FFFFFF $if(%title%,%title%,%_filename%)
// Align right and the length
$char(9)00FFAA%_length%
To use that background you've provided?
QUOTE(picmixer @ Jun 7 2003 - 04:26 PM)
Nice work Anza. Thanks for posting that. Guess I'm on a mission now to find a way now to include that nicely into my own format string.
Right now I have it like this (thanks upNorth for posting your code and so getting me to figure out how to make it MUCH simpler):
EDIT: It doesn't look right here, but should still work...
QUOTE
$puts(FB2K,
$transition(
// wide text
$select($sub($div($right($num(%_playlist_number%,4),2),2),1),
// narrow text
//$select($sub($mod(%_playlist_number%,63),1),
#### ,
# # ,
# ,
,
#### ,
# # ,
#### ,
,
#### ,
# # ,
#### ,
,
######,
# # ,
#### ,
,
#### ,
# # ,
#### ,
# ,
,
#### ,
# ,
,
# # ,
## #,
# # #,
# ## ,
,
#### ,
# #,
#### ,
,
#### ,
# #,
#### ,
,
#### ,
# #,
#### ,
,
#### ,
# #,
#### ,
,)
,<COLOR1>,<COLOR2>)
$ifgreater(%_length_seconds%,600, , ))
and the last line of my formatting is:
QUOTE
$char(09)$get(FB2K)$get(LENGTH)
picmixer
Jun 7 2003, 07:52
Just working on Up North's code as well. Thanks for posting that as well, U N. Still looks a bit messy in my own string though. Will try your new one as well in a sec. Looks good
Updated nuhi skin

Well, actually it's similiar to the latest posts, but what the heck, I have some copyright on that style

.
My colours are better

, and "piercing effect" is cool also.
(titles that needs to be pierced with a line, ARE pierced with the line B) )
ShotCode @ URL:
"http://www.freewebs.com/nuhi/files/foobar/code.zip"
QUOTE(picmixer @ Jun 7 2003 - 05:16 PM)
@anza
Any reason why you are already up to Foobar20000, Or have I missed out on some major developments around here?
A good question

It must have been a stupid copy/paste mistake when creating the string

I'll soon post my formatting string+the font which it uses..
MY FORMATTING:[Script] (includes the font used, isn't really optimized yet, but works well. Commenting is also not so good..)
[Screenshot #1] (with the wide foobar2000 text)
[Screenshot #2] (with the narrow foobar2000 text)
The screenshots aren't from the newest formatting, but I think the only difference is that the foobar20000 is now foobar2000

Oh, and add %lasttrack% to the last tracks of your albums..
intoxicated
Jun 7 2003, 10:45
QUOTE(anza @ Jun 7 2003 - 06:20 AM)
QUOTE(picmixer @ Jun 7 2003 - 05:16 PM)
@anza
Any reason why you are already up to Foobar20000, Or have I missed out on some major developments around here?
A good question

It must have been a stupid copy/paste mistake when creating the string

I'll soon post my formatting string+the font which it uses..
MY FORMATTING:[Script] (includes the font used, isn't really optimized yet, but works well. Commenting is also not so good..)
[Screenshot #1] (with the wide foobar2000 text)
[Screenshot #2] (with the narrow foobar2000 text)
The screenshots aren't from the newest formatting, but I think the only difference is that the foobar20000 is now foobar2000

Oh, and add %lasttrack% to the last tracks of your albums..
WOW
it looks cool from the screenshot.
but when i try to paste the code on my foobar.
it shows out syntax errors..
Try to redownload it. It should work now, I'm not sure what was wrong and only uploaded my current formatting.
picmixer
Jun 7 2003, 12:10
@anza
Is there any way to control the distance between the individual "Foobar2000" texts. Would like to find a way to make the distance between the last 0 (of 2000) and the first F (Foobar) slightly larger. Can't find a way how to though.
Anyway finally manged to implement this in my paylis string somewhat nicely:
////////////////////
//// Config ////
////////////////////
// Colors
$puts(plnum_col,$if(%_isplaying%,11118E|363636,B0B0B0|363636))
$puts(artist_color,$if(%_isplaying%,11118E|11118E,000000|000000))
$puts(title_color,$if(%_isplaying%,11118E|11118E,FFFFFF|FFFFFF))
$puts(album_color,$if(%_isplaying%,11118E|11118E,000000|000000))
$puts(date_color,$if(%_isplaying%,11118E|11118E,000000|000000))
$puts(track_color,$if(%_isplaying%,11118E|11118E,FFFFFF|FFFFFF))
// Spacers
$puts(album_spacer,')')
$puts(track_spacer,*)
$puts(tag_spacer,*)
// Additional options
// 1 = true, 0 = false
$puts(display_playlist_no,1)
$puts(display_date,1)
$puts(display_file_info,1)
$puts(display_time,1)
/////////////////////////
//// End config ////
/////////////////////////
//////////////////
//// Tags ////
//////////////////
// Artist
$if(%artist%,
$puts(artist,$get(artist_color)%artist%),
$puts(artist,$get(artist_color)$caps2($padcut(%_filename%,$sub($strchr(%_filename%,-),2)))))
// Title
$if(%title%,
$puts(title,$get(title_color)%title%),
$puts(title,$get(title_color)$caps2($substr(%_filename%,$add($strchr(%_filename%,-),2),$len(%_filename%)))))
// Album
$if(%album%,
$puts(album,$get(album_color)%album%),
$puts(album,$get(album_color)$if($strcmp($strchr($directory(%_path%),-),0),
$directory(%_path%),
$substr($directory(%_path%),$add($strchr($directory(%_path%),-),2),$len($directory(%_path%))))))
// Date
$if($stricmp($get(display_date),1),$if(%date%,$puts(date,$get(date_color)'('%date%')'),))
// Tracknumber
$if(%tracknumber%,
$puts(tracknum,$get(track_color)$num(%tracknumber%,2). ),)
//////////////////////////////////
//// Display artist info ////
/////////////////////////////////
//make playlist number black if playing
$if(%_isplaying%,000000|000000>>>>,FFFFFF|FFFFFF$num(%_playlist_number%,3).)
~ $get(artist) ~ $get(album)$get(date) ~ $get(tracknum)$get(title)
$puts(FB2K,
$transition(
// wide text
//$select($sub($div($right($num(%_playlist_number%,4),2),2),1),
// narrow text
$select($sub($mod(%_playlist_number%,63),1),
¸¸¸¸¸¸,
¸ ¸,
¸,
,
¸¸¸¸¸¸,
¸ ¸,
¸¸¸¸¸¸,
,
¸¸¸¸¸¸,
¸ ¸,
¸¸¸¸¸¸,
,
¸¸¸¸¸¸,
¸ ¸ ¸,
¸¸¸ ¸¸,
,
¸¸¸¸¸¸,
¸ ¸,
¸¸¸¸¸¸,
,
¸¸¸¸¸¸,
¸ ¸,
¸¸¸ ¸¸,
,
¸ ¸ ,
¸¸ ¸,
¸ ¸ ¸,
¸ ¸¸ ,
,
¸¸¸¸ ,
¸ ¸,
¸¸¸¸ ,
,
¸¸¸¸ ,
¸ ¸,
¸¸¸¸ ,
,
¸¸¸¸ ,
¸ ¸,
¸¸¸¸ ,
,)
,11118E|11118E,000000|000000)
)
$char(9)$get(FB2K)
///////////////////////////////
//// Display file info ////
//////////////////////////////
$transition(
$if($stricmp($get(display_file_info),1),
$pad_right($get(tag_spacer),1)
$pad_right($upper($right(%_filename_ext%,3)),3) $pad_right(%__bitrate%/$div(%__samplerate%,1000),3))
$if($stricmp($get(display_time),1),$pad_right(%_length%,7)),
11118E|11118E,000000|000000)
Sorry don't have any way to link to this.
Would actually like to make the Foobar graphics to the right of the file info, but as soon as I do that I get glitches in the file info section. Any ideas?
QUOTE(picmixer @ Jun 7 2003 - 09:10 PM)
@anza
Is there any way to control the distance between the individual "Foobar2000" texts. Would like to find a way to make the distance between the last 0 (of 2000) and the first F (Foobar) slightly larger. Can't find a way how to though.
Change the 63 to some other number here:
"$select($sub($mod(%_playlist_number%,
63),1),"
And try something like this to make the foobar graphic the rightmost thing on your playlist

:
///////////////////////////////
//// Display file info ////
//////////////////////////////
$repeat($char(9),13)
$transition(
$if($stricmp($get(display_file_info),1),
$pad_right($get(tag_spacer),1)
$pad_right($upper($right(%_filename_ext%,3)),3) $pad_right(%__bitrate%/$div(%__samplerate%,1000),3))
$if($stricmp($get(display_time),1),$pad_right(%_length%,7)),
11118E|11118E,000000|000000)
$repeat($char(9),2)$get(FB2K)
tweak the $repeat($char(9),
X) values to get it to work well for you
window tittle:
$caps2(
[%artist% ]$if(%title%,$if(%album%,'['%album%']',-) %title%,%_filename_ext%)) ::
%__bitrate%kbps['('%__extrainfo%')']
:: %_time_remaining%
intoxicated
Jun 7 2003, 17:28
QUOTE(anza @ Jun 7 2003 - 09:02 AM)
Try to redownload it. It should work now, I'm not sure what was wrong and only uploaded my current formatting.
hmmm
turned out to be the same..
here is the screen shot ...
screenshot
billcow
Jun 8 2003, 02:13
yeeks! I missed a lot since last night.
1) I actually whipped up a foobar text thingy last night right after I posted, but it was basically the same thing everyone else here figured out, so I won't bother posting it.
2) The progressbar... I have the code for my statusbar at
http://billcow.cjb.net/foobar01_status.txt. It's a modification of one posted here earlier.
3) idvah - it works best with a monospace font - but it should work with a variable font too, albeit to a lesser extent (can't replace *all* spaces with it, only ones before a new column). So here it is. Adjust the colors to suit.
http://billcow.cjb.net/foobar_idvah.txt
picmixer
Jun 8 2003, 04:08
QUOTE(anza @ Jun 7 2003 - 08:21 PM)
Change the 63 to some other number here:
"$select($sub($mod(%_playlist_number%,
63),1),"
And try something like this to make the foobar graphic the rightmost thing on your playlist

:
///////////////////////////////
//// Display file info ////
//////////////////////////////
$repeat($char(9),13)
$transition(
$if($stricmp($get(display_file_info),1),
$pad_right($get(tag_spacer),1)
$pad_right($upper($right(%_filename_ext%,3)),3) $pad_right(%__bitrate%/$div(%__samplerate%,1000),3))
$if($stricmp($get(display_time),1),$pad_right(%_length%,7)),
11118E|11118E,000000|000000)
$repeat($char(9),2)$get(FB2K)
tweak the $repeat($char(9),
X) values to get it to work well for you
Couldn't resist still trying this out late at night yesterday. Works perfect. I can arrange everything in any way I want to right now. Guess it would have taken me a while to figure that one out.
Thanks once more anza & UpNorth. Great work.
picmixer, glad you got your formatting to work!

upNorth was the first to put foobar2000 text there, but I think I was the first to put my favourite band's name there

I'm also working on the logo, but it isn't an easy task to do..
So, here's something for all you Nirvana fans:
PicEDIT You'll need my version of ProFont (
here). If you want to use some other font, change all the "¸"s to #s or some other characters you like.
Code (change the 150 to change the distance between those "Nirvana" texts):
QUOTE
$transition(
$select($mod(%_playlist_number%,150),
,
¸ ¸,
¸¸¸¸¸¸¸,
¸ ¸¸,
¸¸¸,
¸¸ ,
¸¸ ,
¸¸¸ ¸,
¸¸¸¸¸¸¸,
¸ ¸,
,
¸ ¸,
¸¸¸¸¸¸¸,
¸¸¸¸¸¸¸,
¸ ¸,
,
¸ ¸,
¸¸¸¸¸¸¸,
¸¸¸¸¸¸¸,
¸ ¸ ¸,
¸¸¸¸¸¸,
¸¸¸ ¸¸ ,
¸ ,
¸ ¸,
¸¸¸,
¸¸¸¸¸,
¸¸¸¸ ¸,
¸¸ ,
¸¸ ¸,
¸¸¸,
¸ ¸,
¸¸¸ ,
¸ ¸¸¸ ,
¸ ¸¸,
¸ ¸¸¸¸¸,
¸¸¸¸¸ ,
¸¸¸ ,
¸ ,
,
¸ ¸,
¸¸¸¸¸¸¸,
¸ ¸¸,
¸¸¸,
¸¸ ,
¸¸ ,
¸¸¸ ¸,
¸¸¸¸¸¸¸,
¸ ¸,
,
¸ ,
¸¸¸ ,
¸ ¸¸¸ ,
¸ ¸¸,
¸ ¸¸¸¸¸,
¸¸¸¸¸ ,
¸¸¸ ,
¸ ,
,)
,<COLOR1>,<COLOR2>)
intoxicated
Jun 8 2003, 06:03
QUOTE(anza @ Jun 8 2003 - 12:03 AM)
Are you sure you copied everything needed? I never have gotten the formatting to go like that

You'll have to copy _everything_ after the line "// SETUP".
opps..
i did something wrong.
but even tho i copy after //setup
it turned out to be
xxxx|[SYNTAX ERROR IN FORMATTING STRING]
for all the tracks...
weird..
Really weird.. Could you try to copy only a few lines at a time (like first only the colors, then "now playing" colors, then misc variables) and like that try to find out where the syntax error is?
upNorth
Jun 8 2003, 09:03
I find the easiest way to locate the error is to start at the top and insert a letter og something after a few lines. If it shows up in the preview area before the error message, code prior to this is ok. Remove the letter and put it somewhere futher down. Do this trought the whole code. It can be a good idea to do a test in the middle first, if the code is very long...

To make it easier to read and write the code, I've customized a syntax file for textpad to work with foobar2000 for syntax highlighting. This helps to avoid errors too.
hmm i tried all sort by album scripts in this thread with copy & paste in foobar.. but it doesnt work at all...
either i see NOTHING in my playlist anymore (color is set correct) or i only see filenames, but no nice album formatting....
Are you sure that
1) you use the correct font (some of the formattings need a specific font)
AND
2) you're files are correctly tagged?
Ok my formatting HAD at least one bug: one % instead of a $

Right now you'll have to copypaste the ENTIRE formatting.txt to foobar, I've removed all notes, sort by strings etc from the file. The current string is avaliable
here. The old one is
here. If you don't like the Nirvana text, you can change it to foobar2000 by changing the part of the code to what I've posted before, or you can turn it completely off by commenting one line (comment tells you which one

)
The Link
Jun 8 2003, 14:12
@Max: Use playlist font "Terminal". It has no unicode support but works with the intended layout (here). Lucida Console didn´t work with me either! Don´t know why. Perhaps there are different versions and we both are from germany so....
musicmusic
Jun 8 2003, 14:12
Try Lucida Console ANSI (if you have it? i do on XP), but youd be better of modifying the string using character map.
hmm i used a fixed font.. but my problem is no wrong foramtting... i dont have a formatting at ALL!
it looked somehow like this:
c:\music\01-artist-song1
c:\music\01-artist-song2
c:\music\01-artist-song3
and so on....
second example i copied and pasted looked like this:
hehe.. yea.. there was NOTHING.. i could mark the file, but it didnt show them at all..
billcow
Jun 8 2003, 16:57
A few things (no new formatting strings though):
upNorth - Could you post your textpad syntax file? Could be really useful (although I prefer VIM to textpad)
and a small hint - if you have an ad-blocking proxy installed (I use privoxy) you can probably configure it to forge HTTP refferres - which fixes any problems with external linking of images and such. Fixes many a pain-in-the-(butt).
I'm trying to think of ideas for something interesting I could do with foobar, but I could use some ideas. All I can think of right now is to write a perl script implementing an alternate formatting language to ease implementation of various tricks (text centering, implement a figlet-like solution for automating text stuff, pseudo-background-color alterations, etc) via implementation of macros and such. Only problem is that i'm not too keen with BNF and the various parser-generators. And I only have a basic knowledge of regular expressions (If you don't know what any of those are, you're not alone - they are basically complicated things that only extreme computer geeks have any knowledge of)
cyber_spooky
Jun 8 2003, 22:44
I got some question about dividers, see following screenshot. I got blue lines between in "fileextention | trackgain" but as you can see the lenght of the string is different between OGG and MP3 so the lines don't line up vertically one under the other. Is there a trick for this in the code?
Also how do you guys make long continuous vertical divider lines in your playlist from top to bottom??
intoxicated
Jun 9 2003, 00:01
QUOTE(anza @ Jun 8 2003 - 05:10 AM)
Really weird.. Could you try to copy only a few lines at a time (like first only the colors, then "now playing" colors, then misc variables) and like that try to find out where the syntax error is?
i tried to paste code bit by bit.
i found that
all the codes work fine up to this line
CODE
$puts(LENGTH,$get(NP_L2)%_length%$get(LIGHT)$if(%tracknumber%,$select($min(%tracknumber%,2),$if(%lasttrack%,?]',?),$if(%lasttrack%,?, |)), ))
after i put that it shows out
[SYNTAX ERROR IN FORMATTING STRING]
QUOTE(JEN @ Jun 8 2003 - 10:34 PM)
@ anza
I like your script but, why are the album lines not ending like they are supposed to end.
Check out the part circled red
here The last tracks of the albums need a %lasttrack% tag (no matter what value, I've set mine to "true"). The script checks if it is present and ends the lines according to that.
QUOTE(cyber_spooky @ Jun 9 2003 - 07:44 AM)
I got some question about dividers, see following screenshot. I got blue lines between in "fileextention | trackgain" but as you can see the lenght of the string is different between OGG and MP3 so the lines don't line up vertically one under the other. Is there a trick for this in the code?
Also how do you guys make long continuous vertical divider lines in your playlist from top to bottom??
1) You'll have to use monospaced font
2) I myself have only edited the font I use so that | is a bit longer.
intoxicated
Jun 9 2003, 00:13
think i fugured out where the problem is..
since my default language for non-unicode isn't english ..
when i open up the code with note bad
the system changed the code abit after paste'n'copy
i tried to open up the code with internet explorer and change the encode to ISO
and it works..
somehow..
sorry if i caused any trouble..
but wow
the code looks nice..
just wondering..
is there anyway i can fix up the alignment of the tracks for non-english tags?
EDIT: I see you got it working, great!
At least with 0.667 you can select what it does with double-width characters, try to change that. I don't know if it fixes the problem, as I myself don't have any of that kind of tracks.
intoxicated
Jun 9 2003, 00:30
QUOTE(anza @ Jun 8 2003 - 10:17 PM)
EDIT: I see you got it working, great!
At least with 0.667 you can select what it does with double-width characters, try to change that. I don't know if it fixes the problem, as I myself don't have any of that kind of tracks.
i tried..
no use..
same result..
but anyway.. only the line of first track is slightly longer...
this forammting still looks SO COOL...
think i should take some times to figure out how to write my own one...
after the exams...
tkx for the great job again...