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: Track Info Panel with ability to change font (Read 729424 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Track Info Panel with ability to change font

Reply #400
Now it works. Thanks

Track Info Panel with ability to change font

Reply #401
I have this strangest problem:i have buttons for rating and mood,the commands are assigned via the masstager.When i click on rating=x it works fine,but if i click on mood=x after it,it sets the mood correctly,but removes the rating field.Now i've noticed that if you go to "properties" of the playing track and use the "reload"
function it fixes the problem,but there's no way to access this command via the $button function.Any ideas?
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #402
the src rect specifies which part of the resized image you want. leave it to 0s if you want the whole image.

That's how I thought it should work, but its not.  Here's my code:

Code: [Select]
$imageabs2(200,200,,,,,,,'F:\Foobar Pictures\'$meta(artist sort,0).jpg,)

As it stands it should resize the image to 200x200 at 0x0.  I think that's correct.  But instead the picture isn't displayed.  If I remove the 200,200 the picture appears, but at its original size.  If I increase the size to about 500x500, the picture is displayed full size, but moved to the left and down.

Track Info Panel with ability to change font

Reply #403
Nevermind,i did it.
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #404
Code: [Select]
...
$button(23,23,0,0,20,20,images\button.png,images\button2.png,playpause,)
...

and now it works fine. I don't know what why the first one didn't work??
...


So what is the "Command" for play/pause? I tried "playpause" like above and also "play or pause" as mazy suggested but my button simply doesnt do anything.

Here's my current code:
Code: [Select]
$if($and(%isplaying%,$not(%ispaused%)),
$button(10,10,0,0,25,15,images\button.pause.png,images\hover.pause.png,playpause,)
,
$button(10,10,0,0,25,15,images\button.play.png,images\hover.play.png,playpause,)
)


The button displays properly according to playback state and the hover works well (except the aforementioned updateeverysecond hoverstate problem).. but doesnt do anything at all whe I click on it.

Track Info Panel with ability to change font

Reply #405
I'm experiencing a really serious slow down after upgrading to the latest version.Not only in trackinfo mod panel
(which is taking 2 seconds to update) but in all the rest of foobar also,for example it freezes when i'm changing
the volume or selecting next track.If switched back to previous version everything is back to normal.
Running win xp x64 on Intel dual core 3 GHz processor with 1G RAM.Any ideas?
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #406
I'm experiencing a really serious slow down after upgrading to the latest version.Not only in trackinfo mod panel
(which is taking 2 seconds to update) but in all the rest of foobar also,for example it freezes when i'm changing
the volume or selecting next track.If switched back to previous version everything is back to normal.
Running win xp x64 on Intel dual core 3 GHz processor with 1G RAM.Any ideas?


Yep, I have 2.5g 1gig ram and im getting the same thing 

Track Info Panel with ability to change font

Reply #407

I'm experiencing a really serious slow down after upgrading to the latest version.Not only in trackinfo mod panel
(which is taking 2 seconds to update) but in all the rest of foobar also,for example it freezes when i'm changing
the volume or selecting next track.If switched back to previous version everything is back to normal.
Running win xp x64 on Intel dual core 3 GHz processor with 1G RAM.Any ideas?


Yep, I have 2.5g 1gig ram and im getting the same thing 

I think it have to be reported as a bug,unless it's may be caused by incompatibility with some other component.
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #408
%_width% - The width of the panel in pixels
$calcwidth(x) - The width of string x in pixels
$len(x) - The width of string x in characters


those functions are already in there?? sweet! i would have updated to this version a long time ago.. i'll have a go at this crazy new panel when i have the time, hopefully later tonight when i get home.
thanks.

Track Info Panel with ability to change font

Reply #409
Ok,i examined the slowdown issue and it appears to be caused by:
Quote
+added support for cwb_hooks callback notifications

Now if you switch to previous version of cwb_hooks that doesn't provide the callback notifications it's all good
again.I think it have to be fixed as both newest cwb_hooks and trackinfo mod versions provides absolutely
essential functions,but don't get along with each other.
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #410
I have a problem with a hidden feature in this plugin. When I double-click the the track info mod panel what I select is displayed in the panel. But if I double-click again and no track is playing I get '?' and '[UNKNOWN FUNCTION]' text. Wouldn't it be better if no track is playing that the selected track information is displayed instead, until a track IS playing.

Also. Would it be possible to clean up the settings dialog (display options). And perhaps make the code text box a little bigger.

Track Info Panel with ability to change font

Reply #411
I have a problem with a hidden feature in this plugin. When I double-click the the track info mod panel what I select is displayed in the panel. But if I double-click again and no track is playing I get '?' and '[UNKNOWN FUNCTION]' text. Wouldn't it be better if no track is playing that the selected track information is displayed instead, until a track IS playing.

Also. Would it be possible to clean up the settings dialog (display options). And perhaps make the code text box a little bigger.

I always started my old track info panel with this code:
Code: [Select]
$if($and($stricmp(%_trackinfo_mode%,Follow Cursor),$stricmp(%_trackinfo_notrack%,1)),
'NO TRACK SELECTED',
$if($and($stricmp(%_trackinfo_mode%,Now playing),$stricmp(%_trackinfo_notrack%,1)),
'NO TRACK PLAYING',...)

The "..." is where you would put the rest of your code to display whatever info in the playback/selected mode when a track is present.

Just a suggestion to work around the problem.

Track Info Panel with ability to change font

Reply #412
That's great if there is a workaround. Though your code only makes everything disappear for me.

Track Info Panel with ability to change font

Reply #413
mil3s,

It should work if you put all of your current code where the "..." is at the end.  Plus, I accidentally forgot one more ")" at the end.  There should be two, not one.  If not, maybe post your code, and I will test it out quick in mine.

Track Info Panel with ability to change font

Reply #414
Works now. Thanks.  The ')' was missing as you said.

2 more questions.
*Why does the button rating code only work if I have Rating in the right-click menu?
*What is $drawrect?

Track Info Panel with ability to change font

Reply #415
*Why does the button rating code only work if I have Rating in the right-click menu?
*What is $drawrect?

you have to have some command (main menu or context menu) to reference from $button, that's why. custom info creates commands in context menu, but you may be able to remove it from it, i'm not 100% sure though.

$drawrect is custom function terrestrial put into his components. it can be used to draw rectangles (with given pen and brush colors, effects etc.), there's more info about it in the wiki.

Track Info Panel with ability to change font

Reply #416
I have a problem with the buttons.

For example, I have this:
$button(10,140,0,0,0,0,pause1.png,pause2.png,Pause,)

It doesn't work.
I don't have the Pause command in the context menu, but I have it in the Playback menu in the toolbar.
What can I do?

Track Info Panel with ability to change font

Reply #417
CepiPerez:

I have been wrestling with this one myself. From what I've been able to gather, $button() can currently only access commands present in the right-click context menu. It cannot access commands from the foobar main menu nor the playback menu.

However, foo_run runservices are displayed in the right-click context menu. Therefore you can create a runservice called for example "playpause" and set that runservice to execute "foobar2000.exe /playpause". This method is a bit sluggish and I would very much like to find an alternative.

If anyone else has further information about this, corrections, or alternatives please post.

Track Info Panel with ability to change font

Reply #418
Edit: Never mind, sometimes a refresh does all the work for you. See post above mine.
There's a storm on the loose, there's sirens in my head...

Track Info Panel with ability to change font

Reply #419


Would you mind posting your code and images for the rest of this? I suck at formatting, so I have to either steal something or have a blueprint to go by.

Track Info Panel with ability to change font

Reply #420

Would you mind posting your code and images for the rest of this? I suck at formatting, so I have to either steal something or have a blueprint to go by.

Quick and dirty, but here it is:

Code: [Select]
///bg///
$imageabs(0,0,images\cloudbw.png,)
$imageabs(0,25,images\grassleaves.png,)

$align(center,top)
$font(lucida sans unicode, 8, bold glow-0-0-0,255-255-255)

///codec///
$if($stricmp($substr(%codec%,1,7),windows),WMA,[%codec%]$char(32)|$char(32))

///encode///
$if($stricmp($codec(),mp3),
$if($stricmp(%__extrainfo%,VBR),VBR$char(32)|,$char(32)CBR$char(32)|$char(32)),)
$char(32)%__bitrate_dynamic%$char(32)kbps$char(32)|$char(32)

///channels///
$if($stricmp(%channels%,8ch),7.1$char(32),)
$if($stricmp(%channels%,7ch),6.1$char(32),)
$if($stricmp(%channels%,6ch),5.1$char(32),)

///mode///
$if($stricmp(%__mp3_stereo_mode%,joint stereo)JOINT STEREO$char(32)|,)
$if($stricmp(%channels%,stereo),STEREO$char(32)|,)
$if($stricmp(%channels%,MONO),MONO$char(32)|,)

///tag type///
$if($strstr($info(tagtype),id3v1),$char(32)ID3V1$char(32),)
$if($strstr($info(tagtype),id3v2),$char(32)ID3V2$char(32),)
$if($strstr($info(tagtype),apev2),$char(32)APEV2,)

///replaygain///
$font(lucida sans unicode,8, bold glow-0-0-0,255-255-255)
$if(%__replaygain_track_gain%,$char(32)|$char(32)ReplayGain,)

///rating///
$char(32)|$char(32)$char(32)$font(lucida sans unicode,8,bold glow-0-0-0,255-255-255)
$repeat(★ ,%rating%)$repeat($font(lucida sans unicode,8,bold glow-0-0-0,100-100-100)★ ,$sub(5,%rating%))

///title///
$alignabs(10,14,%_width%,%_height%,,)
$font(lucida sans unicode,18,bold glow-50-50-50 ,200-200-200)
[%artist% '/' ][%title%]

///album///
$alignabs(25,42,%_width%,%_height%,,)
$font(lucida sans unicode,10, bold glow-50-50-50,200-200-200)
[%album%][$char(32)'('%date%')']

///status///

$puts(count_idx,$add($mod(%_time_elapsed_seconds%,40),1))
$puts(count_path,images\count$get(count_idx).png)
$imageabs($sub(%_width%,102),3,$get(count_path),)

$if(%_ispaused%,
$alignabs($sub(%_width%,72),24,%_width%,%_height%,,)
$font(lucida sans unicode,30, bold glow-0-0-0,200-200-200)
▮▮,
$alignabs($sub(%_width%,67),16,%_width%,%_height%,,)
$font(lucida sans unicode,36, bold glow-0-0-0,200-200-200)
▶ )

///progress///
$alignabs(13,80,%_width%,%_height%,,)
$font(lucida sans unicode,8,bold glow-50-50-50 ,200-200-200)
%playback_time%

$drawrect(0,73,$sub(%_width%,132),7,pencolor-200-200-200 brushcolor-0-0-0 width-1)

$if3($strcmp(%playback_time_seconds%,0)
,,$drawrect(2,75,$muldiv(%playback_time_seconds%,$sub(%_width%,136),%length_seconds%),3,pencolor-200-200-200 brushcolor-200-200-200 width-1)
,)

$alignabs($sub(%_width%,148),80,%_width%,%_height%,,)
%playback_time_remaining%

///fg effect///
$puts(glass_intensity,10)
$imageabs(0,$sub($get(glass_intensity),20),images\glass.png,)

images

Track Info Panel with ability to change font

Reply #421
Using Russell's Home Stereo Code (v1.9 micro) foobar crashes when I try to use the mood/rating buttons during playback. There is no crashlog. Does anyone have an idea why this is happening?
My Name is Sean and I'm here to leech off your genius.


Track Info Panel with ability to change font

Reply #423
Using Russell's Home Stereo Code (v1.9 micro) foobar crashes when I try to use the mood/rating buttons during playback. There is no crashlog. Does anyone have an idea why this is happening?

Yes it happens sometimes for an unknown reason,i'll post an update that uses database/textfile/SQL for
saving those values instead of tag writing today.
Favourite artist:CD-R
Favourite album:700MB

 

Track Info Panel with ability to change font

Reply #424
Greetings,

as a newbie to foobar and this forum, first of all thanks to those folks writing stuff like foobar, plugins etc and to those writing and helping out in this forum !

I read quite a lot of the messages and tutorials, did a few searches, still two questions (for now):

1) I didn't really understand the different align functions. Is it necessary at all to specify them (if I can live with a rather simple trackinfo)? Do they affect everything that follows until a new align-function or ... Maybe someone can point me to a place where I can get a simple introduction (yet a little more detailed than the wiki).

2) About displaying images and buttons in the trackinfo. How can it be, I can display an image using the button tag but not (the same image, location etc) using the imageabs tag? What am I missing here? Could it be it has to with the fact I don't use any align tags in my script so far? Here's my code, where the button is succesful and the image not:
Code: [Select]
$button(10,10,0,0,0,0,icons\png\mp3.png,,,)
$imageabs(20,20,icons\png\mp3.png,)

Thanks in advance
Hifish