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: Help for my Track Display (Read 3293 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help for my Track Display

hi,

i use the following code for my track display:

Code: [Select]
// -- background gradient
$imageabs(,,itunes\trackinfo_bg.png,)
// -- left corner image
$imageabs(,,itunes\left_bg.png,)
// -- right corner image
$imageabs($sub(%_width%,9),0,itunes\right_bg.png,)



$if(%isplaying%,

$ifequal($getpvar(Spectrum1),1,
$imagebutton(6,19,
        $get(Ipath)itunes\play.png
,
        $get(Ipath)itunes\play.png
,PVAR:SET:Spectrum1:0,tooltip,Verstecke Channel Spectrum,)
,
$imagebutton(6,19,
        $get(Ipath)itunes\play.png
,
        $get(Ipath)itunes\play.png
,PVAR:SET:Spectrum1:1,tooltip,Zeige Channel Spectrum,)


)

$ifequal($getpvar(info1),1,
$imagebutton(413,19,
        $get(Ipath)itunes\spec.png
,
        $get(Ipath)itunes\spec.png
,PVAR:SET:info1:0,tooltip,Zeige Album,)
,
$imagebutton(413,19,
        $get(Ipath)itunes\spec.png
,
        $get(Ipath)itunes\spec.png
,PVAR:SET:info1:1,tooltip,Zeige Interpret,)
)


,

$imageabs(200,0,$get(Ipath)itunes\apple.png)
)

//Arist & Album

$ifequal($getpvar(Spectrum1),1,
$panel(Spectrum1,Channel spectrum panel,40,9,350,35,)

,
// PerTrack
$font(Lucida Grande,8,bold,0-0-0)
$alignabs(,1,%_width%,%_height%,center,)
//[$padcut(
[%title%]
//,58)]
$alignabs(,15,%_width%,%_height%,center,)
$ifequal($getpvar(info1),1,
[%artist%]
,
[%album% '('%date%')']
)

)

// PerSecond

$if(%isplaying%,

$panel(Seek Panel,Seek Panel,$add($div($sub(%_width%,310),2),20),32,270,8,)

$puts(centerX,$add($div($sub(%_width%,310),2),20))
$drawrect($get(centerX),32,270,8,brushcolor-null pencolor-133-133-133)
$puts(progress,$muldiv(%playback_time_seconds%,270,%length_seconds%))

//Progress
$ifgreater($get(progress),0,
$drawrect($get(centerX),32,$get(progress),8,brushcolor-0-0-0 pencolor-0-0-0 alpha-50)
,)
)
//Time
$alignabs(-150,29,%_width%,%_height%,center,)
$font(Lucida Grande,9,bold,,0-0-0)[%playback_time%]
$alignabs(150,29,%_width%,%_height%,center,)
$font(Lucida Grande,9,bold,,0-0-0)[-%playback_time_remaining%]

the problem is that when i push the left button to display the channel spectrum panel (like in itunes), in the background the seek panel, playback- and remaining time is shown. see it here:

[a href=\"http://imageshack.us\" target=\"_blank\"]

Help for my Track Display

Reply #1
The 4 lines above //Progress are Also part of the progress code. You'll also want to if the stuff after //Time
Code: [Select]
$if($and(%isplaying%,$greater($get(progress),0)),
// all of that progress/time code here
)

 

Help for my Track Display

Reply #2
hey, thx for your reply.

i'm not sure if i understand you right. all what i tried didn t work.
this is one of my tries:

Code: [Select]
// -- background gradient
$imageabs(,,itunes\trackinfo_bg.png,)
// -- left corner image
$imageabs(,,itunes\left_bg.png,)
// -- right corner image
$imageabs($sub(%_width%,9),0,itunes\right_bg.png,)



$if(%isplaying%,

$ifequal($getpvar(Spectrum1),1,
$imagebutton(6,19,
        $get(Ipath)itunes\play.png
,
        $get(Ipath)itunes\play.png
,PVAR:SET:Spectrum1:0,tooltip,Verstecke Channel Spectrum,)
,
$imagebutton(6,19,
        $get(Ipath)itunes\play.png
,
        $get(Ipath)itunes\play.png
,PVAR:SET:Spectrum1:1,tooltip,Zeige Channel Spectrum,)


)

$ifequal($getpvar(info1),1,
$imagebutton(413,19,
        $get(Ipath)itunes\spec.png
,
        $get(Ipath)itunes\spec.png
,PVAR:SET:info1:0,tooltip,Zeige Album,)
,
$imagebutton(413,19,
        $get(Ipath)itunes\spec.png
,
        $get(Ipath)itunes\spec.png
,PVAR:SET:info1:1,tooltip,Zeige Interpret,)
)


,

$imageabs(200,0,$get(Ipath)itunes\apple.png)
)

//Arist & Album

$ifequal($getpvar(Spectrum1),1,
$panel(Spectrum1,Channel spectrum panel,40,9,350,35,)

,
// PerTrack
$font(Lucida Grande,8,bold,0-0-0)
$alignabs(,1,%_width%,%_height%,center,)
//[$padcut(
[%title%]
//,58)]
$alignabs(,15,%_width%,%_height%,center,)
$ifequal($getpvar(info1),1,
[%artist%]
,
[%album% '('%date%')']
)

)


// PerSecond
$if($and(%isplaying%,$greater($get(progress),0)),



//Progress
$ifgreater($get(progress),0,
$drawrect($get(centerX),32,$get(progress),8,brushcolor-0-0-0 pencolor-0-0-0 alpha-50)
,)
)
$panel(Seek Panel,Seek Panel,$add($div($sub(%_width%,310),2),20),32,270,8,)

$puts(centerX,$add($div($sub(%_width%,310),2),20))
$drawrect($get(centerX),32,270,8,brushcolor-null pencolor-133-133-133)
$puts(progress,$muldiv(%playback_time_seconds%,270,%length_seconds%))
//Time
$alignabs(-150,29,%_width%,%_height%,center,)
$font(Lucida Grande,9,bold,,0-0-0)[%playback_time%]
$alignabs(150,29,%_width%,%_height%,center,)
$font(Lucida Grande,9,bold,,0-0-0)[-%playback_time_remaining%]
)

can you explain it again or even post the code?

thank you very much.

Help for my Track Display

Reply #3
Ah sorry I got confused with some of your gets, I'd use this:
Code: [Select]
// -- background gradient
$imageabs(,,itunes\trackinfo_bg.png,)
// -- left corner image
$imageabs(,,itunes\left_bg.png,)
// -- right corner image
$imageabs($sub(%_width%,9),0,itunes\right_bg.png,)

// PerTrack

$if(%isplaying%,

$ifequal($getpvar(Spectrum1),1,
$imagebutton(6,19,
        $get(Ipath)itunes\play.png
,
        $get(Ipath)itunes\play.png
,PVAR:SET:Spectrum1:0,tooltip,Verstecke Channel Spectrum,)
,
$imagebutton(6,19,
        $get(Ipath)itunes\play.png
,
        $get(Ipath)itunes\play.png
,PVAR:SET:Spectrum1:1,tooltip,Zeige Channel Spectrum,)


)

$ifequal($getpvar(info1),1,
$imagebutton(413,19,
        $get(Ipath)itunes\spec.png
,
        $get(Ipath)itunes\spec.png
,PVAR:SET:info1:0,tooltip,Zeige Album,)
,
$imagebutton(413,19,
        $get(Ipath)itunes\spec.png
,
        $get(Ipath)itunes\spec.png
,PVAR:SET:info1:1,tooltip,Zeige Interpret,)
)


,

$imageabs(200,0,$get(Ipath)itunes\apple.png)
)

//Arist & Album

$ifequal($getpvar(Spectrum1),1,
$panel(Spectrum1,Channel spectrum panel,40,9,350,35,)

,

$font(Lucida Grande,8,bold,0-0-0)
$alignabs(,1,%_width%,%_height%,center,)
//[$padcut(
[%title%]
//,58)]
$alignabs(,15,%_width%,%_height%,center,)
$ifequal($getpvar(info1),1,
[%artist%]
,
[%album% '('%date%')']
)

)


// PerSecond
$if($and(%isplaying%,$greater($get(progress),0),$greater(1,$getpvar(Spectrum1))),

//Progress
$puts(centerX,$add($div($sub(%_width%,310),2),20))
$drawrect($get(centerX),32,270,8,brushcolor-null pencolor-133-133-133)
$puts(progress,$muldiv(%playback_time_seconds%,270,%length_seconds%))
$drawrect($get(centerX),32,$get(progress),8,brushcolor-0-0-0 pencolor-0-0-0 alpha-50)
$panel(Seek Panel,Seek Panel,$get(centerX),32,270,8,)

//Time
$alignabs(-150,29,%_width%,%_height%,center,)
$font(Lucida Grande,9,bold,,0-0-0)[%playback_time%]
$alignabs(150,29,%_width%,%_height%,center,)
$font(Lucida Grande,9,bold,,0-0-0)[-%playback_time_remaining%]
)
This will show the progress meter when: $get(progress) is 1, $getpvar(Spectrum1) is 0, and foobar is playing.
But there a often multiple ways to do it.

Help for my Track Display

Reply #4
thx again for your help, but unfortunately, it doesn't work. i tried your code, but now the progress- and time-thing isn't displayed at all.  do you have any ideas?

greets