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
Tuomas  
#1 Posted : Friday, January 6, 2023 8:55:29 PM(UTC)
Tuomas

Rank: Newbie

Groups: Registered
Joined: 11/14/2021(UTC)
Posts: 7
Finland

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?
Brano  
#2 Posted : Monday, December 30, 2024 12:29:10 AM(UTC)
Brano

Rank: Member

Groups: Registered
Joined: 11/28/2024(UTC)
Posts: 18

Was thanked: 4 time(s) in 4 post(s)
+1 for any idea
doggy  
#3 Posted : Monday, December 30, 2024 2:39:20 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 965 time(s) in 799 post(s)
Originally Posted by: Tuomas Go to Quoted Post
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?


Brano  
#4 Posted : Thursday, January 2, 2025 5:05:28 AM(UTC)
Brano

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.
Brano  
#5 Posted : Thursday, January 2, 2025 5:09:05 AM(UTC)
Brano

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
}
doggy  
#6 Posted : Thursday, January 2, 2025 7:02:39 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 965 time(s) in 799 post(s)
Originally Posted by: Brano Go to Quoted Post
Thanks, but that video talks about MIDI only and there is no scripting in it.


is what OP asked, not you ;-)
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.