<div dir="ltr"><div>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.</div><div><br></div><div>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:</div><div><ul><li>macOS: no support for the latest LEAP software (5.7.2) or the latest Ultraleap controller hardware. You can still use LEAP software 2.3.1 and the original Leap Motion Controller, but depending on your macOS version and hardware, you may have to resort to <a href="https://forums.leapmotion.com/t/leap-motion-on-m1-mac-monterey/18535/3">this annoying trick</a>. In Pd, use the [leapmotion] extern version 0.2.4 from deken.</li><li>Linux and Windows: LEAP software 5.7.2 is supported, which allows you to use both the original Leap Motion Controller and the new Ultraleap controller. In Pd, use the [ultraleap] extern from deken. If you want to use the [leapmotion] extern, you'll have to install the old 2.3.1 LEAP software. One reason to use the old software is that it features tool tracking and pre-defined gesture tracking. The newest API doesn't.</li></ul></div><div><br></div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 17, 2023 at 2:12 PM William Brent <<a href="mailto:william.brent@gmail.com">william.brent@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">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:<div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>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<br>and run dpinst64.exe to install 64-bit drivers for the Leap Motion Controller.<br></div><div><br></div></blockquote>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?</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 17, 2023 at 8:55 AM <<a href="mailto:rolfm@dds.nl" target="_blank">rolfm@dds.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>well, i tried to go back on the W11 machine to the [leapmotion] setup:</p>
<p>however, the controler isn't working, it doesn't show the 3 red sensor-lights.</p>
<p>re-installing the Gemini/[ultraleap] -> no problem.</p>
<p><br></p>
<p>installed the [leapmotion] setup on the old W10 -> same result: controler not working.</p>
<p>changing to Gemini/[ultraleap] -> working.</p>
<p>??</p>
<p><br></p>
<p>that's it for now.</p>
<p>rolf</p>
<p><br></p>
<p><a href="mailto:rolfm@dds.nl" target="_blank">rolfm@dds.nl</a> schreef op 17-04-2023 12:33:</p>
<blockquote type="cite" style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<p>thanks William,</p>
<p>installing Gemini & [ultraleap] made it work!</p>
<p><br></p>
<p>only just now i have time to follow up on your suggestions.</p>
<p>i'll also test on my old Windows 10 machine.</p>
<p><br></p>
<p>report of that will follow asap.</p>
<p><br></p>
<p>rolf</p>
<p><br></p>
<p>William Brent schreef op 16-04-2023 1:58:</p>
<blockquote style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<div dir="ltr">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.
<div> </div>
<div>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...</div>
<div> </div>
<div> </div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Sat, Apr 15, 2023 at 2:53 PM William Brent <<a href="mailto:william.brent@gmail.com" rel="noreferrer" target="_blank">william.brent@gmail.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">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:
<div> </div>
<div>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 <a href="https://github.com/wbrent/leapmotion/blob/main/INSTALL.txt" rel="noreferrer" target="_blank">here</a>. 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.</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>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.</div>
<div>William</div>
<div> </div>
<div> </div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Sat, Apr 15, 2023 at 12:41 PM <<a href="mailto:rolfm@dds.nl" rel="noreferrer" target="_blank">rolfm@dds.nl</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="font-size:10pt;font-family:Verdana,Geneva,sans-serif">
<p>i finally got my hands on a Mac:</p>
<p>installed the same Pd, leapmotion software, [leapmotion] for Mac.</p>
<p>with my controller i got immediate result.</p>
<p>the message "focus gained" appeared instantly, </p>
<p>and i could use the cursor-test: moving around and firing the bang.</p>
<p><br></p>
<p>it really looks like there's something not right with [leapmotion] for Windows.</p>
<p>(the leapmotion apps available for V2 are also working onmy Windows machine).</p>
<p><br></p>
<p>NB fwiw, when opening leapmotion.h in Visual Studio there appears this message</p>
<p>"// this project is built against LeapDeveloperKit_2.3.1+31549_mac, and requires the same version of libLeap.dylib"</p>
<p>rolf</p>
<p><br></p>
<p><a href="mailto:rolfm@dds.nl" rel="noreferrer" target="_blank">rolfm@dds.nl</a> schreef op 05-04-2023 14:03:</p>
<blockquote style="padding:0px 0.4em;border-left:2px solid rgb(16,16,255);margin:0px">
<p>Windows 11, PD-53.1<br>SDK:LeapDeveloperKit_2.3.1+31549_win<br><br>PD-console:<br>---------------------------------------------<br>Leap Motion Listener: Initialized<br>Leap Motion Service: Connected<br>Leap Motion Connected Device: LP32497879452 v1.7.0<br><br>****************<br>[leapmotion] for Pd version 0.2.3<br>Forked from version 0.1 by Chikashi Miyama<br>Updated by William Brent (Dec 2022)<br>****************<br><br>Leap Motion Service: Connected<br><br><br>Leap Motion Controller: Focus gained<br>Leap Motion Controller: Focus lost<br><br>Leap Motion Controller: Focus gained<br>Leap Motion Controller: Focus lost<br><br>Leap Motion Controller: Focus gained<br>Leap Motion Controller: Focus lost<br><br>-------------------------------------------------<br><br>i've been trying to get leapmotion-help working, with minimal succes.<br>where the leapmotion diagnostic visualiser shows my hands representation all the time, <br>[leapmotion] does not report anything from the controler,<br> and now and then prints the messages focus gained/focus lost.<br><br>only a few times suddenly a frame with general data showed up,<br> with or without a change of position for the button in the cursor-test.<br><br>why, i don't know. i cannot reproduce it, whatever i do with my hand(s).<br><br>the siamese appearance of the gained/lost messages gives the impression<br>(to me) there's some 'secret magic' needed for [leapmotion] to get focussed.<br><br>what am i missing or doing wrong?<br><br>rolf<br><br></p>
</blockquote>
<p><br></p>
</div>
_______________________________________________<br> <a href="mailto:Pd-list@lists.iem.at" rel="noreferrer" target="_blank">Pd-list@lists.iem.at</a> mailing list<br> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a></blockquote>
</div>
<br clear="all">
<div> </div>
<span>-- </span><br>
<div dir="ltr">
<div dir="ltr">William Brent<br><br>"Great minds flock together"<br>Conflations: conversational idiom for the 21st century<br><br><a href="http://www.conflations.com" rel="noreferrer" target="_blank">www.conflations.com</a></div>
</div>
</blockquote>
</div>
<br clear="all">
<div> </div>
<span>-- </span><br>
<div dir="ltr">
<div dir="ltr">William Brent<br><br>"Great minds flock together"<br>Conflations: conversational idiom for the 21st century<br><br><a href="http://www.conflations.com" rel="noreferrer" target="_blank">www.conflations.com</a></div>
</div>
</blockquote>
<p><br></p>
</blockquote>
<p><br></p>

</div>
</blockquote></div><br clear="all"><div><br></div><span>-- </span><br><div dir="ltr"><div dir="ltr">William Brent<br><br>“Great minds flock together”<br>Conflations: conversational idiom for the 21st century<br><br><a href="http://www.conflations.com" target="_blank">www.conflations.com</a></div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">William Brent<br><br>“Great minds flock together”<br>Conflations: conversational idiom for the 21st century<br><br><a href="http://www.conflations.com" target="_blank">www.conflations.com</a></div></div></div>