vMix Forums
»
General
»
3rd Party Software and Development
»
Scripting .net - Get button / Joystick / Midi values?
Rank: Newbie
Groups: Registered
Joined: 11/14/2021(UTC) Posts: 7
|
Is there anyway that you can listen what buttons are pressed or what shortcuts are pressed / used. And get the value of the midi slider / joystick?
|
|
|
|
Rank: Member
Groups: Registered
Joined: 11/28/2024(UTC) Posts: 18
Was thanked: 4 time(s) in 4 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,263 Location: Belgium Thanks: 294 times Was thanked: 965 time(s) in 799 post(s)
|
Originally Posted by: Tuomas Is there anyway that you can listen what buttons are pressed or what shortcuts are pressed / used. And get the value of the midi slider / joystick?
|
|
|
|
Rank: Member
Groups: Registered
Joined: 11/28/2024(UTC) Posts: 18
Was thanked: 4 time(s) in 4 post(s)
|
Thanks, but that video talks about MIDI only and there is no scripting in it.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 11/28/2024(UTC) Posts: 18
Was thanked: 4 time(s) in 4 post(s)
|
I've actually came up with a solution - AutoHotkey (Win only). Here is a function I've found on the internet for sending commands to vMix via the web api. Here it is adjusted for AHK2 + some usage Code:URL2Var(URL) { ; This delivers the URL over the web to vMix
WebRequest := ComObject("WinHttp.WinHttpRequest.5.1")
WebRequest.Open("GET", URL)
WebRequest.Send()
Return WebRequest.ResponseText()
}
ControllerNumber := 1 ;joystick ID
frameRate := 29.97
Loop
{
;get x axis and normalize to <-1..1>
x := Round((GetKeyState(ControllerNumber "JoyX")-50)/50, 10)
;write joystick value into DynamicValue in vMix
URL2Var("http://127.0.0.1:8088/api/?Function=SetDynamicValue1&Value=" . x)
;perform once per frame
Sleep 1000/frameRate
}
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,263 Location: Belgium Thanks: 294 times Was thanked: 965 time(s) in 799 post(s)
|
Originally Posted by: Brano Thanks, but that video talks about MIDI only and there is no scripting in it. is what OP asked, not you ;-)
|
|
|
|
vMix Forums
»
General
»
3rd Party Software and Development
»
Scripting .net - Get button / Joystick / Midi values?
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