快速登录:  

Forum: VirtualDJ Technical Support

话题: traffic light count for hotcues
SveninoPRO InfinityMember since 2009
Things could be soooo nice:
There are 8 LEDs in a row connected to 8 cuepoints like "cue2 Strophe 1" or "cue7 last Refrain"
When You run the song:
Before the next cue point is reached, a traffic light shows when the cue is coming.
8 beats before the comming cue its LED lights up red
4 beats before the comming cue its LED lights yellow
and when the cue point is reached, one whole bar green.
Like, "ready, steady, SING!"

But unfortunately all traffic light actions always take place at the LED of the last selected cue point and not at the currently coming one.

here is for instance the script for the "cue 2 Strophe 1"-LED:

 deck left play ? deck left cue_select 2 ? & param_greater cue_countdown 4 ? color yellow : param_greater cue_countdown 8 ? color red : param_greater cue_countup 4 ? color green : deck 1 leftdeck ? hotcue 2 exists ? color 50% orange : 0% : deck 3 leftdeck ? hotcue 2 exists ? color 50% green : 0% : 0% : hotcue 2 exists ? deck 1 leftdeck ? color 50% orange : color 50% green : 0% 


and here (after LEDs for cues 3-6) the one for the "cue7 last Ref"-Cue:

 deck left play ? deck left cue_select 7 ? & param_greater cue_countdown 4 ? color yellow : param_greater cue_countdown 8 ? color red : param_greater cue_countup 4 ? color green : deck 1 leftdeck ? hotcue 7 exists ? color 50% orange : 0% : deck 3 leftdeck ? hotcue 7 exists ? color 50% green : 0% : 0% : hotcue 7 exists ? deck 1 leftdeck ? color 50% orange : color 50% green : 0% 


So when the song runs through, the traffic light happens 7 times (for each cue) and should appear on the according LED. But You´ll see 7 red/yellow/green actions at the 2nd LED (if startet there) or at the 4th no matter what cuepoint you are reaching.

As is so often the case, I'm sure it will be just a minor misunderstanding or a tiny syntax error. But who will find it?

Thanks to all who try it...
 

发表时间 Tue 20 Apr 21 @ 10:27 pm
NicotuxHome userMember since 2014
1) you touch a point: no way to know which cue point comes next and which cue point was previous
only which one was used last
as cue point can be randomly defined impossible to know which cue point comes after cue point n

2) maybe the solution can be more simple :
define action cue points setting the led color directly or in a global variable @-8 @-4 and at cue point and @+4 & @+8 and after what reset colors
a specific [karaoke] videoskin could take this value and lit leds accordingly
 

发表时间 Tue 20 Apr 21 @ 11:53 pm
SveninoPRO InfinityMember since 2009
another Idea:
maybe we can use
[cue_pos] and [get_position] to determine the actual space?

does anyone knows, if these commands get only time values (ms, s...) or also deliver beats?

Than it could be like
If "get_position" is 8 beats smaller than "cue_pos" turn the red light on...

Or maybe kind of:
get_song_event next cuepoint 7 ?...

I don't want to give up yet ;-)
So is there any DJDad or DJMom to fix this
Would be very thankful (cause my mind goes around this problems in circles ;-)
Thank You in advance
 

发表时间 Wed 21 Apr 21 @ 1:56 pm
SveninoPRO InfinityMember since 2009
Thank You Nicotux. Unfortunately it´s impossible to set action cues for this.
With hundreds of songs with 8 cuepoints each this would last very long.
 

发表时间 Wed 21 Apr 21 @ 4:36 pm
Svenino wrote :

Before the next cue point is reached, a traffic light shows when the cue is coming.

8 beats before the comming cue its LED lights up red
4 beats before the comming cue its LED lights yellow
and when the cue point is reached, one whole bar green.


Just a color change before cue point?

cue_countdown & param_smaller 0.2 ? color 'green' :  param_smaller 4 ? color 'yellow'  : param_smaller 8 ? color 'red' : color 'black'



And if you want the green to last longer, say green for 4 beats...

cue_countdown & param_smaller 0.2 ? color 'green' :  param_smaller 4 ? color 'yellow'  : param_smaller 8 ? color 'red' : cue_countup & param_smaller 4 ? color 'green'  : color 'black'



Can try on a pad, using the color value.
And can easily be used at a videoskin for something displayed on screen
 

发表时间 Wed 21 Apr 21 @ 5:08 pm
 

发表时间 Wed 21 Apr 21 @ 5:15 pm
SveninoPRO InfinityMember since 2009
Thanks Rune, but that would be too easy.
There are 8 Lights in a row connected to 8 cuepoints.
During playback whenever one of these 8 different cuepoints is reached,
the special LED shall make the traffic-light effect.
To see, WHICH point is coming up.
But with my script only the last selected pad shows the traffics...



