vMix Forums
»
General
»
Feature Requests
»
Layer move/zoom via joystick
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 59 ![United States United States](/Content/images/flags/US.png) Location: Chicago Thanks: 8 times Was thanked: 2 time(s) in 1 post(s)
|
Right now, it doesn't seem possible to move a layer using a joystick. The shortcut and layer values are absolute and a joystick outputs are pressure sensitive and snap back to zero on center.
Basically, to make layer adjustments like PTZ movements.
Given that most other switchers have this (EG, TriCaster) it is a feature that would be great but most people don't realize they're missing it! In fact, with TriCaster (as an example) you can also select to crop, rotate, etc. Pretty much every control of the layer, by selecting a modifier button. But even if we got X, Y and Z only, that would be a big help and add a lot of value to my control surface (TYST).
Thanks for consideration!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,171 ![Belgium Belgium](/Content/images/flags/BE.png) Location: Belgium Thanks: 288 times Was thanked: 942 time(s) in 778 post(s)
|
Originally Posted by: fgolman ![Go to Quoted Post Go to Quoted Post](/Themes/yafpro/icon_latest_reply.gif) people don't realize they're missing it!
because can do it with the available (shortcut) functions maybe?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 59 ![United States United States](/Content/images/flags/US.png) Location: Chicago Thanks: 8 times Was thanked: 2 time(s) in 1 post(s)
|
OK, then please enlighten me as to how it works.
The shortcuts don't do it correctly. Have you tried? Sure, they are there but as I pointed out, joysticks are displacement and the API/shortcut wants absolute values. SO, when you set them up (using Pressure Enabled, which is the only way they even get near working) your sizing/positioning will snap back (usually) to the center/full size when you release the joystick.
Thank you.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,171 ![Belgium Belgium](/Content/images/flags/BE.png) Location: Belgium Thanks: 288 times Was thanked: 942 time(s) in 778 post(s)
|
Originally Posted by: fgolman ![Go to Quoted Post Go to Quoted Post](/Themes/yafpro/icon_latest_reply.gif) the API/shortcut wants absolute values.
not neceserally. there is the +=value -=value to increase/decrease the current value you didn't mention what the joystick sends you in the vMix shortcut defining in order to play with the position values for other than ptz camera inputs one can use virtual ptz controls ?t=1135 using external app/script that has posibility to read joystick data combined with sending functions to vMix a lot can be achieved
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 59 ![United States United States](/Content/images/flags/US.png) Location: Chicago Thanks: 8 times Was thanked: 2 time(s) in 1 post(s)
|
OK, I see that -=value and +=value do work, sort of.
They don't continuously repeat, basically using the joystick as a way to trigger a keystroke more or less. And, it seems like only on the pure x and y axis, not on a diagonal. And, the amount is fixed so that each time you move the joystick it moves the amount specified, not using the gradient to have movement based on how far the joystick is tilted and held.
SO, yes, it does kind of work, but not anything like comparable control surfaces in other switchers.
Unless you have a better way to make this happen, the suggestion of implementing joystick control from this still stands.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,171 ![Belgium Belgium](/Content/images/flags/BE.png) Location: Belgium Thanks: 288 times Was thanked: 942 time(s) in 778 post(s)
|
Originally Posted by: fgolman ![Go to Quoted Post Go to Quoted Post](/Themes/yafpro/icon_latest_reply.gif) OK, I see that -=value and +=value do work, sort of.
They don't continuously repeat, basically using the joystick as a way to trigger a keystroke more or less. And, it seems like only on the pure x and y axis, not on a diagonal. And, the amount is fixed so that each time you move the joystick it moves the amount specified, not using the gradient to have movement based on how far the joystick is tilted and held.
SO, yes, it does kind of work, but not anything like comparable control surfaces in other switchers.
Unless you have a better way to make this happen, the suggestion of implementing joystick control from this still stands.
The trick is to continiously read the throw of the joystick (the resistance value) and convert that to a +=value ( small throw = low +=value, larger throw = larger +=value) . the size of the step (value) = the speed and when at zero throw to not use any +=value meaning position is maintained (scripting) . Combine the x and Y axis throw convertion step and you will get the diagonal . thats how it is done in the video be it with a arduino to convert to the PTZ VISCA Protocol . Same principle for using the vMix functions
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 59 ![United States United States](/Content/images/flags/US.png) Location: Chicago Thanks: 8 times Was thanked: 2 time(s) in 1 post(s)
|
Sure, it's possible to script it. In fact, I just had ChatGPT write me up a script that looks like it will work.
BUT, this is something that should be native to the product. As noted, like most (if not all) other switcher's control surfaces with joysticks.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 3/30/2023(UTC) Posts: 59 ![United States United States](/Content/images/flags/US.png) Location: Chicago Thanks: 8 times Was thanked: 2 time(s) in 1 post(s)
|
Well, this script didn't work (generated by ChatGPT):
Function JoystickMove() 'Get the current position of the layer Dim x As Integer = Layer(1).PositionX Dim y As Integer = Layer(1).PositionY
'Get the current scale of the layer Dim scaleX As Integer = Layer(1).ScaleX Dim scaleY As Integer = Layer(1).ScaleY
'Get the joystick input values Dim joyX As Integer = Joystick(1).X Dim joyY As Integer = Joystick(1).Y
'Calculate the new position of the layer based on joystick input x += joyX * 10 y += joyY * 10
'Calculate the new scale of the layer based on joystick input scaleX += joyX * 2 scaleY += joyY * 2
'Set the new position and scale of the layer Layer(1).PositionX = x Layer(1).PositionY = y Layer(1).ScaleX = scaleX Layer(1).ScaleY = scaleY
End Function
'Call the JoystickMove function every frame (30 times per second) AddPeriodicCallback("JoystickMove", "JoystickMove", 33)
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,171 ![Belgium Belgium](/Content/images/flags/BE.png) Location: Belgium Thanks: 288 times Was thanked: 942 time(s) in 778 post(s)
|
Originally Posted by: fgolman ![Go to Quoted Post Go to Quoted Post](/Themes/yafpro/icon_latest_reply.gif) Well, this script didn't work (generated by ChatGPT):
Well first ChatGPT need to read the vMix helpfiles ;-) Quote:vMix Scripting supports the majority of VB.NET 2.0 code that will work within a single sub or function. This means that custom classes and structures are not supported, however you can use the vast majority of the built in base classes in the .NET framework including the handy System.Net.WebClient for downloading data over the internet. And maybe read the "scripting for dummies" post ;-) as like "= Layer(1).PositionX or Layer(1).PositionX = x and similar " it wont understand
|
|
|
|
vMix Forums
»
General
»
Feature Requests
»
Layer move/zoom via joystick
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close