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 730052 times) previous topic - next topic
0 Members and 5 Guests are viewing this topic.

Track Info Panel with ability to change font

Reply #800
I'm getting confused with all the alignment stuff cause I'm pretty new to all the fancy trackinfo mod functions. Whats the best way (least code!) to prevent wrapping?

I have a panel, the center part of it is reserved for three lines (Ensemble/Conductor, Title, Album/Work). The bounding rectangle is done with alignabs(). Problem: If the title line is too long, Album/Work will not show up, because the title wraps.

How would you resolve this if the horizontal alignment is "center"? Split the bounding rectangle to 3 rectangles with alignabs() and checking for the text width? Or is there a better possibility?

TIA

Track Info Panel with ability to change font

Reply #801
Squeller, you simply have to make the bounding box big enough (it can have negative x-pos or width exceeding the panel's width). you could then use semitransparent png with gradient to visually 'fade out' the parts of the string which could get into the rest of your design.

edit: i uploaded screenshot of my old trackinfo panel for sort of 'from the sofa visible track info panel' which i have as collapsed docking panel on side of my foobar. you can notice that the first line is longer that the available space and that i fade it out (using transparent png). in your case of centrally aligned text you of course have to make it overlap both sides by the same length.


Track Info Panel with ability to change font

Reply #802
i need some help here, ok i installed the newest version of trackinfo mod and my progress bar and time didnt  work right here is my code for them:

time elapsed
%code%
$padding(0,11)
$align(left,bottom)
$font(Calibri,9,glow- glowexpand-0 glowalpha-125,180-184-194)
[%_time_elapsed%]
%/code%


progressbar
<%ode%
$padding(0,8)
$align(center,bottom)
$drawrect($muldiv(%_width%,8,100),4,$muldiv(%_width%,81,100),9,brushcolor-null pencolor-180-184-194)
$drawrect($add($muldiv(%_width%,8,100),2),6,$ifgreater($muldiv($sub($muldiv(%_width%,81,100),4),%playback_time_seconds%,%length_seconds%),0,$muldiv($sub($muldiv(%_width%,78,100),4),%playback_time_seconds%,%length_seconds%),1),5,brushcolor-240-240-240 pencolor-null)
%/code%

can anyone help me

Track Info Panel with ability to change font

Reply #803
I'm getting confused with all the alignment stuff cause I'm pretty new to all the fancy trackinfo mod functions. Whats the best way (least code!) to prevent wrapping?

I have a panel, the center part of it is reserved for three lines (Ensemble/Conductor, Title, Album/Work). The bounding rectangle is done with alignabs(). Problem: If the title line is too long, Album/Work will not show up, because the title wraps.

How would you resolve this if the horizontal alignment is "center"? Split the bounding rectangle to 3 rectangles with alignabs() and checking for the text width? Or is there a better possibility?

TIA


I don't know if you can disable the auto wrapping... if this is what you want and if you can stand the cutting.

I'm not a trackinfomod expert but I had to solve a similar problem.
My solution was:

Title:

as titles, usually are not endless, I used the auto font reduction code I found somewhere.
The max font size reduction I set is from 36 points down to 24


Performer:

with jazz, this field can become almost endless (think of a Basie or Goodman band) and, as I'm showing it in big letters,
it can take even more than ten lines if you don't want to reduce the font down to 10/12 points, so I set up a scrolling code that let me keep using a big font.

http://www.hydrogenaudio.org/forums/index....st&p=449186

I had to use a trick so I don't know if it can work everywhere.
If you feel like giving it a try I'll be glad to post the code with some explanation.

Track Info Panel with ability to change font

Reply #804
The first question is where you put your code. Look at the wiki of track info mod. In the new version there were some changes. You must put time in the per second section.

Track Info Panel with ability to change font

Reply #805
ya i am still having troubles the %playback_time% doesnt update it every second it updates it like every 5 seconds, anyone know whats wrong?

Track Info Panel with ability to change font

Reply #806
ya i am still having troubles the %playback_time% doesnt update it every second it updates it like every 5 seconds, anyone know whats wrong?


Read the changelog and/or wiki for the redraw types

Track Info Panel with ability to change font

Reply #807
Is it possible to make the rating system like iTunes where there are blank stars for unrated tracks then you can click and rate within the info panel?

Track Info Panel with ability to change font

Reply #808
Is it possible to make the rating system like iTunes where there are blank stars for unrated tracks then you can click and rate within the info panel?

I'm pretty new to trackinfo mod and I know that there are many way better ways of doing this but if you put two imagefiles in your Images directory named greystar.png and yellowstar.png and then insert this code you should have something simular

Code: [Select]
$select(%rating%,
$puts(status1,yellow),
$puts(status1,yellow)$puts(status2,yellow),
$puts(status1,yellow)$puts(status2,yellow)$puts(status3,yellow),
$puts(status1,yellow)$puts(status2,yellow)$puts(status3,yellow)$puts(status4,yellow),
$puts(status1,yellow)$puts(status2,yellow)$puts(status3,yellow)$puts(status4,yellow)$puts(status5,yellow))

$button(5,HORISONTAL Position,0,0,0,0,Images\$if3($get(status1),grey)star.png,Images\yellowstar.png,TAG:SET:rating:1,)
$button(23,HORISONTAL Position,0,0,0,0,Images\$if3($get(status2),grey)star.png,Images\yellowstar.png,TAG:SET:rating:2,)
$button(41,HORISONTAL Position,0,0,0,0,Images\$if3($get(status3),grey)star.png,Images\yellowstar.png,TAG:SET:rating:3,)
$button(59,HORISONTAL Position,0,0,0,0,Images\$if3($get(status4),grey)star.png,Images\yellowstar.png,TAG:SET:rating:4,)
$button(77,HORISONTAL Position,0,0,0,0,Images\$if3($get(status5),grey)star.png,Images\yellowstar.png,TAG:SET:rating:5,)

and of course change the HORISONTAL Position to what suites you
I just like listening to music

Track Info Panel with ability to change font

Reply #809
Why not show good some album art in this mod? Some covers show "pixelated" but the jpg is a big resolution... 

Example:


Track Info Panel with ability to change font

Reply #810
in your case of centrally aligned text you of course have to make it overlap both sides by the same length.

Thx mazy. The "problem" is, if the line length exceeds the %_width%, I want to have it left aligned. OK, I think I'll have to handle the 2 cases with ifgreater...

Track Info Panel with ability to change font

Reply #811
Why not show good some album art in this mod? Some covers show "pixelated" but the jpg is a big resolution... 

Example:



I have the same problem here.
That's something about the progresive option in JPEG formats (you can see it in Photoshop).

Track Info Panel with ability to change font

Reply #812
Has anyone else noted a problem with the edit box in the settings window scroll all the way to the top when you click "apply?"  I'm fairly certain that it didn't behave this way before and it makes editing strings much more difficult.

This could be a incidental problem with Vista, but I don't immediately blame Microsoft for all of my problems.


Track Info Panel with ability to change font

Reply #814
Has anyone else noted a problem with the edit box in the settings window scroll all the way to the top when you click "apply?"
Yes.


Oh, I guess I'm just a bit behind the times then. Spent the last two days trying to get AIW 9600 to work with Vista, which is only as hard as getting it to work with XP (very hard).

*pets the kitty*

edit: typo

 

Track Info Panel with ability to change font

Reply #815
is there any way to make a button out of drawn rectangles?

specifically making a progress bar within foo_trackinfo_mod that is functional for scrolling through a song

Track Info Panel with ability to change font

Reply #816
is there any way to make a button out of drawn rectangles?

specifically making a progress bar within foo_trackinfo_mod that is functional for scrolling through a song


make the button image a transparent png and overlay it in the area

Track Info Panel with ability to change font

Reply #817
is there any way to make a button out of drawn rectangles?

specifically making a progress bar within foo_trackinfo_mod that is functional for scrolling through a song

This is what I use:
Code: [Select]
$puts(pbar_length,$sub(%_width%,31))
$puts(percent,$muldiv(%_time_elapsed_seconds%,$get(pbar_length),%_time_total_seconds%))
$puts(pbar_progress,$muldiv($get(percent),1000,1000))

$button(15,2,0,0,$get(pbar_progress),5,,,'Seek back by 10 seconds',)
$button(15,2,0,0,$get(pbar_length),5,,,'Seek ahead by 10 seconds',)

Buttons coordinates lead to where my progress bar is. The first button covers the already played area on the progress bar and the second one, the area left to play.

It does not work flawlessly though... Terrestrial said he might add "update PerSecond" support for buttons soon.

Track Info Panel with ability to change font

Reply #818
is there a way to display timestamped lyrics in a track info mod? I want to have lyrics over a background.

my lyrics are associated, but they are named the same as the mp3 filename with a lrc extention.

Track Info Panel with ability to change font

Reply #819
Hey is it "normal" that foobar completely stops up for about 20 seconds with some scripts in trackinfo_mod? I only get this problem when having a trackinfo_mod panel in my layout. I'm running on a 850 MHz AMD athlon with 256 MB ram
I just like listening to music

Track Info Panel with ability to change font

Reply #820
Noone having a CPU problem?

With a fullscreen panel and the only codeline: "// PerSecond" I'm having 75% CPU usage (most of the time) on my P3/800 Thinkbad notebook. With the same code, I have 5% on my P3/500 workstation. I can definitely say it's the Perseconds statement. Sometimes fb2k works fluently with Perseconds turned on, but most of the time it eats cpu. Could it be a graphics driver issue?

Track Info Panel with ability to change font

Reply #821
I want to underline Text with a progress bar made with drawrect(). The Problem: The texts position can vertically vary. So can I align rectangles relative to a peice of text? Thanks.

To describe what I mean. Basically I have:

Code: [Select]
$align(center,middle)
%artist%$char(10)
%title%$char(10)
...


Now I want to underline the %artist%. But it's vertical position varies depending on the line breaks.

Track Info Panel with ability to change font

Reply #822
Squeller I can also confirm extremely high CPU usage with the //persecond line, everyone remember how in the old track info you had to keep the scroll steps to like 1 I think. Maybe it's something like that. I really don't know, maybe in the next update.

Track Info Panel with ability to change font

Reply #823
Dunno if it's Track Info Panel problem, but it doesn't show me bitrate dynamically. Instead it just shows first bitrate number. Strangely enough, bitrate number starts to change whenever i resize the area of track info panel.

Track Info Panel with ability to change font

Reply #824
Iodine_Galaxy: Did you place your bitrate code beneath a // PerSecond header?