Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Foobar2000 format strings (Read 497629 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar2000 format strings

Reply #1225
Thank you both very much for your help. I took richard's idea first since that's what I saw when I revisited this thread. I don't quite understand how the $min function works and I'd rather not invest the time to experiment with it seeing as the $strcmp is just about as efficient (uber-redundant). The important thing is that I at least got the string made though right? So here's my final code for the fade dealy:
Code: [Select]
//**************************
//********** Countdown
//**************************
//Color

$puts(10_color,158E21|2177A5)
$puts(9_color,168420|2891C8)
$puts(8_color,177B20|3EA3D9)
$puts(7_color,17711F|4EAADC)
$puts(6_color,18681F|61B4E0)
$puts(5_color,195E1E|71BBE3)
$puts(4_color,1A541D|7BC0E6)
$puts(3_color,1B4B1D|86C6E8)
$puts(2_color,1B411C|96CDEB)
$puts(1_color,1C381C|A8D6EE)

//String mess

//10

$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),10)),$get(10_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),10)),$get(10_color)[$get(artist) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),10)),$get(10_color)[$get(album) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),10)),$get(10_color)[$get(title)]                           ,)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),10)),A0EBE1%_time_remaining_seconds%,)

//9

$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),09)),$get(9_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),09)),$get(9_color)[$get(artist) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),09)),$get(9_color)[$get(album) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),09)),$get(9_color)[$get(title)]                           ,)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),09)),A0EBE1%_time_remaining_seconds%,)

//8

$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),08)),$get(8_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),08)),$get(8_color)[$get(artist) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),08)),$get(8_color)[$get(album) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),08)),$get(8_color)[$get(title)]                           ,)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),08)),A0EBE1%_time_remaining_seconds%,)

//7

$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),07)),$get(7_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),07)),$get(7_color)[$get(artist) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),07)),$get(7_color)[$get(album) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),07)),$get(7_color)[$get(title)]                           ,)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),07)),A0EBE1%_time_remaining_seconds%,)

//6

$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),06)),$get(6_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),06)),$get(6_color)[$get(artist) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),06)),$get(6_color)[$get(album) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),06)),$get(6_color)[$get(title)]                           ,)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),06)),A0EBE1%_time_remaining_seconds%,)

//5

$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),05)),$get(5_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),05)),$get(5_color)[$get(artist) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),05)),$get(5_color)[$get(album) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),05)),$get(5_color)[$get(title)]                           ,)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),05)),A0EBE1%_time_remaining_seconds%,)

//4

$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),04)),$get(4_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),04)),$get(4_color)[$get(artist) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),04)),$get(4_color)[$get(album) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),04)),$get(4_color)[$get(title)]                           ,)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),04)),A0EBE1%_time_remaining_seconds%,)

//3

$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),03)),$get(3_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),03)),$get(3_color)[$get(artist) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),03)),$get(3_color)[$get(album) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),03)),$get(3_color)[$get(title)]                           ,)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),03)),A0EBE1%_time_remaining_seconds%,)

//2

$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),02)),$get(2_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),02)),$get(2_color)[$get(artist) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),02)),$get(2_color)[$get(album) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),02)),$get(2_color)[$get(title)]                           ,)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),02)),A0EBE1%_time_remaining_seconds%,)

//1

$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),01)),$get(1_color)$num(%_playlist_number%,$len(%_playlist_total%)).' ',)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),01)),$get(1_color)[$get(artist) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),01)),$get(1_color)[$get(album) - ],)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),01)),$get(1_color)[$get(title)]                           ,)
$if($and(%_isplaying%,$strcmp($num(%_time_remaining_seconds%,2),01)),A0EBE1%_time_remaining_seconds%,)


$if(%_isplaying%,$ifgreater(%_time_remaining_seconds%,10,438B7C$num(%_playlist_number%,$len(%_playlist_total%)).' '[$get(artist) - ][$get(album) - ][A0EBE1$get(title)]                           ,))


Once again, I appreciate the prompt feedback. So now for another one of my questions, "-check mark appears on left when track has been submitted to audioscrobbler".

Thanks in advance for your continued support

Foobar2000 format strings

