Hi everyone, I'm really new to PD so excuse me if I am being dumb!
I have linked a Leap Motion to my patch, and have it tracking hand and finger movements. But I was wondering if there is a way to get the visualiser inside the patch (e.g. actually seeing the hand movements internally inside PD, without having to launch the official Leap Visualiser!)
I hope that makes sense!
Thanks
-
Leap Motion Visualiser inside PD Patch
-
@csunflowert There are I think 5 ways to make images that move on the screen in Pd.
- Using Gem https://forum.pdpatchrepo.info/topic/12033/multimedia-programming-with-pure-data
- Using Ofelia https://forum.pdpatchrepo.info/topic/11259/ofelia-pd-external-library-written-with-openframeworks
- Moving guis around the window (look inside [pd edit] within the help file for a "bang").
- Creating canvases and moving them within your patch window by sending them messages [donecanvasdialog( https://forum.pdpatchrepo.info/topic/10029/setting-a-subpatch-s-canvas-size although "goppy" was made for the old Pd extended and will need some work for a vanilla version.
However the [coords( message is better https://forum.pdpatchrepo.info/topic/12103/edit-mode-switches-on-with-dynamic-patching - Using Data structure scalars https://forum.pdpatchrepo.info/topic/10858/data-structures-append-and-get-what-am-i-getting-wrong/19
Here is an example of a moving "struct"......... metronome.zip
Set the metronome rate and start the [metro]........ you can see what is going on in [gubbins]....
I don't recommend this way for a beginner...... but you will get help on this forum.....
3 is probably the easiest to get started.
David. -
Hi again David,
I finally have the gemwindow up and running, and am able to get a feed from my webcam which is good. However, I want to be able to get the Leap Motion camera input rather than my laptop webcam. Is this achievable?
-
@csunflowert That's good news. Could you add the solution to your other thread please...... it could help someone in the future and that is what the forum is for.
Unsure about the possibilities for Leap motion. There are SDK's but I left university in 1974 having studied only Fortran.
There is open source softwate for the Mac for sharing video frames....... http://syphon.v002.info/ but it looks like it only provides a server for Pd....... but maybe it can talk both ways.
I have used the equivalent.... Spout....... in windows with Pd.
If you Google....... Syphon Pure Data...... you will find more info.
It was started in about 2014 I think and I don't know if it made it through the 32>64bit upheaval.
Most of what you will find will be in French.
There are a great number of French audiovisual artists and programmers using Pd for graphics.
I can help with the French if you need me, and I will try to trawl through the posts if I get the spare time...... but I have no way of testing.
Maybe you will find Syphon has been replaced by something else.
David. -
I did a very simple quick and dirty visualizer using Gem a long time ago, here it is... don't expect a lot from it, but it can be a start for you to improve it. I will do a better one using Ofelia one day since Gem is too old now.
leapGem.pd
The abstraction needs Zexy libraryI don't think leap motion camera can be accessed out of the box... but in Ofelia pd is crashing when I connect the leap, which means the lib "see it" at least...
Also I guess Ndi replaced Syphon/Spout today.
You can type "ndi" in "Find externals" and try the one from Antoine Villeret or find others attempts in google / Github like https://forum.pdpatchrepo.info/topic/11829/ndi-external [leapGem.pd] -
Hi to both, thank you for commenting on this post.
@60hz - I have a patch already very similar to the one you have attached. I accessed it from here - http://puredatajapan.info/?page_id=1514. I believe they both do the same thing.
Although what I am trying to execute isn't being able to see the gestural data coming in, but instead a physical camera output from the Leap Motion, as available in the Leap Motion visualiser. I have set up my own patch which launches a gemwindow and allows a webcam feed to be shown, but at the moment it only recognises my FaceTime Camera as an input, and not the camera input from the Leap Motion. After some research, it looks like it may need some JavaScript code - https://developer-archive.leapmotion.com/documentation/csharp/devguide/Leap_Images.html. Although I haven't done any JavaScript in about four years and don't even know where to start. I have downloaded the pdjs external which allows you to link a .js file to the patch, but I just now need the JavaScript code to make it work (unless there's another easier way? Maybe this ndi method?)
If either of you are aware of how to do this, your help would be much appreciated. I am a university student, and if I can get this working, it would be the last thing I need to complete my final assignment!
Thank you for your help so far!