I've got a little problem with the config that I use:
// Original code by necropimp, modified by AstreaEdge, KockRoach, Brumal
// modded by Anish
// Toggles (0=disable, 1=enable)
$puts(show_now_playing,1)
$puts(show_tech_info,1)
$puts(cut_width,39)
// Disable comments on slower machines, disable by not entering any value for show comment
$puts(show_comment,1)
// Warning: Large max_comment_length can result in high CPU usage
// for large comments. Use -1 to disable cropping
$puts(max_comment_length,1000)
$puts(uncompressed_bitrate,$muldiv(%samplerate%,$mul(%__channels%,$if2(%__bitspersample%,16)),1000))
// Color Config
// 1 - Soundtrack to Your Escape background: 16,40,46
// 2 - Reroute to Remain background: 229,232,231
// 3 - Sandman2012 background: 255,255,255
// 4 - Draconian Times background: 129,52,65
// 5 - Since the Day It All Came Down background: 246,248,245
// 6 - Tales from the Thousand Lakes background: 35,22,89
// 7 - Projector background: 0,0,0
// 8 - The Astral Sleep background: 134,107,76
// 9 - Verisäkeet background: 64,76,61
// 10 - Haunted background: 0,0,16
// 11 - Ghost Reveries background: 29,20,15
// 12 - Rain Without End background: 34,27,67
// 13 - Arte Novecento background: 240,240,240
// 14 - Ghosts of Loss background: 87,111,117
// 15 - The Truth Inside the Shades background: 16,20,23
// 16 - 00 Void background: 167,167,177
// 17 - Antimatter background: 0,0,0
// 18 - Frail Words Collapse background: 202,184,122
// 19 - Am Universum background: 204,201,124
// 20 - Character background: 228,226,227
// 21 - From Mars to Sirius background: 239,233,221
// 22 - Voice of Wilderness background: 169,169,159
// 99 - Custom config
$puts(color_config,17)
// Custom color scheme
$puts(cc_text1,$rgb(70,07,16))
$puts(cc_text2,$rgb(10,10,10))
$puts(cc_section_title,$rgb(245,245,245))
$puts(cc_fade_inside,$rgb(245,245,245))
$puts(cc_fade_outside,$rgb(0,0,0))
// color schemes
$if($strcmp($get(color_config),99),
// User defined scheme
$puts(info,$get(cc_text1))
$puts(head,$get(cc_text2))
$puts(anno,$get(cc_text1))
$puts(text2,$get(cc_section_title))
$puts(text1,$get(cc_fade_inside))
$puts(fadeend,$get(cc_fade_outside))
,
$select($get(color_config),
// Soundtrack to Your Escape
$puts(head,$rgb(170,170,170))
$puts(info,$rgb(170,207,216))
$puts(anno,$rgb(98,114,121))
$puts(text1,$rgb(170,207,216))
$puts(text2,$rgb(255,250,216))
$puts(fadeend,$rgb(0,0,0)),
// Reroute to Remain
$puts(head,$rgb(0,0,0))
$puts(info,$rgb(100,106,102))
$puts(anno,$rgb(100,106,102))
$puts(text1,$rgb(179,181,180))
$puts(text2,$rgb(123,40,48))
$puts(fadeend,$rgb(0,0,0)),
// Sandman2012
$puts(head,$rgb(0,128,192))
$puts(info,$rgb(130,130,130))
$puts(anno,$rgb(100,106,102))
$puts(text1,$rgb(235,242,254))
$puts(text2,$rgb(0,128,64))
$puts(fadeend,$rgb(0,0,0)),
// Draconian Times
$puts(head,$rgb(201,193,146))
$puts(info,$rgb(217,219,206))
$puts(anno,$rgb(217,219,206))
$puts(text1,$rgb(157,51,67))
$puts(text2,$rgb(178,196,200))
$puts(fadeend,$rgb(176,107,68)),
// Since the Day It All Came Down
$puts(head,$rgb(3,46,41))
$puts(info,$rgb(104,104,94))
$puts(anno,$rgb(104,104,94))
$puts(text1,$rgb(76,107,106))
$puts(text2,$rgb(50,85,91))
$puts(fadeend,$rgb(0,0,0)),
// Tales from the Thousand Lakes
$puts(head,$rgb(98,167,162))
$puts(info,$rgb(203,203,210))
$puts(anno,$rgb(203,203,210))
$puts(text1,$rgb(78,112,173))
$puts(text2,$rgb(143,201,234))
$puts(fadeend,$rgb(62,67,171)),
// Projector
$puts(head,$rgb(227,122,76))
$puts(info,$rgb(170,134,98))
$puts(anno,$rgb(170,134,98))
$puts(text1,$rgb(132,55,40))
$puts(text2,$rgb(248,214,134))
$puts(fadeend,$rgb(0,0,0)),
// The Astral Sleep
$puts(head,$rgb(67,45,32))
$puts(info,$rgb(208,204,199))
$puts(anno,$rgb(208,204,199))
$puts(text1,$rgb(103,75,51))
$puts(text2,$rgb(214,200,168))
$puts(fadeend,$rgb(0,0,0)),
// Verisäkeet
$puts(head,$rgb(160,146,117))
$puts(info,$rgb(208,194,165))
$puts(anno,$rgb(208,194,165))
$puts(text1,$rgb(113,52,47))
$puts(text2,$rgb(244,244,244))
$puts(fadeend,$rgb(0,0,0)),
// Haunted
$puts(head,$rgb(119,119,136))
$puts(info,$rgb(160,176,184))
$puts(anno,$rgb(208,194,165))
$puts(text1,$rgb(216,88,16))
$puts(text2,$rgb(228,228,232))
$puts(fadeend,$rgb(0,0,0)),
// Ghost Reveries
$puts(head,$rgb(145,113,54))
$puts(info,$rgb(238,219,135))
$puts(anno,$rgb(162,144,88))
$puts(text1,$rgb(172,148,76))
$puts(text2,$rgb(241,238,205))
$puts(fadeend,$rgb(35,27,16)),
// Rain Without End
$puts(head,$rgb(83,119,171))
$puts(info,$rgb(204,204,204))
$puts(anno,$rgb(194,194,194))
$puts(text1,$rgb(70,102,149))
$puts(text2,$rgb(244,244,244))
$puts(fadeend,$rgb(0,0,0)),
// Arte Novecento
$puts(head,$rgb(122,116,128))
$puts(info,$rgb(115,106,111))
$puts(anno,$rgb(115,106,111))
$puts(text1,$rgb(106,100,128))
$puts(text2,$rgb(130,139,148))
$puts(fadeend,$rgb(122,116,128)),
// Ghosts of Loss
$puts(head,$rgb(151,174,180))
$puts(info,$rgb(197,207,216))
$puts(anno,$rgb(197,207,216))
$puts(text1,$rgb(93,116,122))
$puts(text2,$rgb(237,233,228))
$puts(fadeend,$rgb(0,0,0)),
// The Truth Inside the Shades
$puts(head,$rgb(191,195,168))
$puts(info,$rgb(246,242,155))
$puts(anno,$rgb(246,242,155))
$puts(text1,$rgb(244,163,107))
$puts(text2,$rgb(251,251,251))
$puts(fadeend,$rgb(0,0,0)),
// 00 Void
$puts(head,$rgb(55,54,72))
$puts(info,$rgb(0,0,0))
$puts(anno,$rgb(0,0,0))
$puts(text1,$rgb(145,68,63))
$puts(text2,$rgb(244,241,234))
$puts(fadeend,$rgb(0,0,0)),
// Antimatter
$puts(head,$rgb(107,111,122))
$puts(info,$rgb(204,204,204))
$puts(anno,$rgb(184,184,184))
$puts(text1,$rgb(206,158,66))
$puts(text2,$rgb(204,204,204))
$puts(fadeend,$rgb(0,0,0)),
// Frail Words Collapse
$puts(head,$rgb(77,40,22))
$puts(info,$rgb(0,0,0))
$puts(anno,$rgb(0,0,0))
$puts(text1,$rgb(187,155,103))
$puts(text2,$rgb(128,83,62))
$puts(fadeend,$rgb(0,0,0)),
// Am Universum
$puts(head,$rgb(122,100,40))
$puts(info,$rgb(0,0,0))
$puts(anno,$rgb(0,0,0))
$puts(text1,$rgb(122,100,40))
$puts(text2,$rgb(107,70,13))
$puts(fadeend,$rgb(235,229,143)),
// Character
$puts(head,$rgb(98,100,97))
$puts(info,$rgb(0,0,0))
$puts(anno,$rgb(0,0,0))
$puts(text1,$rgb(160,66,35))
$puts(text2,$rgb(115,39,23))
$puts(fadeend,$rgb(221,162,88)),
// From Mars to Sirius
$puts(head,$rgb(159,143,127))
$puts(info,$rgb(0,0,0))
$puts(anno,$rgb(0,0,0))
$puts(text1,$rgb(159,143,127))
$puts(text2,$rgb(111,89,66))
$puts(fadeend,$rgb(0,0,0)),
// Voice of Wilderness
$puts(head,$rgb(0,0,4))
$puts(info,$rgb(77,75,63))
$puts(anno,$rgb(77,75,63))
$puts(text1,$rgb(0,0,0))
$puts(text2,$rgb(89,87,71))
$puts(fadeend,$rgb(199,197,181)),
))
// Progress Bar Divider Width (0 yeilds no divider)
$puts(divw,16)
// Progress Bar Divider Character (blank yields no divider)
$puts(divc,)
// Separator
$puts(sepc,–)
$puts(sepw2,$calcwidth($get(sepc)$get(sepc)))
$puts(sep1,$if(%_isplaying%, NOW PLAYING , SELECTED TRACK ))
$puts(sep2, TECH INFO )
$puts(sep3, COMMENT )
$align(center, top)$font(,,shadow,)
$if(%_trackinfo_notrack%,
$align(left,bottom)$font(Uni 05_53,6,shadow,200-200-200)v0.9.4.3
$align(right,bottom)$font(Impact,25,shadow,102-102-85)2000
$align(right,bottom)$font(Candara,14,bold italic shadow,200-200-200)$repeat($char(10),5)foobar$repeat( ,13),
// SONG INFO SEPARATOR
$puts(sepw,$repeat($get(sepc),$sub($div($sub(%_width%,$calcwidth($get(sep1))),$get(sepw2)),1)))
$transition($get(sepw),$get(fadeend),$get(text1))
$get(text2)$get(sep1)
$transition($get(sepw),$get(text1),$get(fadeend))
$char(10)
$if(%title%,$ifgreater($get(cut_width),$len(%title%),,)$get(head)$get(info)%title%$ifgreater($get(cut_width),$len(%title%), ,)$char(10),)
$if(%artist%,$get(head)by$char(10)$ifgreater($get(cut_width),$len(%artist%),,)$get(info)%artist%$ifgreater($get(cut_width),$len(%artist%), ,)$char(10),)
$ifgreater($meta_num(performer),0,$get(info)%performer%$char(10),
$if(%album%,$get(head)track #$get(info)%tracknumber% $get(head)from$char(10)$ifgreater($get(cut_width),$len(%album%),,)$get(info)%album%$ifgreater($get(cut_width),$len(%album%), ,)$if2(%discname%,$get(head)Disc $get(info)%discnumber%)$char(10),)
$if(%genre%,$get(head)$if($strcmp($replace($upper($left(%genre%,1)),A,{},E,{},I,{},O,{}),{}),an,a) $get(info)%genre%$if($or($strcmp(%genre%,Soundtrack),$strcmp(%genre%,Audiobook)),, $get(head)$if(%album%,album,song))$char(10),)
$if(%style%,$get(head)in the style of$char(10)$ifgreater($get(cut_width),$len(%style%),,)$get(info)%style%$ifgreater($get(cut_width),$len(%style%), ,)$char(10),)
$if(%date%,$get(head)released in $get(info)%date%$char(10),))
// TECH INFO SEPARATOR
$puts(sepw,$repeat($get(sepc),$sub($div($sub(%_width%,$calcwidth($get(sep2))),$get(sepw2)),1)))
$transition($get(sepw),$get(fadeend),$get(text1))
$get(text2)$get(sep2)
$transition($get(sepw),$get(text1),$get(fadeend))
$char(10)
// set 4-character filetype
$puts(filetype,$upper(
$if(%__referenced_file%,$cut($ext(%__referenced_file%),4),
$if($stricmp($left(%_path%,4),cdda),CD,$cut($ext(%_path%),4)
))
))
// detect detailed filetype2
$puts(filetype2,$replace($get(filetype),
WAV,[%codec% ]WAVE,
SND,'Next/Sun',
AC3,Dolby Digital,
CD,Audio CD,
MKA,Matroska[ %codec%][ %codec_profile%],
OGG,Ogg[ %codec%][ $get(head)$replace($info(bitrate_nominal),32,Q-2,48,Q-1,64,Q0,80,Q1,96,Q2,112,Q3,128,Q4,160,Q5,192,Q6,224,Q7,256,Q8,320,Q9,500,Q10)],
MP4,MPEG-4[ %codec%][ %codec_profile%],
M4A,MPEG-4[ %codec%][ %codec_profile%],
MP2,MPEG Layer 2,
MP3,[%codec%][ %codec_profile%],
AAC,AAC[ %codec_profile%],
WMA,Window'$' Media Audio,
MPC,Musepack $if(%codec_profile%,$get(head)MPC Profile: $get(info)%codec_profile%),
OFR,OptimFROG,
OFS,OptimFROG DS,
FLA,FLAC,
APE,Monkey''s Audio[ %codec_profile%],
MAC,Monkey''s Audio[ %codec_profile%],
APL,Monkey''s Audio[ %codec_profile%],
WV,WavPack[ %codec_profile%],
SHN,Shorten,
SPX,Speex,
SID,C64 SID-Tune,
MDZ,Soundtracker Module,
S3Z,Screamtracker Module,
ITZ,Impulsetracker Module,
XMZ,Fasttracker II Module,
MO3,Compressed Module,
MOD,Soundtracker Module,
S3M,Screamtracker Module,
XM,Fasttracker II Module,
IT,Impulsetracker Module,
UMX,Unreal Music File,
MTM,Multitracker Module,
TFM,Final Musicsystem
))
$puts(filetype2,$replace($get(filetype2),FLACC,FLAC[ %codec_profile%]))
$get(head)$get(info)[%_time_elapsed%][$if(%_time_elapsed%, $get(head)/$get(info) )%length%]$get(head) @ $get(info)
%__bitrate% $get(head)kb/s $get(info)$get(filetype2)$char(10)
$if(%__samplerate%,$get(head)$get(info)$div(%__samplerate%,1000).$substr(%__samplerate%,3,3) kHz )
$get(head)$get(info)$if($stricmp($codec(),MP3),$get(space2)$caps(%__mp3_stereo_mode%),[$caps(%channels%)])$char(10)
$if(%__bitspersample%,$get(head)Bitdepth: $get(info)%__bitspersample%$char(10),)
$if(%_filesize%,$get(head)$get(info)
$puts(f_size,$add($ifequal(%subsong%,0,$div(%filesize%,1024),$muldiv($info(bitrate),%length_seconds%,8)),5))
$div($get(f_size),1024).$left($right($num($muldiv($get(f_size),1000,1024),4),3),2)$get(head)'MB',)
$get(head) ~ $get(info)$substr($put(ratio,$muldiv($get(uncompressed_bitrate),100,$info(bitrate))),1,$sub($len($get(ratio)),2))
.$substr($get(ratio),$sub($len($get(ratio)),1),$len($get(ratio))):1 $get(head)'('$muldiv($info(bitrate),100,$get(uncompressed_bitrate))$get(head)'%)'$char(10)
// COMMENT INFO SEPARATOR
$if($and(%comment%,$strcmp($get(show_comment),1)),
$puts(sepw,$repeat($get(sepc),$sub($div($sub(%_width%,$calcwidth($get(sep3))),$get(sepw2)),1)))
$transition($get(sepw),$get(fadeend),$get(text1))
$get(text2)$get(sep3)
$transition($get(sepw),$get(text1),$get(fadeend))
$char(10)
$rgb(204,204,204)
$ifgreater($calcwidth(%comment%),%_width%,$alignset()$alignrel(left,),)
$ifgreater($len(%comment%),$get(max_comment_length),$cut(%comment%,$get(max_comment_length))'...',%comment%)
))
The problem is when I put // PerSecond at the beginning of the code so the %_time_elapsed% would update. It simply uses to much CPU. Is there a way to put the // PerSecond somewhere inside the // TECH INFO SEPARATOR? Then the script would only update per second the part that is needed and the CPU usage would drop (i think).