Sign In:     


Forum: VirtualDJ Skins

Topic: Beat Countdown between Cues
Hi everyone,

I'm looking for a script to display the number of beats between cues in the JogWheel area (possibly replacing the time remaining/elapsed info). I have managed to get a value displayed for a custom button using `get_beatpos` but that only outputs the number of beats from the first cue point. I also tried using cue_pos but this only seemed to work if the cues were hotcues. I need the value to update based on the cues either side of the song position and output the number of beats between the previous and next cue, regardless of the cue type (I'm using hotcues and markers) - ideally in bars format, i.e. 17.1. Can anyone help please 🙏

Many Thanks,
Adam
 

Posted 17 hours ago
cue_countdown the rest is formatting.
 

Ez LocoDog,

Hope you are well...

Ok, I've tested that in a custom button and it's showing beats counting down (can this be changed to 1 decimal place rather than 2 decimal places?). Also, it only works between hotcues not markers? As for formatting, I don't have a clue how to do that stuff lol.

Any help would be amazing.

Thanks, Adam
 

You're right about cue_countdown missing markers

Something like this works until there isn't another cue/marker, I could probably figure that out.
get_text "`cue_pos next marker beats & param_add 'get_beatpos & param_multiply -1' & param_multiply 0.25 & param_cast int_trunc`.`cue_pos next marker beats & param_add 'get_beatpos & param_multiply -1' & param_mod 4 & param_cast int_trunc`"
 

I tested this with debug
get_text "`cue_pos next marker beats & param_add 'get_beatpos & param_multiply -1' & param_multiply 0.25 & param_cast int_trunc`.`cue_pos next marker beats & param_add 'get_beatpos & param_multiply -1' & param_mod 4 & param_cast int_trunc`" & param_contains "-" ? get_text "`cue_countdown & param_multiply 0.25 & param_cast int_trunc`.`cue_countdown & param_mod 4 & param_cast int_trunc`" & param_cast & debug : get_text "`cue_pos next marker beats & param_add 'get_beatpos & param_multiply -1' & param_multiply 0.25 & param_cast int_trunc`.`cue_pos next marker beats & param_add 'get_beatpos & param_multiply -1' & param_mod 4 & param_cast int_trunc`" & param_cast & debug


Seems to work, just remove the param_cast & debug from each of the reply lines to place it in your skin.
Not as neat as I could have done it, but quick.
 

param_equal 'cue_pos next marker beats' 0 ? get_text "`cue_countdown & param_multiply 0.25 & param_cast int_trunc`.`cue_countdown & param_mod 4 & param_cast int_trunc`" : get_text "`cue_pos next marker beats & param_add 'get_beatpos & param_multiply -1' & param_multiply 0.25 & param_cast int_trunc`.`cue_pos next marker beats & param_add 'get_beatpos & param_multiply -1' & param_mod 4 & param_cast int_trunc`"


That's a little neater.
*Edit, not xml friendly, new reply below.
 

oh of course, xml escaping needed, only " will escaping

param_equal 'cue_pos next marker beats' 0 ? get_text '`cue_countdown & param_multiply 0.25 & param_cast int_trunc`.`cue_countdown & param_mod 4 & param_cast int_trunc`' : get_text "`cue_pos next marker beats & param_add 'get_beatpos & param_multiply -1' & param_multiply 0.25 & param_cast int_trunc`.`cue_pos next marker beats & param_add 'get_beatpos & param_multiply -1' & param_mod 4 & param_cast int_trunc`"
 

I use it by Default at the Cue Pads and Set IT to beats.
So i See quick how Long i have Till the next Action i prepared before Like James Hype.