AAX-Windows Mouse-Wheel not recognized (Update)

It seems that the mouse-wheel in ProTools with AAX is not recognized (tested with protools 11 on windows)

EDIT:  Please take a look at the last post

other plugins doesn't seem to have this problem, so i think its special to juce plugins 

anybody has an idea? (Its on windows 8.1 btw..)

ookay, what about using the WindowHook already implemented in VST, seems to work :-)

 


Index: AAX/juce_AAX_Wrapper.cpp
===================================================================
--- AAX/juce_AAX_Wrapper.cpp    (revision 5169)
+++ AAX/juce_AAX_Wrapper.cpp    (working copy)
@@ -37,6 +37,7 @@
 #endif
 #include "../utility/juce_IncludeModuleHeaders.h"
+#include "../utility/juce_WindowsHooks.h"
 #undef Component
 #ifdef __clang__
@@ -93,6 +94,8 @@
 const int32_t juceChunkType = 'juce';
+
+
 //==============================================================================
 struct AAXClasses
 {
@@ -414,6 +417,10 @@
             ScopedPointer<AudioProcessorEditor> pluginEditor;
             JuceAAX_GUI& owner;
+#if JUCE_WINDOWS
+                       WindowsHooks hooks;
+#endif
+
             JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentWrapperComponent)
         };

I'll have a look. Seems like a sensible thing to do.

Avid just published a post on their Dev forum regarding proper event-handling.  The focus is on modifier keys (which are apprently causing some headaches on Windows 8) but also contains more general information about event handling in AAX plugins.

I don't want to run afoul of NDAs by reposting here, but authorized AAX developers can view the post "Ensuring correct modifier-click behavior in Pro Tools" at 

https://developer.digidesign.com/index.php?L1=5&L2=13&L3=56

Please make sure any adjustments you make adhere to these guidelines.

 

Although the mouse wheel hook works great if only one plugin (type, more than one instance of the same plugin is OK) is used, it completely breaks mouse wheel input for all but the last opened plugin. Due to this we have the mouse wheel hook disabled in our plugins.
Only JUCE based plugins that use the hook are affected, but it doesn’t depend on the JUCE version or plugin manufacturer.

I made an animated gif to show this but I’m unable to upload the gif (or a simple .txt file). Is the forum’s upload currently broken?

To reproduce this, simply build a newly generated plugin and the JUCE demo plugin (both VST). Then open the JUCE demo plugin GUI in any DAW and use the mouse wheel over a Demo plugin slider (will work OK). After opening the newly build plugin GUI again, use the mouse wheel over a Demo plugin slider. Independently from the wheel direction it will always go up in rather large steps.

Chris

​Ah i didn't check this, i will try to recreate the problem. But if its only affecting JUCE Plugins, i think with have good chance to fix this inside the WindowsHooks object. Maybe the registering of the hook with SetWindowsHookEx is just wrong (maybe because they share the same threadID?!?!) ...

 

Does anybody has an idea?

 

 No mouse-wheel support is not a good solution :-/

 

The hook inside the VST wrapper is only to be able to use the mouse wheel without clicking onto the plugin first.
I did some debugging regarding the hook but wasn’t able to find something wrong. The first plugin’s hook is called OK while all further hooks only receive some (although always the same) garbage.

On a quick test the mouse wheel worked in PT 11.3.1 on Win 8.1 although I needed to click on the plugin first.
We don’t uses JUCE’s AAX wrapper but I don’t expect a big difference in this regard.

Chris

At my side it didn't work without the hook.

I tried to recreate the problem you describe here on Windows 8.1, the Demo-Plugin & and my Plugin (booth with hook) and Cubase 7 32bit compiled with VS 2012 , and it works without problems!  Can you give me your exact configuration? 


I quickly compared our wrapper and the current JUCE AAX wrapper. We extended Avid’s demo plugin with a JUCE GUI (inheriting from AAX_JuceContentView inside the DemoGain_GUIExtensions example), so the wrappers are quite different from the GUI side. Maybe this helps to track down the mouse wheel issue.

Chris

