MrEnergizer
Oct 9 2006, 17:54
thax russell777 for quick reply..... its nearly 1am here and Iv tried for nearly an hour to get this right and its driving me mad. I am no good at coding plus Im very tired so please show me where to put it ( I will post my code)
TIA
Mr E
///Zetto's main Trackinfo-Mod window (thx to Russell777,
///for i have used pieces of his "Home Stereo Display" code -> GREAT WORK !)///
///my Page: www.szemke.de///
///dynamics///
$puts(fontColorInactive,$rgb(40,130,130))
$puts(fontColorActive,$rgb(0,255,255))
$puts(alt_font,georgia)
$puts(alt_font_size,9)
$puts(alt_font_options,italic)
$puts(alt_font_fix,-1)
$puts(symbolinfo,1)
$puts(scrollback,1)
$puts(windowAlbum,18)
$puts(windowTitle,60)
///bgImage///
$if(%isplaying%,$puts(tiPlayingNum,$add($mod(%_time_elapsed_seconds%,30),1))
$puts(count_path,myLayoutPics\tiPlaying$get(tiPlayingNum).png)
$imageabs(0,0,$get(count_path),),$imageabs(0,0,myLayoutPics\tiStopped.png,))
///in-/active colors///
$puts(fontColorAI,$get(fontColorInactive))
$if(%isplaying%,$puts(fontColorAI,$get(fontColorActive)))
///codec///
$alignabs(118,44,%_width%,%_height%,center,top)
$font(lcdmono2,10,,)
$get(fontColorAI)[%codec%]
///bitrate///
$alignabs(367,44,%_width%,%_height%,left,top)
$font(lcdmono2,10,,)
$get(fontColorAI)
$if($stricmp($codec(),mp3),
$if($stricmp(%__extrainfo%,VBR),VBR,CBR),)
$char(32)['/' %__bitrate_dynamic%'kb']
///channels///
$alignabs(-78,64,%_width%,%_height%,right,top)
$font(lcdmono2,10,,)
$get(fontColorAI)
$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,Stereo,Mono)),)$char(10)
///samplerate///
$alignabs(-13,64,%_width%,%_height%,right,top)
$font(lcdmono2,10,,)
$get(fontColorAI)[%__samplerate% 'Hz']
///Riddim///
$alignabs(310,92,%_width%,%_height%,left,top)
$font(lcdmono2,10,,)
$get(fontColorAI)[Riddim * %riddim%]
///Label///
$alignabs(310,112,%_width%,%_height%,left,top)
$font(lcdmono2,10,,)
$get(fontColorAI)[Label * %label%]
///date///
$alignabs(15,44,%_width%,%_height%,left,top)
$font(lcdmono2,10,,)
$get(fontColorAI)[%date%]
///genre///
$alignabs(62,44,%_width%,%_height%,left,top)
$font(lcdmono2,10,,)
$get(fontColorAI)[%genre%]
///album///
$alignabs(16,$add($div(%_height%,5),-57),%_width%,%_height%,left,middle)
$puts(title,
[%album%])
$if($get(symbolinfo),
$if($or($stricmp($substr($ascii($get(title)),2,2),?),
$stricmp($substr($ascii($get(title)),6,6),?)),$char(10)
$alignabs(21,$add($div(%_height%,5),55,$get(alt_font_fix)),%_width%,%_height%,,)
$font($get(alt_font),$get(alt_font_size),$get(alt_font_options)$get(font_options)
,250-250-250)$repeat($char(10),31),
$puts(title,
$lower($replace($upper($get(title)),-,$char(8208),&,+,À,a,Á,a,Â,a,Ã,a,Ä,ae,Å,a,
Æ,ae,Ç,c,È,e,É,e,Ê,e,Ë,e,Ì,i,Í,i,Î,i,Ï,i,Ò,o,Ó,o,Ô,o,Õ,o,Ö,oe,Ù,u,Ú,u,Û,u,Ü,ue,
ß,ss)))
$puts(alt_font_fix,0)
$font(lcdmono2,10,bold$get(font_options),250-250-250)$repeat($char(10),35)),
$alignabs(21,$add($div(%_height%,5),55,$get(alt_font_fix)),%_width%,%_height%,,)
$font($get(alt_font),$get(alt_font_size),$get(alt_font_options)
$get(font_options),250-250-250)$repeat($char(10),32))$get(fontColorAI)
$if($greater($len($get(title)),$get(windowAlbum)),
$if($stricmp($mod($len($get(title)),0),0),
$puts(title,$pad($get(title),$add($len($get(title)),1))),)
$puts(shift,$sub($len($get(title)),$get(windowAlbum)))
$if($get(scrollback),
$puts(mod,$mod(%_time_elapsed_seconds%,$add($mul($get(shift),2),2)))
$if($greater(3,$get(mod)),$substr($get(title),1,$get(windowAlbum)),
$puts(mod,$sub($get(mod),2))$puts(flag,$get(mod))
$if($greater($add($get(shift),1),$get(mod)),
$substr($get(title),$add(1,$get(mod)),$add($get(windowAlbum),$get(mod))),
$substr($get(title),$sub($mul($get(shift),2),$get(mod),-1),
$add($get(windowAlbum),$sub($mul($get(shift),2),$get(mod),0))))),
$puts(mod,$mod(%_time_elapsed_seconds%,$add($get(shift),2)))
$if($greater(3,$get(mod)),$substr($get(title),1,$get(windowAlbum)),
$puts(mod,$sub($get(mod),2))$puts(flag,$get(mod))
$substr($get(title),$add(1,$get(mod)),$add($get(windowAlbum),$get(mod))))),
$alignabs(15,$add($div(%_height%,5),27,$get(alt_font_fix)),404,%_height%,left,top)
$get(fontColorAI)$get(title))
///time & tracknumber///
$alignabs(15,89,%_width%,%_height%,left,top)
$font(7 Segment,20,,)
$get(fontColorInactive)'88'
$alignabs(15,89,%_width%,%_height%,left,top)
$font(7 Segment,20,,)
$get(fontColorAI)[%tracknumber%]
$alignabs(-338,89,%_width%,%_height%,right,top)
$font(7 Segment,20,,)
$get(fontColorInactive)'88:88'
$alignabs(-338,89,%_width%,%_height%,right,top)
$font(7 Segment,20,,)
$get(fontColorAI)[%playback_time%]
$alignabs(-300,90,%_width%,%_height%,right,top)
$font(7 Segment,10,,)
$get(fontColorInactive)'88:88'
$alignabs(-300,90,%_width%,%_height%,right,top)
$font(7 Segment,10,,)
$get(fontColorAI)[%length%]
///progressbar///
$if(%isplaying%,$if3($strcmp(%playback_time_seconds%,0)
,,$drawrect(14,121,$muldiv(%playback_time_seconds%,$sub(%_width%,314),%length_seconds%),3,
pencolor-0-255-255 brushcolor-0-255-255 width-1)
,))
///title///
$alignabs(0,$add($div(%_height%,5),34),%_width%,%_height%,center,middle)
$puts(title,
[%artist%][ '-' "%title%"])
$if($get(symbolinfo),
$if($or($stricmp($substr($ascii($get(title)),2,2),?),
$stricmp($substr($ascii($get(title)),6,6),?)),$char(10)
$alignabs(21,$add($div(%_height%,5),55,$get(alt_font_fix)),%_width%,%_height%,,)
$font($get(alt_font),$get(alt_font_size),$get(alt_font_options)$get(font_options)
,250-250-250)$repeat($char(10),31),
$puts(title,
$lower($replace($upper($get(title)),-,$char(8208),&,+,À,a,Á,a,Â,a,Ã,a,Ä,ae,Å,a,
Æ,ae,Ç,c,È,e,É,e,Ê,e,Ë,e,Ì,i,Í,i,Î,i,Ï,i,Ò,o,Ó,o,Ô,o,Õ,o,Ö,oe,Ù,u,Ú,u,Û,u,Ü,ue,
ß,ss)))
$puts(alt_font_fix,0)
$font(lcdmono2,11,bold$get(font_options),250-250-250)$repeat($char(10),35)),
$alignabs(21,$add($div(%_height%,5),55,$get(alt_font_fix)),%_width%,%_height%,,)
$font($get(alt_font),$get(alt_font_size),$get(alt_font_options)
$get(font_options),250-250-250)$repeat($char(10),32))$get(fontColorAI)
$if($greater($len($get(title)),$get(windowTitle)),
$if($stricmp($mod($len($get(title)),2),1),
$puts(title,$pad($get(title),$add($len($get(title)),1))),)
$puts(shift,$sub($len($get(title)),$get(windowTitle)))
$if($get(scrollback),
$puts(mod,$mod(%_time_elapsed_seconds%,$add($mul($get(shift),2),2)))
$if($greater(3,$get(mod)),$substr($get(title),1,$get(windowTitle)),
$puts(mod,$sub($get(mod),2))$puts(flag,$get(mod))
$if($greater($add($get(shift),1),$get(mod)),
$substr($get(title),$add(1,$get(mod)),$add($get(windowTitle),$get(mod))),
$substr($get(title),$sub($mul($get(shift),2),$get(mod),-1),
$add($get(windowTitle),$sub($mul($get(shift),2),$get(mod),0))))),
$puts(mod,$mod(%_time_elapsed_seconds%,$add($get(shift),2)))
$if($greater(3,$get(mod)),$substr($get(title),1,$get(windowTitle)),
$puts(mod,$sub($get(mod),2))$puts(flag,$get(mod))
$substr($get(title),$add(1,$get(mod)),$add($get(windowTitle),$get(mod))))),
$alignabs(0,-15,%_width%,%_height%,center,bottom)
$get(fontColorAI)$get(title))
///transpFgImage///
$imageabs(0,0,myLayoutPics\tiGlasses.png,)
LXtreme
Oct 21 2006, 17:23
first thanx for your FANTASTIC work,
Russell777me was very happy bout the sdk, espacially!
and your latest screens are really awesome...
just a suggestion:
i personally do not like the "scrolling" in the track-info, so i mixed your idea of "swapping" Bitrate, Samplerate & Compression with your TI-Code. As i just need %artist% and %title% in the TI, it is not as complex as your code. but maybe you like the idea.:
instead of scrolling the text when it is longer than the needed space it alternates between %artist% and %title%. this
"swapping" can be turned on and of in the global options.
another idea is to use "swapping" and "scrolling" together: if a "swapped" part of the TI is too long it will be scrolled.... (but as i do nit like scrolling i just $cut the part wich is too long):
in order to visualize what i mean you have to find tracks with long tags or you just reduce "window" and windowsize" in the globals:
CODE
/////////////////////////////////////////Globals///////////////////////////////////////////////////
$puts(active,$rgb(0,0,147))
$puts(back,$rgb(225,225,225))
$puts(font_options,)
$puts(display_back,)
$puts(full,250-250-250)
$puts(frame,150-150-150)
$puts(symbolinfo,1)
$puts(Trackinfo_font_size,20)
$puts(alt_font,Arial)
$puts(alt_font_size,10)
$puts(alt_font_options,)
$puts(alt_font_fix,)
$puts(window,42)
$puts(windowsize,648)
$puts(scrollback,1)
$puts(swapping,1)
// Track-Info Allignment//
$puts(TI-x-allign,52)
$puts(TI-y-allign,9)
//////////////////////////////////////Boxes//////////////////////////////////////////
//1-Track-Info
$drawrect($sub($get(TI-x-allign),8),$sub($get(TI-y-allign),3),$add($get(windowsize),5),$add($get(Trackinfo_font_size),10),brushcolor-$get(full) pencolor-$get(frame))
////////////////////////////////////////1 Track info (swapping & scrolling))///////////////////////////////////////////////
$alignabs($get(TI-x-allign),$get(TI-y-allign),%_width%,%_height%,,)
$puts(title,[%artist% - ]['"'%title%'"'])
$puts(title_a,%artist%)
$puts(title_b,%title%)
$if($get(symbolinfo),$if($or($stricmp($substr($ascii($get(title)),2,2),?),
$stricmp($substr($ascii($get(title)),6,6),?)),$char(10)
$alignabs($get(TI-x-allign),$add(10,$get(alt_font_fix)),%_width%,%_height%,,)
$font($get(alt_font),$get(alt_font_size),$get(alt_font_options)$get(font_options)
,250-250-250)$repeat($char(10),31),
$puts(title,$lower($replace($upper($get(title)),-,$char(8208),&,+,À,a,Á,a,Â,a,Ã,a,Ä,ae,Å,a,
Æ,ae,Ç,c,È,e,É,e,Ê,e,Ë,e,Ì,i,Í,i,Î,i,Ï,i,Ò,o,Ó,o,Ô,o,Õ,o,Ö,oe,Ù,u,Ú,u,Û,u,Ü,ue,
ß,ss,#,No.)))
$puts(title_a,$lower($replace($upper($get(title_a)),-,$char(8208),&,+,À,a,Á,a,Â,a,Ã,a,Ä,ae,Å,a,
Æ,ae,Ç,c,È,e,É,e,Ê,e,Ë,e,Ì,i,Í,i,Î,i,Ï,i,Ò,o,Ó,o,Ô,o,Õ,o,Ö,oe,Ù,u,Ú,u,Û,u,Ü,ue,
ß,ss,#,No.)))
$puts(title_b,$lower($replace($upper($get(title_b)),-,$char(8208),&,+,À,a,Á,a,Â,a,Ã,a,Ä,ae,Å,a,
Æ,ae,Ç,c,È,e,É,e,Ê,e,Ë,e,Ì,i,Í,i,Î,i,Ï,i,Ò,o,Ó,o,Ô,o,Õ,o,Ö,oe,Ù,u,Ú,u,Û,u,Ü,ue,
ß,ss,#,No.)))
$puts(alt_font_fix,0)
$font(lcdmono2,$get(Trackinfo_font_size),bold$get(font_options),250-250-250)$repeat($char(10),35)),
$alignabs($get(TI-x-allign),$add($get(TI-y-allign),$get(alt_font_fix)),%_width%,%_height%,,)
$font($get(alt_font),$get(alt_font_size),$get(alt_font_options)
$get(font_options),250-250-250)$repeat($char(10),32))$get(active)
$if($greater($len($get(title)),$get(window))
,
$ifequal($get(swapping),1,
$ifgreater($mod(%_time_elapsed_seconds%,6),2,
$alignabs($get(TI-x-allign),$add($get(TI-y-allign),$get(alt_font_fix)),$get(windowsize),%_height%,center,top)$get(active)
$if($greater($len($get(title_b)),$get(window)),
'"'$cut($get(title_b),$sub($get(window),5))...'"',
'"'$get(title_b)'"')
,
$alignabs($get(TI-x-allign),$add($get(TI-y-allign),$get(alt_font_fix)),$get(windowsize),%_height%,center,top)$get(active)
$if($greater($len($get(title_a)),$get(window)),
'"'$cut($get(title_a),$sub($get(window),5))...'"',
'"'$get(title_a)'"'))
,
$if($stricmp($mod($len($get(title)),2),1),
$puts(title,$pad($get(title),$add($len($get(title)),1))),)
$puts(shift,$sub($len($get(title)),$get(window)))
$if($get(scrollback),
$puts(mod,$mod(%_time_elapsed_seconds%,$add($mul($get(shift),2),2)))
$if($greater(3,$get(mod)),$substr($get(title),1,$get(window)),
$puts(mod,$sub($get(mod),2))$puts(flag,$get(mod))
$if($greater($add($get(shift),1),$get(mod)),
$substr($get(title),$add(1,$get(mod)),$add($get(window),$get(mod))),
$substr($get(title),$sub($mul($get(shift),2),$get(mod),-1),
$add($get(window),$sub($mul($get(shift),2),$get(mod),0))))),
$puts(mod,$mod(%_time_elapsed_seconds%,$add($get(shift),2)))
$if($greater(3,$get(mod)),$substr($get(title),1,$get(window)),
$puts(mod,$sub($get(mod),2))$puts(flag,$get(mod))
$substr($get(title),$add(1,$get(mod)),$add($get(window),$get(mod)))))
)
,
$alignabs($get(TI-x-allign),$add($get(TI-y-allign),$get(alt_font_fix)),$get(windowsize),%_height%,center,top)$get(active)$get(title))
EDIT: not willing to edit all those typos

EDIT (2006-10-23):
fixed - code did not support symbolinfo-casefixes in swapping mode
fixed - swapping did not work with symbolinfo off
boxed the code