Hi all. I'm  just circling back on this with an update after connecting with rolf off-list. There was an issue on rolf's Windows machine that I hadn't encountered in my Windows tests where application focus changes weren't working as expected. Our setups were basically identical, but it worked fine for me and only intermittently for rolf. I decided to sidestep the need for application focus altogether by activating the POLICY_BACKGROUND_FRAMES policy in the external. The new version of [leapmotion] (0.2.4) that contains this update is available via deken for Linux, macOS, and Windows. Further testing would be appreciated if anyone is in the position to try it out.

And for anyone interested in this, I'll just say again that the multi-platform and multi-hardware situation with LEAP has a lot of potential for confusion. I was on a bit of a mission to make sense of it all a few months back and still have a grasp on things if anyone needs advice. The quick upshot is:



On Mon, Apr 17, 2023 at 2:12 PM William Brent <william.brent@gmail.com> wrote:
Is the controller not working with any software, or only not with [leapmotion]? I had the same issue of the controller not lighting up when I ran the LEAP 2.3.1 installer, but I documented this extra step in the [leapmotion] INSTALL.txt that fixes things:

When running the installer, a popup warning appears about missing graphics drivers. This can be ignored. When installation is finished, navigate to C:\Program Files (x86)\Leap Motion\Core Services\Drivers
and run dpinst64.exe to install 64-bit drivers for the Leap Motion Controller.

For me, this extra step installs the drivers correctly and the device lights up/is recognized afterward. I just went through this process again on my W10 machine with no issues, and [leapmotion] works fine after that fix. Could you report specifically on your results of trying that?


On Mon, Apr 17, 2023 at 8:55 AM <rolfm@dds.nl> wrote:

well, i tried to go back on the W11 machine to the [leapmotion] setup:

however, the controler isn't working, it doesn't show the 3 red sensor-lights.

re-installing the Gemini/[ultraleap] -> no problem.


installed the [leapmotion] setup on the old W10 -> same result: controler not working.

changing to Gemini/[ultraleap] -> working.

??


that's it for now.

rolf


rolfm@dds.nl schreef op 17-04-2023 12:33:

thanks William,

installing Gemini & [ultraleap] made it work!


only just now i have time to follow up on your suggestions.

i'll also test on my old Windows 10 machine.


report of that will follow asap.


rolf


William Brent schreef op 16-04-2023 1:58:

I just set up my Windows machine to match your system as closely as possible, and all still works as expected with [leapmotion] for me. The only difference is that I'm on Windows 10 rather than 11.
 
After reading your message again, I see that you're occasionally getting some tracking data, so most of what I said in my previous post is irrelevant. But before I dig any further: are you *sure* you're clicked on Pd to make it the foreground application when testing [leapmotion]? If you're clicked on the desktop or any other window/app to lose focus, then tracking data will stop flowing. And if those focus gained/lost messages aren't making sense with the actual clicking you're doing, that's what we need to look into. Maybe I can just disable the need for focus entirely...
 
 

On Sat, Apr 15, 2023 at 2:53 PM William Brent <william.brent@gmail.com> wrote:
Hi rolf, there are a few confusing things in the LEAP world across Linux/Mac/Windows, but when I was working on this a few months back I did successfully get both [leapmotion] and [ultraleap] working on multiple Windows 10 machines with an original Leap Motion Controller. That said, since you're on Windows 11 there could be some new wrinkles. But here are some starting points to check:
 
First, since you're using [leapmotion] and the old 2.3.1 LEAP software, did you see the Windows notes at the bottom of the INSTALL.txt in the GitHub repo? You can see that here. Maybe running that dpinst64.exe installer will resolve things, though I'm not too confident of that since you're already using your device successfully with other software.
 
Second, have you tried installing the latest LEAP software (Gemini 5.7.2) instead of the old 2.3.1? The latest software supports the new UltraLeap controller as well as the original LEAP Motion Controller (which is what you seem to be using). If you install that, you can try using the [ultraleap] external instead, and hopefully things "just work." It's also available via deken.
 
If both of those fail, my next guess would be that there are additional .dll dependencies as of Windows 11. If that's the case, you'd see messages in Pd's console warning that "The specified module could not be found." About the focus gained/lost messages, those should occur when you click on or away from Pd to make it the foreground application or not. If you're getting spammed with a bunch of these messages and aren't changing application focus, then there's an issue I should look into. That worked as expected for me in my Windows tests back in January.
 
Let me know if any of this gets you unstuck. I was really hoping that these updates to [leapmotion] would make it usable on all platforms for at least a little while, so I'd love to get this working on Windows 11.
William
 
 

On Sat, Apr 15, 2023 at 12:41 PM <rolfm@dds.nl> wrote:

i finally got my hands on a Mac:

installed the same Pd, leapmotion software, [leapmotion] for Mac.

with my controller i got immediate result.

the message "focus gained" appeared instantly, 

and i could use the cursor-test: moving around and firing the bang.


it really looks like there's something not right with [leapmotion] for Windows.

(the leapmotion apps available for V2 are also working onmy Windows machine).


NB fwiw, when opening leapmotion.h in Visual Studio there appears this message

"// this project is built against LeapDeveloperKit_2.3.1+31549_mac, and requires the same version of libLeap.dylib"

rolf


rolfm@dds.nl schreef op 05-04-2023 14:03:

Windows 11, PD-53.1
SDK:LeapDeveloperKit_2.3.1+31549_win

PD-console:
---------------------------------------------
Leap Motion Listener: Initialized
Leap Motion Service: Connected
Leap Motion Connected Device: LP32497879452 v1.7.0

****************
[leapmotion] for Pd version 0.2.3
Forked from version 0.1 by Chikashi Miyama
Updated by William Brent (Dec 2022)
****************

Leap Motion Service: Connected


Leap Motion Controller: Focus gained
Leap Motion Controller: Focus lost

Leap Motion Controller: Focus gained
Leap Motion Controller: Focus lost

Leap Motion Controller: Focus gained
Leap Motion Controller: Focus lost

-------------------------------------------------

i've been trying to get leapmotion-help working, with minimal succes.
where the leapmotion diagnostic visualiser shows my hands representation all the time,
[leapmotion] does not report anything from the controler,
 and now and then prints the messages focus gained/focus lost.

only a few times suddenly a frame with general data showed up,
 with or without a change of position for the button in the cursor-test.

why, i don't know. i cannot reproduce it, whatever i do with my hand(s).

the siamese appearance of the gained/lost messages gives the impression
(to me) there's some 'secret magic' needed for [leapmotion] to get focussed.

what am i missing or doing wrong?

rolf


_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list

 
--
William Brent

"Great minds flock together"
Conflations: conversational idiom for the 21st century

www.conflations.com

 
--
William Brent

"Great minds flock together"
Conflations: conversational idiom for the 21st century

www.conflations.com





--
William Brent

“Great minds flock together”
Conflations: conversational idiom for the 21st century

www.conflations.com


--
William Brent

“Great minds flock together”
Conflations: conversational idiom for the 21st century

www.conflations.com