Sign In:     


Forum: VirtualDJ Skins

Topic: os2l and repeat_start syntax issues
Anyone got any ideas why this doesn't work?

<oninit action="set $fadervalue & repeat_start 'myrepeatname' 250ms & os2l_cmd 1 `get_var '$fadervalue'`"/>

<slider name="Test1" x="-120" y="+0" action="set $fadervalue" rightclick="temporary" orientation="vertical">
...etc, etc...</slider>

I'm trying to get os2l data for a slider out of VDJ, but it glitches the UI drawing. I thought i could take the os2l_cmd and put it with a repeat_start statement. It works when i put a static value, but will not evaluate the variable of the slider... any help will save whats left of my hair!!!!
 

Posted yesterday @ 4:09 pm
os2l_cmd does not currently accept script parameters.

You can probably use param_cast to feed it in though:
get_var $fadervalue & param_cast & os2l_cmd 1
 

Thank you Adion, I shall give that a try... :)
 

It works perfectly! Thank you for your solution. My only worry now is how this can be scaled? Is there a limit for osc_cmd id numbers? Also, there will eventually be about 100 float parameters using this pipeline. Hopefully I can work out a way of switching off the repeat once a fader stops moving, or it will get very congested...
 

In this specific case, it would of course be more efficient to put os2l_cmd 1 directly as the action for the slider.
Otherwise 100 repeats will probably not be a significant load, especially if 250ms is fine.

Edit: One downside of using os2l_cmd in a repeat_start is that os2l_cmd sends the command every time, even if the value didn't change.
On the other hand, if it is initiated from the slider, then it will only be sent if the slider moves.
 

It's in a skin no need to cast, implicit will just be tacked on the end of the action.


<slider name="Test1" x="-120" y="+0" action="os2l_cmd 1" rightclick="temporary" orientation="vertical">
...etc, etc...</slider>
 

If i drop the repeat_start statement then the UI glitches as It 'prioritises' transmitting cc data unless I break the stream to allow drawing?
 

It's possible that the return value would indeed be delayed.
I think you could solve this by making the position of the slider use a variable, so it doesn't have to wait on os2l to actually transmit.
I think action="set $slider1 & os2l_cmd 1" might do the trick
 

I have reverted to using midi instead. I tried os2l because I had many midi issues but I have managed to stabilise the midi ports, and just use a variable set up in my mapper. It works well, but i now have another issue... i can't seem to replicate/mirror the fader on a remote skin. The variable is the same, it just won't change anything or mover the fader on main skin... am i missing something about skinning remote skins? I did consider myself fairly competent at skinning hahahaha!
 

Normally the remote has its own variables. To access a variable from the main vdj from the remote, you can use remote_action "get_var myvar"