Reply #1226
Quote
So now for another one of my questions, "-check mark appears on left when track has been submitted to audioscrobbler".[a href="index.php?act=findpost&pid=325066"][{POST_SNAPBACK}][/a]

I don't think there's any way you can determine if a track's been submitted through titleformatting yet, but here's something similar:
Code: [Select]
$if($greater($muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%),49),$char(10003))

It'll display a check mark once the track hits >= 50%. Note that it'll still display a check even if foo_audioscrobbler doesn't actually submit, i.e. you manually seek to 50+% instead of playing the track.
f to c to f to c

Foobar2000 format strings

Reply #1227
How do you add these format stings?

Foobar2000 format strings

Reply #1228
Quote
How do you add these format stings?[{POST_SNAPBACK}][/a]

if you're using..
the default UI, Preferences > Display > Title formatting > paste in the Playlist tab
[a href="http://music.morbo.org/beta.php]Columns UI (for fb2k 0.9 beta)[/url], Preferences > Display > Columns UI > Playlist view > Columns tab > paste in Display tab in the column of your choice (or create a new column)
Columns UI (for fb2k 0.8.3), Preferences > Display > Columns UI > Columns tab > same as above
f to c to f to c

Foobar2000 format strings

Reply #1229
I don't like being spoonfed, but i'ma t a loss. Is there anyway to make things appear for about 5 seconds, and then change (say like, song info for 5 seconds, and then tech infor for the next five) continually, for the track info box. I've tried innumerable things, but can never get it to stay long enough, or work correctly

Foobar2000 format strings

Reply #1230
Quote
Is there anyway to make things appear for about 5 seconds, and then change (say like, song info for 5 seconds, and then tech infor for the next five) continually...[a href="index.php?act=findpost&pid=325433"][{POST_SNAPBACK}][/a]

Code: [Select]
$if($greater($mod(%_time_elapsed_seconds%,10),4),Song info,Tech info)
f to c to f to c

Foobar2000 format strings

Reply #1231
Quote
Quote
Is there anyway to make things appear for about 5 seconds, and then change (say like, song info for 5 seconds, and then tech infor for the next five) continually...[a href="index.php?act=findpost&pid=325433"][{POST_SNAPBACK}][/a]

Code: [Select]
$if($greater($mod(%_time_elapsed_seconds%,10),4),Song info,Tech info)

[a href="index.php?act=findpost&pid=325436"][{POST_SNAPBACK}][/a]


I love you

Foobar2000 format strings

Reply #1232
Does anyone have some sort of script that will sort albums by one artist, albums by various artists, and single files not in an album?

Currently I have just the sorting by albums by one artist.


Anyone point me in the right direction?

0.8.3/columns_ui

Foobar2000 format strings

Reply #1233
Can anyone explain me the "%piece subsection%" field? I didn't find any refence  Another question: In 0.9 there's the option to count sub-items in the album list. Is there any function to make this number available for scripting?

Foobar2000 format strings

Reply #1234
Could someone check to see that I'm doing this right?
Code: [Select]
$if(%_isplaying%,$blend(FFFFFF|FFFFFF,FFFFFF|FFFFFF,%playback_time_seconds%,10)
$select($add(1,$mod(%playback_time_seconds%,10)),
//●••••,•●•••,••●••,•••●•,••••●,•••●•,••●••,•●•••)
●••••,●●•••,●●●••,●●●●•,●●●●●,•●●●●,••●●●,•••●●,••••●,•••••)
,%tracknumber%)

Its not working (as in the circle does not move back and forth)
I use 0.8.3

Edit - original found here: http://www.hydrogenaudio.org/forums/index....%97%8F%E2%97%8F,

Foobar2000 format strings

Reply #1235
I have a problem, don't know if i'm in the right forum or not
I can't see any filenames when i do a playlist search, it's all white!

http://web.telia.com/~u22513836/wierd.jpg

I'm using Columns UI and a some fsc from around here.

Please help a poor noob 

Foobar2000 format strings

Reply #1236
Hi guys!

Maybe someone can use this. I wrote some quick 'n' dirty python code to create a multi-color-gradient progress bar for foobar. There's a progressBar function with the following arguments:

progressBar(var, lowVal, highVal, trueStr, falseStr, gradients)

It reproduces the behavior of $progress2().

If you call it like this:

progressBar('%bitrate%', 0, 310, chr(187), '$rgb(100,100,100)' + chr(187), [((172,96,38),  (239,164,5), 12), ((239,164,5),  (89,198,230), 12), ((89,198,230), (255,255,255), 12)])

Then you get a string that looks like this in trackinfo panel:


(It's still a first draft for my personal needs)

Foobar2000 format strings

Reply #1237
If a flac file has an embedded cue sheet, what string do I need to make foobar display title and artist information for each subtrack?

This is my playlist formatting string. Proper display of cuesheet track titles and artists works when using an external cue sheet but I'm not sure on what kind of "if" statement I need to do the same for embedded cue sheets.

Code: [Select]
%directoryname% \ $if($strcmp($ext(%_path%),cue),$if2(%_subsong%' - ',)$if2(%artist%' - ',)$if2(%title%,),$if($strcmp($substr(%_path_raw%,1,7),'http://'),%title%,%_filename%))

Foobar2000 format strings

Reply #1238
Could someone check to see that I'm doing this right?

It works for me.  If this is for your playlist, make sure you check "show dynamic information in playlist" or something like that under "Preferences->Display".

Foobar2000 format strings

Reply #1239
I spent some time working on a config for foo_osd. I broke out my programming skills (a bit rusty) and came up with this. I like the simple text look, and I like having a bunch of information showing about the track, but I didn't like having a really long OSD. So I decided to try to make one that would scroll long names for you automatically. It does just that, and you can set the max length before it starts to scroll via (one of the only, also color) easily changeable variables in the config. I have to warn you, it's pretty messy, I tried to clean it up, but...

Anyway, here's a little animation (in 2x speed) of it in action. Each part scrolls independantly, and they stay at the end for about 10 seconds, then go back to the beginning...



Hope somebody can enjoy it.

edit... Going to have to link it... it's too big! Maybe someone can clean it up or something. Oh, and I forgot to mention, that font is ProFont TrueType 9 point... on a 1920x1200 resolution, it's quite small.

Link!

Foobar2000 format strings

Reply #1240
I spent some time working on a config for foo_osd. I broke out my programming skills (a bit rusty) and came up with this. I like the simple text look, and I like having a bunch of information showing about the track, but I didn't like having a really long OSD. So I decided to try to make one that would scroll long names for you automatically. It does just that, and you can set the max length before it starts to scroll via (one of the only, also color) easily changeable variables in the config. I have to warn you, it's pretty messy, I tried to clean it up, but...

Anyway, here's a little animation (in 2x speed) of it in action. Each part scrolls independantly, and they stay at the end for about 10 seconds, then go back to the beginning...



Hope somebody can enjoy it.

edit... Going to have to link it... it's too big! Maybe someone can clean it up or something. Oh, and I forgot to mention, that font is ProFont TrueType 9 point... on a 1920x1200 resolution, it's quite small.

Link!

Sweet! I cant' download it though, could you up it somewhere else? And is it possible to choose between a small and a wide bar?

 

Foobar2000 format strings

Reply #1241
Displaying track playing percentage
Code: [Select]
[$muldiv(%playback_time_seconds%,100,%length_seconds%)]'%'


Remapping %artist% %album% from foldernames

Code: [Select]
// if '-' is found in directoryname, decompose and take first chunk, else take parent directoryname as artist
$if($strstr($directory(%path%,1),'-'),? $substr($directory(%path%,1),0,$sub($strstr($directory(%path%,1),'-'),1)),? $directory(%path%,2))

Code: [Select]
// if '-' is found in directoryname, decompose and take last chunk, else take directoryname as album
$if($strstr($directory(%path%,1),'-'),? $substr($directory(%path%,1),$add($strstr($directory(%path%,1),'-'),1),$len($directory(%path%,1))),? $directory(%path%,1))


Re: Foobar2000 format strings

Reply #1242
Hello everyone. Is there any way to read html text with format strings in foobar?

thanks in advance

Re: Foobar2000 format strings

Reply #1243
You could read it from file tags, but there's no way to read it from arbitrary disk files or URLs using title formatting script, nor is there any way to parse HTML with the formatting code.

Re: Foobar2000 format strings

Reply #1244
Any help getting this format to work?

I'm trying to get

Artist - Album (Year) [FLAC/320/V0]

as the folder format.

The Artist - Album (Year) pattern is fine since that's a foobar default. Getting the [FLAC/320/V0] part selectively is not working so well for me.

Code: [Select]
%album artist% - %album%[ '('%date%')']  ' [ '  $ifgreater($strstr($info(codec), FLAC),  0 , FLAC,  false /* do conditionals again to capture 320 and/or v0 */)    ' ]'        /%tracknumber%. [%artist% - ]%title%

Example.mp3 <---

$info(codec) -> MP3
%__codec% -> MP3

$ifgreater($strstr(%__codec%, MP3), 0) <--------- returns false
$ifgreater($strstr(%__codec%, MP3), 0, tag contains string, tag does not contain string) -> 'tag does not contain string'

Not sure what I'm doing wrong to mess up this simply conditional check. :(

Re: Foobar2000 format strings

Reply #1245
Any help getting this format to work?

I'm trying to get

Artist - Album (Year) [FLAC/320/V0]

as the folder format.

The Artist - Album (Year) pattern is fine since that's a foobar default. Getting the [FLAC/320/V0] part selectively is not working so well for me.

Code: [Select]
%album artist% - %album%[ '('%date%')']  ' [ '  $ifgreater($strstr($info(codec), FLAC),  0 , FLAC,  false /* do conditionals again to capture 320 and/or v0 */)    ' ]'        /%tracknumber%. [%artist% - ]%title%

Example.mp3 <---

$info(codec) -> MP3
%__codec% -> MP3

$ifgreater($strstr(%__codec%, MP3), 0) <--------- returns false
$ifgreater($strstr(%__codec%, MP3), 0, tag contains string, tag does not contain string) -> 'tag does not contain string'

Not sure what I'm doing wrong to mess up this simply conditional check. :(

You need to put strings in quotes:
$ifgreater($strstr(%__codec%, 'MP3'), 0, 'tag contains string', 'tag does not contain string')

Also, your script can be simplified:
$if($strstr(%__codec%, 'MP3'), 'tag contains string', 'tag does not contain string')
That's so plausible, I can't believe it.

Re: Foobar2000 format strings

Reply #1246
Any help getting this format to work?

I'm trying to get

Artist - Album (Year) [FLAC/320/V0]

as the folder format.

The Artist - Album (Year) pattern is fine since that's a foobar default. Getting the [FLAC/320/V0] part selectively is not working so well for me.

Code: [Select]
%album artist% - %album%[ '('%date%')']  ' [ '  $ifgreater($strstr($info(codec), FLAC),  0 , FLAC,  false /* do conditionals again to capture 320 and/or v0 */)    ' ]'        /%tracknumber%. [%artist% - ]%title%

Example.mp3 <---

$info(codec) -> MP3
%__codec% -> MP3

$ifgreater($strstr(%__codec%, MP3), 0) <--------- returns false
$ifgreater($strstr(%__codec%, MP3), 0, tag contains string, tag does not contain string) -> 'tag does not contain string'

Not sure what I'm doing wrong to mess up this simply conditional check. :(

You need to put strings in quotes:
$ifgreater($strstr(%__codec%, 'MP3'), 0, 'tag contains string', 'tag does not contain string')

Also, your script can be simplified:
$if($strstr(%__codec%, 'MP3'), 'tag contains string', 'tag does not contain string')

This is what I'm seeing.



I hope I'm just missing something obvious here..

Re: Foobar2000 format strings

Reply #1247
It seems to be failing because of an unwanted space before the 'MP3' in your picture. Try:
Code: [Select]
$if($strstr(%codec%,MP3),tag contains string,tag does not contain string)

Re: Foobar2000 format strings

Reply #1248
It seems to be failing because of an unwanted space before the 'MP3' in your picture. Try:
Code: [Select]
$if($strstr(%codec%,MP3),tag contains string,tag does not contain string)


Thanks! That was it.

Re: Foobar2000 format strings

Reply #1249
Hope i could have explained myself with the attached screenshot..