I wasnt able to reproduce the issue you have described with VST-32bit  in Cubase 7 and AAX-64bit (with my Hook Patch) in ProTools 12 (http://www.juce.com/forum/topic/aax-windows-mouse-wheel-not-recognized#comment-311491) 

Booth tested with Windows 8.1

So from my side i can't see any current issue why the WindowsHook should not be enabled for the AAX Wrapper too. It would be interesting to know the exact configuration/OS/Host Version did you use?

Did you use two different JUCE-based plugins (for example one of yours and the JUCE demo)? I just tried in Nuendo 5.5 where the error also occurs. Both plugins (JUCE demo plugin and a newly created one without any further changes) were built this week with the current JUCE tip.

It might be related to the Windows SDK (v7.0) or the Visual Studio (2008) we’re using, I’ll have a look if I find some time.

Chris

Yes, i used two different plugins. Which operating system? I use Plattform Toolset v110 (from VS2012, which i think uses 8.0A SDK (anybody knows how to determine this, i think newer VS versions didn't use the old scheme, and always run with there shipped SDK?!?)

 

Just tested on Windows 8.1 where it works as it should, so it is only a problem on Windows 7 (probably also Vista and maybe XP). It is independent from the build tools as it also appears in builds using VS 2013.

The used Windows SDK can be set in Introjucer or in the common project properies area (don’t know the exact name in English VS).

I made some checks too, the hook also works with Protools/AAX/64 with Windows7, but not for Cubase8/VST/32 Windows 7 (i could reproduce the issue)

There there is only one configuration which is not working: Cubase && Windows 7

Windows 8.1  Cubase working && ProTools working

Windows 7    Cubase not working && ProTools working 

It looks like a Cubase specific bug with Windows 7

 

So i think its save to add the hook into the AAX-Wrapper, but it should be deactivated with Cubase below Windows 8

Fabian, Jules, Timur - what is your opinion? I hope our research will be influential on the wrappers ;) 

It also work with Windows7/VST64/Cubase 8

 

So there is one configuration where the wrapper should be disabled

if (WindowsVersion<8) && (x86) && Cubase

{

    disable Wrapper

} else

{

  enable Wrapper

}

and please add the WindowsHook to the AAX-wrapper

 

 

 

My recommendation for the VST Wrapper


Index: juce_VST_Wrapper.cpp
===================================================================
--- juce_VST_Wrapper.cpp        (revision 5169)
+++ juce_VST_Wrapper.cpp        (working copy)
@@ -1328,7 +1328,27 @@
         EditorCompWrapper (JuceVSTWrapper& w, AudioProcessorEditor* editor)
             : wrapper (w)
         {
-            setOpaque (true);
+                       #ifdef JUCE_32BIT
+                               if (!
+                                       (
+                                               getHostType().isCubase()
+                                               &&
+                                               (
+                                                       SystemStats::getOperatingSystemType() ==  SystemStats::Windows7 ||
+                                                       SystemStats::getOperatingSystemType() ==  SystemStats::WinVista ||
+                                                       SystemStats::getOperatingSystemType() ==  SystemStats::WinXP    ||
+                                                       SystemStats::getOperatingSystemType() ==  SystemStats::Win2000
+                                               )
+                                       )
+                                       )
+                               {
+                                       hooks= new WindowsHooks();
+                               };
+                       #else
+                                       hooks= new WindowsHooks();
+                       #endif
+
+                       setOpaque (true);
             editor->setOpaque (true);
             setBounds (editor->getBounds());
@@ -1438,7 +1458,7 @@
         FakeMouseMoveGenerator fakeMouseGenerator;
        #if JUCE_WINDOWS
-        WindowsHooks hooks;
+          ScopedPointer<WindowsHooks> hooks;
        #endif
         JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EditorCompWrapper)

 

My recommendation for the AAX Wrapper


Index: juce_AAX_Wrapper.cpp
===================================================================
--- juce_AAX_Wrapper.cpp        (revision 5169)
+++ juce_AAX_Wrapper.cpp        (working copy)
@@ -37,6 +37,7 @@
 #endif
 #include "../utility/juce_IncludeModuleHeaders.h"
+#include "../utility/juce_WindowsHooks.h"
 #undef Component
 #ifdef __clang__
@@ -93,6 +94,8 @@
 const int32_t juceChunkType = 'juce';
+
+
 //==============================================================================
 struct AAXClasses
 {
@@ -414,6 +417,10 @@
             ScopedPointer<AudioProcessorEditor> pluginEditor;
             JuceAAX_GUI& owner;
+#if JUCE_WINDOWS
+                       WindowsHooks hooks;
+#endif
+
             JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentWrapperComponent)
         };

i did not check, but i think Nuendo should be also included