On the picture:
cue 3 was selected by pressing pad 3
the song is started at cue 3
Now pad 3 lights red, yellow & green, even if cue6 or cue7 is coming up.
(maybe because of the [deck left cue_select 3 ?] in my script?)

But it´s necessary that pad 6 shows the colors, when cue 6 is almost reached.
And Pad 7 for cue 7...
 

发表时间 Wed 21 Apr 21 @ 5:53 pm
SveninoPRO InfinityMember since 2009
Sorry, it´s not easy to explain...
Easier: In Your example: Could You do a second and a third cuepoint,
and for each upcoming cuepoint a special Pad shall do the light-action

cue 1 is coming? -> Pad 1 lights red/yellow/green
cue 2... Pad 1 lights red/yellow/green
cue 3 Pad 3 and so on...

 

发表时间 Wed 21 Apr 21 @ 5:58 pm
locoDogPRO InfinityModeratorMember since 2013
cues are going to be in chronological order right? that could be useful
say cue 2
( get_position > cue_pos 1 ) & ( get_position < cue_pos 2 ) ? cue 2 is next : we passed cue 2 already
 

发表时间 Wed 21 Apr 21 @ 8:12 pm
can do that several ways.. . comparing song position and cue position

 

发表时间 Wed 21 Apr 21 @ 8:18 pm
and to be order agnostic you can just check how much distance there is between the cue position and song position . ..

something along param_add `cue_pos 3 & param_cast val` `song_pos & param_multiply -1 ` & param_smaller 0.01 ? param_bigger -0.01 ? etc etc.. .

But not sure what for, if its just for lights on a controller, it seems a "a lot ado for noting" perhaps ;-)
Can just look at screen.. keep it simple, less is more


 

发表时间 Wed 21 Apr 21 @ 8:28 pm
SveninoPRO InfinityMember since 2009
Hey Locodoc, that seems to be great.
But how is the right syntax?
(no > or < in vdjscript)
( get_position > cue_pos 1 ) & ( get_position < cue_pos 2 ) ? cue 2 is next : we passed cue 2 already
 

发表时间 Wed 21 Apr 21 @ 8:29 pm
SveninoPRO InfinityMember since 2009
Hey Rune thanks again!
What´s all this for?
I am a musician playing live instruments while using VDJ.
In stressful situations, when I´m swetting and pressing my accordion and sing along, things have to be easy to see.
When I have to start a difficult solo at cue 6 I must be shure, to not miss the right beginning...

So I trie everything to count me in to the different cues.
Your example looks great:



Can You please write the code for doing this?
(Im uncertain of the right syntaxes...)
Thaaaaank You
 

发表时间 Wed 21 Apr 21 @ 8:39 pm
SveninoPRO InfinityMember since 2009
Sorry to be so demanding, but I have already lost so many hours trying to find right syntaxes.
(For a long time I thought my launchpad couldn't blink, because [blink] just didn't work. Until I accidentally saw after a long time that I still have to write a [?] behind it...)

But these VDJ-forums are great! Because people like You take the time to help
poor stupid musicians ;-)

greetz 2 You and I´m taking a bow!
 

发表时间 Wed 21 Apr 21 @ 8:56 pm
Just something quick, and messy, but should do the job...

param_add  `cue_pos 2 & param_cast val`  `song_pos & param_multiply -1 `  & param_smaller 0.01 ? param_bigger -0.01  ?   cue_countdown & param_smaller 0.2 ? color 'green' :   param_smaller 4 ? color 'yellow' : param_smaller 8 ? color 'red'  : cue_countup & param_smaller 4 ? color 'green'  : off  : off : off  


Basically just comparing current song position with the cue position for cue #2 above..
Little bit messy, and might be some false positives, perhaps unloaded deck or beginning of song etc

Didnt test it, but will try clean up and make it better later if its not working that good
 

发表时间 Wed 21 Apr 21 @ 9:07 pm
SveninoPRO InfinityMember since 2009
I´ll try right now and write back
 

发表时间 Wed 21 Apr 21 @ 9:10 pm
SveninoPRO InfinityMember since 2009
It works ! Another example of me trying for hours and You coding it in minutes.
You are gorgeaus! THAAAAANNNNNKSSSSS !

(hope I learned something, cause fixed a little issue)
The red light started just 6 beats before the cue instead of 8 beats.
To fix it I screw up the possible difference between cue_pos and song_pos

param_smaller 0.01 ? param_bigger -0.01
to
param_smaller 0.02 ? param_bigger -0.02

So You see: I´m a docile student ;-)
 

发表时间 Wed 21 Apr 21 @ 9:41 pm