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

Track Info Panel with ability to change font

Reply #900
GreenSmurf: Post the source strings you use in albumart, and an $imageabs2() function from your current layout so we can see how you want to position the image. It shouldnt be hard to put the two together. Basically you'll want to use a layering approach for each image source:

$imageabs2(100,100,,,,,10,10,/images\nocover.*)
$imageabs2(100,100,,,,,10,10,$replace(%path%,%filename_ext%,folder.jpg)
$imageabs2(100,100,,,,,10,10,$replace(%path%,%filename_ext%,[%album artist% - ]%album%.*)


Track Info Panel with ability to change font

Reply #902
i had this in my old trackinfo -->

Code: [Select]
$tab()
$select($add(1,$mod(%_time_elapsed_seconds%,10))
, o $tab()$char(10)$tab()<!>$tab()$char(10)$tab()< >
, o/$tab()$char(10)$tab()<! $tab()$char(10)$tab() <>
, o>$tab()$char(10)$tab()<! $tab()$char(10)$tab() <>
,<o>$tab()$char(10)$tab() ! $tab()$char(10)$tab()< >
,<o/$tab()$char(10)$tab() ! $tab()$char(10)$tab()/ >
, o $tab()$char(10)$tab()'/!,'$tab()$char(10)$tab()/ >
, o $tab()$char(10)$tab()',!>'$tab()$char(10)$tab()>>
, o $tab()$char(10)$tab()'<!,'$tab()$char(10)$tab()<<
, o/$tab()$char(10)$tab()/! $tab()$char(10)$tab()>>
, o> $tab()$char(10)$tab()/!  $tab()$char(10)$tab()/ >
)$tab()


that creates a dancing ascii-man like this -->
[a href="http://imageshack.us" target="_blank"]

edit:
i got it -->
Code: [Select]
// PerSecond
$alignabs($div(%_width%,2),$div(%_height%,2),50,50,center,top)
$rgb(58,79,108)$select($add(1,$mod(%_time_elapsed_seconds%,10))
, o $char(10)<!>$char(10)< >
, o/$char(10)<! $char(10) <>
, o>$char(10)<! $char(10) <>
,<o>$char(10) ! $char(10)< >
,<o/$char(10) ! $char(10)/ >
, o $char(10)'/!,'$char(10)/ >
, o $char(10)',!>'$char(10)>>
, o $char(10)'<!,'$char(10)<<
, o/$char(10)/! $char(10)>>
, o> $char(10)/!  $char(10)/ >
)

Track Info Panel with ability to change font

Reply #903
Hi terrestrial,I want to hank you again for this wonderful pugin,it's hard to find a config thisdays that doesn't use your components,but i have a little request:I have an albumart dispalyed in the trackinfo mod,it works fine,except for one minor issue:every time a track chages it keeps allocating additional RAM,I mean it doesn' t
frees up the memory allocated for the previous track pic when moving to the next one.So my question is:is it possible to free up the memory allocated for the image when a track changes or is it impossible during to SDK
limitations?Would like to se it implemented (if possible),thanks for your time.


I didn't originally write the image functions with album art in mind, so images, once used, are stored in memory for faster display later on. This, obviously, is ideal for buttons and icons, but not the best for album art. I've mean meaning to add an option to have images be cached "per track", but haven't had the chance to yet.


Thanks for the reply. Ok, then, I guess I must be misunderstanding something here.

I assumed that the code would be:

$button(120,120,0,0,40,40,IMAGES\button9.png,IMAGES\button9.png,Insert into Specified Playlist\Bla,)

but that's not working. I tried a couple of obvious tinkers with that code, but couldn't get anything to work. I assume it's something to do with the slash separating the command from the playlist name, but I can't figure out how else to specify the targeted playlist. What am I missing here?

Thanks,

-Nate


You just need "Bla" as the name of the button action.

I just had an idea... and I highly doubt its possible (or easy as a matter of fact lol), but I was thinking about a feature that would be cool for this plugin. We already have the ability to assign images/text to commands and buttons. Why not have an option to assign OTHER plugins to areas inside track info mod?

For example:

Code: [Select]
$newpanel(areaWidth,areaHeight,areaLeft,areaTop,panelOptions)


With something like this, we could include the lyrics panel to scroll lyrics inside the track info mod like this:

Code: [Select]
$newpanel(500,700,50,200,foo_uie_lyrics_panel)


Then of course that panel would be configurable from its own code, and no longer related to track info mod other than the fact that track info mod would be displaying it.

I think this would be cool... if it were possible.


there really wouldn't be any advantages to this. ColumnsUI's layout/positioning system is already very flexible (and easy to set up and use), and any plugins loaded "inside" trackinfo_mod wouldn't inherit its background, so the net result would be the same as what you can do now.

Track Info Panel with ability to change font

Reply #904

Thanks for the reply. Ok, then, I guess I must be misunderstanding something here.

I assumed that the code would be:

$button(120,120,0,0,40,40,IMAGES\button9.png,IMAGES\button9.png,Insert into Specified Playlist\Bla,)

but that's not working. I tried a couple of obvious tinkers with that code, but couldn't get anything to work. I assume it's something to do with the slash separating the command from the playlist name, but I can't figure out how else to specify the targeted playlist. What am I missing here?

Thanks,

-Nate


You just need "Bla" as the name of the button action.


Thanks terrestrial. I tried that, but that just deletes everything from the "Bla" playlist. I assume that this is because there are several commands that could be accessed with just the name "Bla" - i.e. the button action "Bla" could be interpreted as "Edit other/Add to specified playlist and play/Bla" or "Edit other/Remove from specified playlist and play/Bla" or "Edit other/Send to specified playlist and play/Bla". So if the button action "Bla" is all that is needed, how do I specify which of these "parent" commands to use?

-Nate

Track Info Panel with ability to change font

Reply #905
How do I stretch an image? I want the height to be static @ 3px and the width to be 100% of the trackinfo_mod area, and it should be placed at the bottom.


Track Info Panel with ability to change font

Reply #907
This should do, what you want:
Code: [Select]
$imageabs2(%_width%,3,0,0,100,100,0,$sub(%_height%,3),PATH_TO_IMAGE,nokeepaspect)

Track Info Panel with ability to change font

Reply #908
This should do, what you want:
Code: [Select]
$imageabs2(%_width%,3,0,0,100,100,0,$sub(%_height%,3),PATH_TO_IMAGE,nokeepaspect)

You almost got it. I replaced both 100 with 0 and now it works. Thanks.


Track Info Panel with ability to change font

Reply #910
Thanks for such a great component!!!

Apparently it's been asked already but i didn't find it via the search:
Any chance to have a function for getting image X Y resolutoin?

Also, has anyone figured out the way to cycle a bunch of images during a single track playback... the same way foo_uie_albumart component does it?

Thanks in advance!

Track Info Panel with ability to change font

Reply #911
Also, has anyone figured out the way to cycle a bunch of images during a single track playback... the same way foo_uie_albumart component does it?

find and count the images with $fileexist()
then
$mod(%playback_time_seconds%,$mul($gets(counter),15))
then
use $switch()


or something to that effect. Play with it, it'd be very doable.
elevatorladylevitateme

Track Info Panel with ability to change font

Reply #912
oh yeah! Thanks! Looks like it should work! Theoretically I see the way to create a transition between them as well.

Track Info Panel with ability to change font

Reply #913
Does anyone know how to cut down a text to a specific width and adding ... at the end if it's too long? I've searched but I've been unable to find an answer. 

Here is the width I want.
Code: [Select]
$sub($div(%_width%,2),38)


EDIT: Never mind. Found a solution here: http://www.hydrogenaudio.org/forums/index....;p=446174&#

Track Info Panel with ability to change font

Reply #914
oh yeah! Thanks! Looks like it should work! Theoretically I see the way to create a transition between them as well.

Please post back what you come up with.  I'd be interested to see it, especially the transition between art.

Track Info Panel with ability to change font

Reply #915
GreenSmurf: Post the source strings you use in albumart, and an $imageabs2() function from your current layout so we can see how you want to position the image. It shouldnt be hard to put the two together. Basically you'll want to use a layering approach for each image source:

$imageabs2(100,100,,,,,10,10,/images\nocover.*)
$imageabs2(100,100,,,,,10,10,$replace(%path%,%filename_ext%,folder.jpg)
$imageabs2(100,100,,,,,10,10,$replace(%path%,%filename_ext%,[%album artist% - ]%album%.*)



Source Strings for Album Art

$replace(%path%,%filename_ext%,)*
-$replace(%path%,%filename_ext%,)..\*
-components\default.*

Track Info Panel with ability to change font

Reply #916
$imageabs2(100,100,,,,,10,10,/components\default.*))
$imageabs2(100,100,,,,,10,10,$replace(%path%,%directory%\%filename_ext%,*))
$imageabs2(100,100,,,,,10,10,$replace(%path%,%filename_ext%,*))

EDIT: Sorry I forgot to close my functions properly.

Track Info Panel with ability to change font

Reply #917
$imageabs2(100,100,,,,,10,10,/components\default.*)
$imageabs2(100,100,,,,,10,10,$replace(%path%,%directory%\%filename_ext%,*)
$imageabs2(100,100,,,,,10,10,$replace(%path%,%filename_ext%,*)


I keep getting the error unknown funtion. Was there another release of info panel after 0.8beta?

Track Info Panel with ability to change font

Reply #918
Does anyone know how to cut down a text to a specific width and adding ... at the end if it's too long? I've searched but I've been unable to find an answer. 

Here is the width I want.
Code: [Select]
$sub($div(%_width%,2),38)


EDIT: Never mind. Found a solution here: http://www.hydrogenaudio.org/forums/index....;p=446174&#


That link doesn't appear to be very specific and I'd like to offer a solution to the problem because I've seen this asked many times.  This can be handled like so:

Code: [Select]
$puts(text,This is a string of text to test with)
$puts(width,$sub($div(%_width%,2),38))

$alignabs(4,4,$get(width),$calcheight(X),,)$get(text)
$ifgreater($calcwidth($get(text)),$get(width),
$alignabs($add(4,$get(width)),4,%_width%,$calcheight(X),,)...
,)


The only drawback to this approach is that there sometimes appears a gap between the last character of the text and the ellipse. If anyone has a better solution please post.

Is there any way to disable wordwrapping?

Track Info Panel with ability to change font

Reply #919
Code: [Select]
$if($fileexists($replace(%path%,%filename_ext%,*.jpg)),
$imageabs2($get(size),$get(size),,,,,$get(artX),$get(artY),$replace(%path%,%filename_ext%,*.jpg),),
$imageabs2($get(size),$get(size),,,,,$get(artX),$get(artY),$replace(%path%,%filename_ext%,../*.jpg),))
$if($fileexists($replace(%path%,%filename_ext%,*.png)),
$imageabs2($get(size),$get(size),,,,,$get(artX),$get(artY),$replace(%path%,%filename_ext%,*.png),),
$imageabs2($get(size),$get(size),,,,,$get(artX),$get(artY),$replace(%path%,%filename_ext%,../*.png),))


This is the code I have so far for the album art display.
I am trying to firgure out a way to keep the functionality the way it is but also to display when there is no album art.

Has anyone figured out how to make the progress bar clickable yet?

Track Info Panel with ability to change font

Reply #920

i have foo_uie_tabs is there a way to have a button which is not directly linked to one tab but works by:

if displaying tab 1 on click go to tab 2 & if displaying tab 2 on click go to tab 1?


I wanted this too, and there is a main menu command for it (Panel #0 Cycle Forward, 0 may be different), but it doesn't seem to work with trackinfo_mod..?



probably because of the '#'
Trackinfo mod has weird issues with #


Sorry to bump a "more than 1 month agged" question in this topic but there is some kind of solution with the #.
Follow the link to my post in foo_run thread.

Track Info Panel with ability to change font

Reply #921
EDIT: Avoid posting when you are drunk :P

Track Info Panel with ability to change font

Reply #922
Please fix the bug where the format string edit box in the configuration window scrolls to the when you hit apply.  It makes editing string almost impossible to debug and write scripts at the same time.  Thank you.

Track Info Panel with ability to change font

Reply #923
Does anyone know if there is a more accurate way to trim long text. The problem is currently that the more text that is trimmed the more inaccurate it gets. Cuts more than necessary. This is basically what I currently use.

Code: [Select]
$left($get(tracktitle),$sub($sub($len($get(tracktitle)),
$div($sub($calcwidth($get(tracktitle)),$get(areaWidth)),$get(charWidth))),3))'...'

 

Track Info Panel with ability to change font

Reply #924
Does anyone know if there is a more accurate way to trim long text. The problem is currently that the more text that is trimmed the more inaccurate it gets. Cuts more than necessary. This is basically what I currently use.

Code: [Select]
$left($get(tracktitle),$sub($sub($len($get(tracktitle)),
$div($sub($calcwidth($get(tracktitle)),$get(areaWidth)),$get(charWidth))),3))'...'


If you're not using a fixed-width font, the string will vary in length.  There's no way to get the length of a string of text in pixels to use for trimming purposes.  Too bad that most fixed-width fonts are ugly.