Quick Sign In:  

Forum: General Discussion

Topic: Waltz bpm- & phrase- and bar counter

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

Hello guys,

we are starting to use virtual DJ as an automixer, beatcounter and as music library in our dance association. We do not mix the song like a DJ, we just play them along according its genre. Well but we are using counters in Virtual DJ for getting bars and phrases to place the perfect choreography in formation dance and couple dance to the music. Now we get into the problem with the 3 to 4 Waltz count. For this I'm checking with the script if the song genre is Waltz, then the beat and phrase counter will be adapted. But I don't have any clue to get the bars in a correct way, because the get_bar funtion only returns the full 4/4 measure. Below is my current skin part for the counters. The last one is the beatcounter, it works, but not the correct way, because it jumps due to 3/4 for adaption. Maybe there is a workaround to count the beats over the whole song and divide them according the measure, but I'm currently not really firm in VDJ-Script with cycles and conditions, so your help is really appreciated.

Do you have any hint how to get the full bars for a 3/4 bar?

<group name="beat_counter_left" x="+1920/2+6-7-4-18-4-36-18" y="6" visibility="deck 1 leftdeck">
<group name="phrase" x="+0" y="+0">
<deck deck="left">
<visual source="param_equal '`deck 1 get_genre`' 'Waltz' ? get_beat_num 12 & param_add 0.0833 : get_beat_counter & param_add 0.0624" type="circle">
<pos x="+0" y="+0"/>
<size width="30" height="30"/>
<off shape="circle" color="#0F0F10"/>
<on shape="circle" color="#00A0E4"/>
</visual>
<visual>
<pos x="+5" y="+5"/>
<size width="20" height="20"/>
<off shape="circle" color="#111111"/>
</visual>
<textzone>
<pos x="+0" y="+0"/>
<size width="30" height="30"/>
<text fontsize="11" color="#FEFEFE" align="center" weight="bold" action="param_equal '`deck 1 get_genre`' 'Waltz' ? get_beat_num 12 & param_multiply 12 & param_add 1 : get_beat_counter"/>
</textzone>
<button action="goto +4" rightclick="goto -4">
<pos x="+0" y="+0"/>
<size width="30" height="30"/>
</button>
</deck>
</group>
</group>
<group name="phrase_counter_left" x="+1920/2+6-7-4-18-4-36-36-18" y="6" visibility="deck 1 leftdeck">
<group name="phrase" x="+0" y="+0">
<deck deck="left">
<visual source="param_equal '`deck 1 get_genre`' 'Waltz' ? get_beat_num 12 & param_multiply 12 & param_multiply 0.3333333 & param_add 0.666667 & param_cast 'integer' & param_multiply 0.24999 : get_phrase_num & param_multiply 0.2499" type="circle">
<pos x="+0" y="+0"/>
<size width="30" height="30"/>
<off shape="circle" color="#0F0F10"/>
<on shape="circle" color="#72A7AC"/>
</visual>
<visual>
<pos x="+5" y="+5"/>
<size width="20" height="20"/>
<off shape="circle" color="#111111"/>
</visual>
<textzone>
<pos x="+0" y="+0"/>
<size width="30" height="30"/>
<text fontsize="11" color="#FEFEFE" align="center" weight="bold" action="param_equal '`deck 1 get_genre`' 'Waltz' ? get_beat_num 12 & param_multiply 12 & param_multiply 0.3333333 & param_add 0.666667 & param_cast 'integer' : get_phrase_num"/>
</textzone>
</deck>
</group>
</group>
<group name="bars_counter_left" x="+1920/2+6-7-4-18-4-36-36-18-60" y="10" visibility="deck 1 leftdeck">
<group name="phrase" x="+0" y="+0">
<deck deck="left">
<visual visibility="0.4">
<pos x="+0" y="+0" />
<size width="120" height="20"/>
<off color="darker" shape="square" />
</visual>
<textzone visibility="loaded">
<pos x="+0" y="+0"/>
<size width="120-20" height="20"/>
<text fontsize="12" weight="" color="white" align="left" action="param_equal '`deck 1 get_genre`' 'Waltz' ? get_bar & param_multiply 4 & param_multiply 0.3333333 & param_add -0.33333 & param_cast 'integer' : get_bar"/>
</textzone>
</deck>
</group>
</group>

Thanks for your help, Tobias
 

Posted Fri 30 Oct 20 @ 8:24 am
You can use get_beatpos to get the actual beat number of the song, and then do your maths.
Mind that it also returns negative values as well if the track position is BEFORE the downbeat.

So, something like this:
get_beatpos & param_multiply 0.333 & param_add 0.5 & param_cast integer
should return the number of bars for anything that's using X/3 time signature
 

Posted Sat 31 Oct 20 @ 5:51 pm
Thanks that helps a lot! ;o)
 

Posted Tue 03 Nov 20 @ 8:57 am


(Old topics and forums are automatically closed)