logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
fgolman  
#1 Posted : Saturday, May 13, 2023 8:13:14 AM(UTC)
fgolman

Rank: Advanced Member

Groups: Registered
Joined: 3/30/2023(UTC)
Posts: 84
United States
Location: Chicago

Thanks: 8 times
Was thanked: 3 time(s) in 2 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!
doggy  
#2 Posted : Saturday, May 13, 2023 8:51:54 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,220
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 953 time(s) in 788 post(s)
Originally Posted by: fgolman Go to Quoted Post
people don't realize they're missing it!


because can do it with the available (shortcut) functions maybe?
fgolman  
#3 Posted : Saturday, May 13, 2023 11:28:46 AM(UTC)
fgolman

Rank: Advanced Member

Groups: Registered
Joined: 3/30/2023(UTC)
Posts: 84
United States
Location: Chicago

Thanks: 8 times
Was thanked: 3 time(s) in 2 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.
doggy  
#4 Posted : Saturday, May 13, 2023 5:21:26 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,220
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 953 time(s) in 788 post(s)
Originally Posted by: fgolman Go to Quoted Post
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






fgolman  
#5 Posted : Monday, May 15, 2023 1:42:38 PM(UTC)
fgolman

Rank: Advanced Member

Groups: Registered
Joined: 3/30/2023(UTC)
Posts: 84
United States
Location: Chicago

Thanks: 8 times
Was thanked: 3 time(s) in 2 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.
doggy  
#6 Posted : Monday, May 15, 2023 11:16:10 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,220
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 953 time(s) in 788 post(s)
Originally Posted by: fgolman Go to Quoted Post
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
fgolman  
#7 Posted : Saturday, May 20, 2023 5:04:29 AM(UTC)
fgolman

Rank: Advanced Member

Groups: Registered
Joined: 3/30/2023(UTC)
Posts: 84
United States
Location: Chicago

Thanks: 8 times
Was thanked: 3 time(s) in 2 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.
fgolman  
#8 Posted : Saturday, May 20, 2023 7:14:22 AM(UTC)
fgolman

Rank: Advanced Member

Groups: Registered
Joined: 3/30/2023(UTC)
Posts: 84
United States
Location: Chicago

Thanks: 8 times
Was thanked: 3 time(s) in 2 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)
doggy  
#9 Posted : Saturday, May 20, 2023 7:31:07 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,220
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 953 time(s) in 788 post(s)
Originally Posted by: fgolman Go to Quoted Post
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
Users browsing this topic
Guest
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.