Thanks Miller, I now found the time to try your approach and it is indeed a nice one! Three quick questions arise:
If I don't terminate the output of the Sample.cpp program with a semicolon it also works. Is there a difference? What would be the best formatting to save as much network traffic as possible? I discover that Pd (wish, for that matter) consumes quite a lot of cpu when receiving tracking data. Do newlines make a difference? Did you manage to get rid of commas or parentheses in Sample.cpp's output? I can't seem to find a way to do it but it would help tremendously to parse the data in Pd with [route] and [unpack]. Curious and excited, with thanks! Peter * Miller Puckette <[email protected]> [2019-03-12 17:22]: > Hi all - > > I didn't have much trouble ust compiling the "Sample.cpp" example in the > 2.3 development kit; this prints lots of stuff on standard output. I then > changed the print statements in the code to only print out the numbers I > cared about with a trailingsemicolon, then piped to "pdsend", giving it > a UDP port in my patch. > > Because the sample program sometimes just quits I make an auto-restarting > script: > > while true; do > /home/msp/work/poolbox-leap/leap2pool |\ > /home/msp/pd/bin/pdsend 3000 localhost udp > echo restart... > sleep 1 > done > > (where "leap2pool" is my version of Sample.cpp). I think this is pretty > robust - if a leap extern in Pd decided to crash it would takePd down but > the way I do it I only lose a second of connection. > > cheers > Miller > > On Tue, Mar 12, 2019 at 03:32:59PM +0100, Peter P. wrote: > > * Max <[email protected]> [2019-03-12 15:18]: > > > I think you need to start pd with the leap library preloaded: > > > > > > LD_PRELOAD=~/path/to/LeapDeveloperKit/LeapSDK/lib/x64/libLeap.so > > > ~/path/to/pd/bin/pd ~/path/to/patch.pd > > Thanks Max, that's what I already did in the call to the debugger: > > > > $ gdb --args > > LD_PRELOAD=LeapDeveloperKit_2.3.1+31549_linux/LeapSDK/lib/x64/libLeap.so > > /usr/bin/pd -path linux64bit Pd_leapmotion_0.1_mac/leap_motion_help.pd > > > > Without debugger the external fails indeed without that line. > > > > > > > > _______________________________________________ > > [email protected] mailing list > > UNSUBSCRIBE and account-management -> > > https://lists.puredata.info/listinfo/pd-list > > > > _______________________________________________ > [email protected] mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list _______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
