Quick Sign In:  

Forum: VirtualDJ Skins

Topic: BPM Script

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

Hello everyone. I wanna to create small script. To button "Shift" I want create mapper: if bpm of selected track > 100 - load & goto +64, else load & goto +32. Can you help me ?

getbpm > 100 ? load & goto +64 : load & goto +32 - syntax error
 

Posted Fri 28 Mar 14 @ 12:56 pm
get_bpm only returns a string that can only be used in skin textzones and lcd displays so this is impossible to do.
 

Posted Fri 28 Mar 14 @ 1:17 pm
So, can I get bpm in number format ?
And can I compare returned value with constant ? For example, get time_sec < 10.
 

Posted Fri 28 Mar 14 @ 1:18 pm
no... I have tried it with param_cast "integer|percentage|float" and none of them work by converting the value to a mappable and comparable number. The will change the output of the string to a different format on a skin tough, but it's still just a string.
 

Posted Fri 28 Mar 14 @ 2:56 pm
Dodge57PRO InfinityMember since 2009
I can't try now, but this code don't work ? :

deck 1 get bpm & param_greater 100 ? goto +32
 

Posted Fri 28 Mar 14 @ 7:08 pm
Dodge57PRO InfinityMember since 2009
I try this and it's works :

<button action="deck 1 get bpm & param_cast 'integer' & param_greater 100 ? on : off">
<size width="81" height="22"/>
<pos x="1417" y="2"/>
<selected x="262" y="1469"/>
</button>


from that you can do what you want ;-)
 

Posted Sat 29 Mar 14 @ 12:47 am
Thanks for answers, but I want to get bpm of selected in browser tune, and then if it > 100 load and goto +64, else ( < 100 ) load and goto +32.
 

Posted Sat 29 Mar 14 @ 8:36 am
Dodge57PRO InfinityMember since 2009
????

I do not think you can make a permanent action that will automatically load each song you selected.
However you can add a button on your skin or map a button that checks the bpm of the title you selected :

<button action="get browsed_song 'bpm' & param_cast 'integer' & param_greater 100 ? load & goto +64 : load & goto +32">
<size width="150" height="22"/>
<pos x="1380" y="0"/>
<selected x="262" y="1469"/>
</button>

but I think it will not work with the titles having memorized cue point, cause VDJ will automatically go to start on the cue points.
I also note that if you selected a title that has not been scanned by VDJ, the software bug !

I also don't understand what will serve this function because you can clearly see the bpm in your browser !
You should better put 2 buttons with "load & goto 64" and "load & goto 32"
 

Posted Sat 29 Mar 14 @ 9:23 am
if that script works on skins you could also do this

load & deck select get bpm & param_cast 'integer' & param_greater 100 ? deck select hot_cue 1 ? deck select goto_cue 1 & deck select goto +64 : deck select goto_first_beat & deck select goto +64 : deck select hot_cue 1 ? deck select goto_cue 1 & deck select goto +32 : deck select goto_first_beat & deck select goto +32

the only difference is that it load the track first checks if hot cue 1 exists, if it does it will go to the first cue before moving the required amount of beats.. If hot cue 1 doesn't exist it will go to the first beat and then jump.

I'm not sure why you would want to jump a specific amount when you could just set a cue there and have VDJ go there every time you load the track.
 

Posted Sat 29 Mar 14 @ 11:27 am


(Old topics and forums are automatically closed)