Sign In:     


Forum: VirtualDJ Skins

Topic: Skin value syntax question

This topic is old and might contain outdated or incorrect information.

Vers 8 Pro User using Hercules Black skin.
Have successfully added the bpm to my skin (scrolling, after song title) by adding "%bpm" after the "%title" line in the xml file.
Trying to add the "song length" to the %artist line because my skin only shows elapsed and remaining.
I'm guessing it would be "format= %artist %?????" to add song length.
Anyone know what the "%" syntax is for song length?
Thanks,
Doug
 

Posted Wed 05 Apr 17 @ 1:11 pm
The backtick/backquote in the skins xml file under format property will run vdj code so:
The following code will separate totaltime minutes and seconds with a colon

format="`get_totaltime_min`:`get_totaltime_sec`"


or like you asked to combine them with a space between the artist and the time
eq. Artist MM:SS


format= "%artist `get_totaltime_min`:`get_totaltime_sec`"


Though I'd probably put brackets around them
eq. Artist [MM:SS]


format= "%artist [`get_totaltime_min`:`get_totaltime_sec`]"


Side note: I personally like to use automix and use code like this to show the next songs title and total time:

format="Next Up: `get_automix_song 'title'` [`get_totaltime_min`:`get_totaltime_sec`]"


and thinking too if Virtual DJ Script could cook hamburgers and deliver them to my booth i'd add the following to my skin

format="`cook and deliver hamburger to my booth`" but hey can't a guy dream

 

Love that burger command! If only!!
Question: The code works ... BUT ... a song, whose 'seconds' are in the range "00" thru "09" - The code drops the leading zero.
Example: A song that is [5:09] in length displays as [5:9]. (no zero).
Do you know how to get the zero back?
Thanks!
 

use the get_loaded_song to get whatever field you want from the track..
format= "%artist `get_loaded_song 'length'`"
 

Well, that works! Now how can I get that burger? :-)
Thanks all!!!
 

 

If it's that easy, I may try to add rating in the scrolling info, too. Don't know if it will want "rating" or "stars" but I'll fiddle with it.
Love the ability to customize this stuff!
:-)
 

Rating will return an integer from 0 to 5
Stars will return... stars! (from none to 5 stars in a sequence)
 

Cool. Thanks. I'll try it!
 

Oooh, that's even funner. (Even though "funner" isn't a word)...
:-)
Thanks.
 



(Old topics and forums are automatically closed)