ArrayArrayArrayArrayArrayArrayArrayArray
BrainModularBrainModular Users Forum2022-06-01T13:12:36+02:00https://brainmodular.com/forums/app.php/feed/topic/69952022-06-01T13:12:36+02:002022-06-01T13:12:36+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44107#p44107You can use a windows call to bring a window into and out of focus using SetForegroundWindow(hWnd) and ShowWindow(hWnd, SW_MINIMIZE);
If the VST supports it, the best idea would be to map the function to a midi CC message or automation control and use that.
Statistics: Posted by sm_jamieson — 01 Jun 2022, 13:12
]]>2022-06-01T13:03:56+02:002022-06-01T13:03:56+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44106#p44106 1. Use SendInput to send to currently active window (creates key events as if typed)
example from google:
void keyPressTilde() {
ip.ki.wVk = 0xC0; // virtual-key code for the key ip.ki.dwFlags = 0; SendInput(1, &ip, sizeof(INPUT));
2. Use SendMessage to send key events to any windows (can be in background). This only works if the application (VST) gets input by the messaging system and modifiers may not work, since they are often obtained using the global key states not the messages. It might work if a simple keypress is required.
e.g.
int main() { LPCWSTR Target_window_Name = TEXT("Untitled - Notepad"); //<- Has to match window name HWND hWindowHandle = FindWindow(NULL, Target_window_Name); HWND EditClass = FindWindowEx(hWindowHandle, NULL, L"Edit", NULL);
Statistics: Posted by sm_jamieson — 01 Jun 2022, 13:03
]]>2022-06-01T10:35:48+02:002022-06-01T10:35:48+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44103#p44103It might also depend on exactly how the VST window gets its input events. Might need a new SDK function to get the window handle from Usine. Also needs to support the 2 modes now - the original VST window and the new VST Client window (The Client window gets around the problem where VST windows were getting stuck under other windows)
I did some experiments with this a few years ago. I'll see if I can dig out the code.
Statistics: Posted by sm_jamieson — 01 Jun 2022, 10:35
Windows can send key events to another window using C++. I expect MAC can do similar. This could be done in a user module using the SDK. Google this for examples: "windows send keystrokes to application c++
Usine should be able to provide the window handle for the VST window. So I think a Send Key to VST module should be possible.
Simon.
i could not figure that part out
Statistics: Posted by GenCode — 26 May 2022, 01:16
]]>2022-05-25T11:03:47+02:002022-05-25T11:03:47+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44095#p44095This could be done in a user module using the SDK. Google this for examples: "windows send keystrokes to application c++
Usine should be able to provide the window handle for the VST window. So I think a Send Key to VST module should be possible.
Simon.
Statistics: Posted by sm_jamieson — 25 May 2022, 11:03
]]>2022-05-20T14:29:37+02:002022-05-20T14:29:37+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44090#p44090Statistics: Posted by GenCode — 20 May 2022, 14:29
]]>
2022-05-20T13:47:49+02:002022-05-20T13:47:49+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44089#p44089I don't think it's possible in the general case. Keyboard handling is provided by the VST itself and unfortunately Usine can't hook that.
]]>2022-05-20T11:59:02+02:002022-05-20T11:59:02+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44084#p44084 Thank you GC
Statistics: Posted by GenCode — 20 May 2022, 11:59
]]>BrainModularBrainModular Users Forum2022-06-01T13:12:36+02:00https://brainmodular.com/forums/app.php/feed/topic/69952022-06-01T13:12:36+02:002022-06-01T13:12:36+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44107#p44107You can use a windows call to bring a window into and out of focus using SetForegroundWindow(hWnd) and ShowWindow(hWnd, SW_MINIMIZE);
If the VST supports it, the best idea would be to map the function to a midi CC message or automation control and use that.
Statistics: Posted by sm_jamieson — 01 Jun 2022, 13:12
]]>2022-06-01T13:03:56+02:002022-06-01T13:03:56+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44106#p44106 1. Use SendInput to send to currently active window (creates key events as if typed)
example from google:
void keyPressTilde() {
ip.ki.wVk = 0xC0; // virtual-key code for the key ip.ki.dwFlags = 0; SendInput(1, &ip, sizeof(INPUT));
2. Use SendMessage to send key events to any windows (can be in background). This only works if the application (VST) gets input by the messaging system and modifiers may not work, since they are often obtained using the global key states not the messages. It might work if a simple keypress is required.
e.g.
int main() { LPCWSTR Target_window_Name = TEXT("Untitled - Notepad"); //<- Has to match window name HWND hWindowHandle = FindWindow(NULL, Target_window_Name); HWND EditClass = FindWindowEx(hWindowHandle, NULL, L"Edit", NULL);
Statistics: Posted by sm_jamieson — 01 Jun 2022, 13:03
]]>2022-06-01T10:35:48+02:002022-06-01T10:35:48+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44103#p44103It might also depend on exactly how the VST window gets its input events. Might need a new SDK function to get the window handle from Usine. Also needs to support the 2 modes now - the original VST window and the new VST Client window (The Client window gets around the problem where VST windows were getting stuck under other windows)
I did some experiments with this a few years ago. I'll see if I can dig out the code.
Statistics: Posted by sm_jamieson — 01 Jun 2022, 10:35
Windows can send key events to another window using C++. I expect MAC can do similar. This could be done in a user module using the SDK. Google this for examples: "windows send keystrokes to application c++
Usine should be able to provide the window handle for the VST window. So I think a Send Key to VST module should be possible.
Simon.
i could not figure that part out
Statistics: Posted by GenCode — 26 May 2022, 01:16
]]>2022-05-25T11:03:47+02:002022-05-25T11:03:47+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44095#p44095This could be done in a user module using the SDK. Google this for examples: "windows send keystrokes to application c++
Usine should be able to provide the window handle for the VST window. So I think a Send Key to VST module should be possible.
Simon.
Statistics: Posted by sm_jamieson — 25 May 2022, 11:03
]]>2022-05-20T14:29:37+02:002022-05-20T14:29:37+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44090#p44090Statistics: Posted by GenCode — 20 May 2022, 14:29
]]>2022-05-20T13:47:49+02:002022-05-20T13:47:49+02:00https://brainmodular.com/forums/viewtopic.php?t=6995&p=44089#p44089I don't think it's possible in the general case. Keyboard handling is provided by the VST itself and unfortunately Usine can't hook that.