User:Canar

From Hydrogenaudio Knowledgebase
Revision as of 02:55, 8 January 2007 by Canar (talk | contribs)

User:Canar:Titleformat syntax guide

$puts(MODE,8)
//Modes:
//1 - default
//2 - default lowercase
//3 - NFO / mix info
//4 - lite version
//5 - HTML
//6 - Really annoying UPPERCASE
//7 - random export for tabulation
//8 - ubersimple

//intelligent bitrate calculation
$puts(BTRT,$div($mul(%_filesize%,8),%_length_seconds%))
$puts(BTRT,$if2(%__bitrate%kbps,$ifgreater($len($get(BTRT)),4,$div($get(BTRT),1024)kbps,$get(BTRT)bps)))
$puts(BTRT,$ifgreater($get(BTRT),320,,$get(BTRT)))

//replaygain modification
$puts(RG,$left(%__replaygain_track_gain%,$add($strchr(%__replaygain_track_gain%,.),2))dB)

//seperator randomizer
$puts(SEP,$select($add($mod($rand(),6),1),∿∿,⊹,⋆,♪♫,♫,♪))


//main style code=========================================
$puts(DEF,

//title/artist stuff
//-=-=-=-=-=-=-=-=-=-
$if(%title%,
//$get(SEP) 
''%title%'' [by %artist% [feat. %featuring% ]])

$if(%rating%,'('Rating: $select($add(%rating%,1),
Useless,Mediocre,Decent,Good,Excellent,Transcendent)')' )



//album/date/tracknumber stuff
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//check to see that tracknumber's greater than
$if($and(%album%%date%%tracknumber%,$and($greater(%tracknumber%,0),$greater(100,%tracknumber%))),

//core album/date/tracknumber info
$get(SEP) [$if(%album%,%date%:,date:%date%)]
[%album%]
$if($and(%album artist%,$not($stricmp(%album artist%,%artist%))),'('%album artist%')')
[$if(%album%%date%,/)[%disc%.]$num(%tracknumber%,2)] )

//if artist and/or title aren't present, print path info instead
$if($not($and(%artist%,%title%)),$if($stricmp($left(%_path_raw%,7),'http://'),%_path_raw%,$get(SEP) $directory(%_path%)\%_filename_ext% ))

//genre/codec info (assert: will always have codec info?)
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
$get(SEP) 
//[<$meta_sep(genre,/)[ '('%style%')']> ]
$if($info(codec_profile),$info(codec_profile) )$codec()
$if(%__mod_channels%,'('%__mod_channels% chan'nels)')
$if($and($or($and(%_length%,%_filesize%),%__bitrate%),$not($strcmp($get(BTRT),))),@$get(BTRT)
)
$if(%__replaygain_track_gain%,@$get(RG)) 


//status bar (enabled via display > show dynamic info)
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
//$if($and(%_time_elapsed_seconds%,%_time_total_seconds%),$get(SEP)
// $progress(%_time_elapsed_seconds%, %_time_total_seconds%,
// 20,'['%_time_elapsed%']','='))


)

$select($get(MODE),

$get(DEF)

,

/me $lower($get(DEF))

,

$num(%tracknumber%,2). $if(%album artist%,%artist% - )%title%[ feat. %featuring%] {%_length%}

,

''%title%'' by %artist% '('%album%')'

,

<li>%artist% - %title% {%_length%}</li>

,

$upper(['['[%date% .. ]%album% .. #[%disc%].$num(%tracknumber%,2)']'] %artist% [feat. %featuring% ]- %title%) {%_time_elapsed% / %_time_total%}

,

$caps2([%artist%]|[%date%]|[%album%]|[%tracknumber%]|[%totaltracks%]|[%title%]|[%comment%]|[%genre%]|[%copyright%]|[%composer%]|[%www%]|%filename%)

,

%artist% - %title%
)