Re: [PD] compiling hidio for Windows
Thanks a lot, Christof! This is indeed very helpful. I will let you know what I can find! Cheers, f fdch.github.io > On Feb 4, 2020, at 7:02 PM, Christof Ressi wrote: > > Hi, > > I usually run Pd in a debugger like this: > > gdb --args pd > > > run > > Wait for the segfault. The following will print a stack trace, showing you > the function where the segfault occurs: > > > bt > > (you might need to hit enter to show additional lines of the stacktrace) > > From there you can either set breakpoints > (https://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_28.html) or use good > ol' printf debugging :-) IDEs like Qt Creator have an integrated graphical > frontend for GDB, which makes debugging a more pleasant experience. > > If you have time, please start investigating! I can have a look (and fix the > build system) later this month. > > Christof > >> On 05.02.2020 00:46, Fede Camara Halac wrote: >> As I said before, I could make a binary with Christof's steps, but I dont >> know how to debug an external on windows. If you can give me some basic >> guidelines I can continue with that. >> >> In the meantime, we got joyosc working on Windows so that's looking good! >> >> Best, >> >> f >> >> >> fdch.github.io >> On Feb 4, 2020, at 6:06 PM, Christof Ressi wrote: >>> >>> You just have to replace it with #include . I also compiled it >>> with Msys2. >>> >>> Christof >>> On 04.02.2020 23:13, Martin Peach wrote: > On Sun, Feb 2, 2020 at 1:46 PM ffdd cchh wrote: > Ok, I did Christof's step c) and copied those dummy functions (and > basically commented out anything but a debug_post() inside > "hidio_devices()" and "hidio_elements()", and indeed got a binary. But, > it's no use. > > I try to get some data on why it crashes but it just says 'segmentation > fault': > > ``` > camarahalac.1@ACD-NC054624 MINGW64 ~/Desktop > $ /c/Users/camarahalac.1/Downloads/pd-0.50-2/bin/pd.exe -d 4 -stderr > -open /c/Users/camarahalac.1/Downloads/pd-0.50-2/extra/hidio/hidio-help.pd > Segmentation fault > ``` > I tried this using Msys64 but get hidio_windows.c:37:10: fatal error: ddk/hidsdi.h: No such file or directory 37 | #include I can't find any package for mingw64 that has this file. There is a hidapi, which uses hidapi.h.. https://github.com/libusb/hidapi It uses functions like hid_get_manufacturer_string instead of HidD_GetManufacturerString so it could probably be used fir the windows build. Martin ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list >>> >>> >>> ___ >>> Pd-list@lists.iem.at mailing list >>> UNSUBSCRIBE and account-management -> >>> https://lists.puredata.info/listinfo/pd-list >> >> >> ___ >> Pd-list@lists.iem.at mailing list >> UNSUBSCRIBE and account-management -> >> https://lists.puredata.info/listinfo/pd-list > > > > ___ > Pd-list@lists.iem.at mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] compiling hidio for Windows
Hi, I usually run Pd in a debugger like this: gdb --args pd > run Wait for the segfault. The following will print a stack trace, showing you the function where the segfault occurs: > bt (you might need to hit enter to show additional lines of the stacktrace) From there you can either set breakpoints (https://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_28.html) or use good ol' printf debugging :-) IDEs like Qt Creator have an integrated graphical frontend for GDB, which makes debugging a more pleasant experience. If you have time, please start investigating! I can have a look (and fix the build system) later this month. Christof On 05.02.2020 00:46, Fede Camara Halac wrote: As I said before, I could make a binary with Christof's steps, but I dont know how to debug an external on windows. If you can give me some basic guidelines I can continue with that. In the meantime, we got joyosc working on Windows so that's looking good! Best, f fdch.github.io On Feb 4, 2020, at 6:06 PM, Christof Ressi wrote: You just have to replace it with #include . I also compiled it with Msys2. Christof On 04.02.2020 23:13, Martin Peach wrote: On Sun, Feb 2, 2020 at 1:46 PM ffdd cchh wrote: Ok, I did Christof's step c) and copied those dummy functions (and basically commented out anything but a debug_post() inside "hidio_devices()" and "hidio_elements()", and indeed got a binary. But, it's no use. I try to get some data on why it crashes but it just says 'segmentation fault': ``` camarahalac.1@ACD-NC054624 MINGW64 ~/Desktop $ /c/Users/camarahalac.1/Downloads/pd-0.50-2/bin/pd.exe -d 4 -stderr -open /c/Users/camarahalac.1/Downloads/pd-0.50-2/extra/hidio/hidio-help.pd Segmentation fault ``` I tried this using Msys64 but get hidio_windows.c:37:10: fatal error: ddk/hidsdi.h: No such file or directory 37 | #include I can't find any package for mingw64 that has this file. There is a hidapi, which uses hidapi.h.. https://github.com/libusb/hidapi It uses functions like hid_get_manufacturer_string instead of HidD_GetManufacturerString so it could probably be used fir the windows build. Martin ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] compiling hidio for Windows
As I said before, I could make a binary with Christof's steps, but I dont know how to debug an external on windows. If you can give me some basic guidelines I can continue with that. In the meantime, we got joyosc working on Windows so that's looking good! Best, f fdch.github.io > On Feb 4, 2020, at 6:06 PM, Christof Ressi wrote: > > You just have to replace it with #include . I also compiled it > with Msys2. > > Christof > >> On 04.02.2020 23:13, Martin Peach wrote: >>> On Sun, Feb 2, 2020 at 1:46 PM ffdd cchh wrote: >>> Ok, I did Christof's step c) and copied those dummy functions (and >>> basically commented out anything but a debug_post() inside >>> "hidio_devices()" and "hidio_elements()", and indeed got a binary. But, >>> it's no use. >>> >>> I try to get some data on why it crashes but it just says 'segmentation >>> fault': >>> >>> ``` >>> camarahalac.1@ACD-NC054624 MINGW64 ~/Desktop >>> $ /c/Users/camarahalac.1/Downloads/pd-0.50-2/bin/pd.exe -d 4 -stderr -open >>> /c/Users/camarahalac.1/Downloads/pd-0.50-2/extra/hidio/hidio-help.pd >>> Segmentation fault >>> ``` >>> >> I tried this using Msys64 but get >> hidio_windows.c:37:10: fatal error: ddk/hidsdi.h: No such file or directory >>37 | #include >> I can't find any package for mingw64 that has this file. There is a >> hidapi, which uses hidapi.h.. >> https://github.com/libusb/hidapi >> It uses functions like >> hid_get_manufacturer_string >> instead of >> HidD_GetManufacturerString >> so it could probably be used fir the windows build. >> >> >> Martin >> >> >> >> ___ >> Pd-list@lists.iem.at mailing list >> UNSUBSCRIBE and account-management -> >> https://lists.puredata.info/listinfo/pd-list > > > > ___ > Pd-list@lists.iem.at mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] compiling hidio for Windows
You just have to replace it with #include . I also compiled it with Msys2. Christof On 04.02.2020 23:13, Martin Peach wrote: On Sun, Feb 2, 2020 at 1:46 PM ffdd cchh wrote: Ok, I did Christof's step c) and copied those dummy functions (and basically commented out anything but a debug_post() inside "hidio_devices()" and "hidio_elements()", and indeed got a binary. But, it's no use. I try to get some data on why it crashes but it just says 'segmentation fault': ``` camarahalac.1@ACD-NC054624 MINGW64 ~/Desktop $ /c/Users/camarahalac.1/Downloads/pd-0.50-2/bin/pd.exe -d 4 -stderr -open /c/Users/camarahalac.1/Downloads/pd-0.50-2/extra/hidio/hidio-help.pd Segmentation fault ``` I tried this using Msys64 but get hidio_windows.c:37:10: fatal error: ddk/hidsdi.h: No such file or directory 37 | #include I can't find any package for mingw64 that has this file. There is a hidapi, which uses hidapi.h.. https://github.com/libusb/hidapi It uses functions like hid_get_manufacturer_string instead of HidD_GetManufacturerString so it could probably be used fir the windows build. Martin ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] compiling hidio for Windows
On Sun, Feb 2, 2020 at 1:46 PM ffdd cchh wrote: > > Ok, I did Christof's step c) and copied those dummy functions (and basically > commented out anything but a debug_post() inside "hidio_devices()" and > "hidio_elements()", and indeed got a binary. But, it's no use. > > I try to get some data on why it crashes but it just says 'segmentation > fault': > > ``` > camarahalac.1@ACD-NC054624 MINGW64 ~/Desktop > $ /c/Users/camarahalac.1/Downloads/pd-0.50-2/bin/pd.exe -d 4 -stderr -open > /c/Users/camarahalac.1/Downloads/pd-0.50-2/extra/hidio/hidio-help.pd > Segmentation fault > ``` > I tried this using Msys64 but get hidio_windows.c:37:10: fatal error: ddk/hidsdi.h: No such file or directory 37 | #include I can't find any package for mingw64 that has this file. There is a hidapi, which uses hidapi.h.. https://github.com/libusb/hidapi It uses functions like hid_get_manufacturer_string instead of HidD_GetManufacturerString so it could probably be used fir the windows build. Martin ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] get average luminance of the camera
sorry I did not see that. I was reading here the descriptions but I guess it is outdated https://puredata.info/downloads/gem/documentation/manual/manual/list-of-gem-objects . thanks! On Tue, 4 Feb 2020 at 14:55, IOhannes m zmölnig wrote: > On 2/4/20 2:17 PM, enrike wrote: > > hi > > > > Is it possible to get the average luminance of the camera input using > GEM? > > > > I am exploring pix_data but as far as I can see it only works with > > individual pixels. If I could average or reduce the color information > > from the camera to a single color, then I think I could just take the > > pix_data grey value of any pixel. But I am not sure this can be done. I > > am checking different pix_ objects but I dont see how I could get this > > to work. Any tips? > > [pix_mean_color] > > gfmsadr > IOhannes > > ___ > Pd-list@lists.iem.at mailing list > UNSUBSCRIBE and account-management -> > https://lists.puredata.info/listinfo/pd-list > ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] get average luminance of the camera
did you try [pix_resize 1 1] ? cheers Le 04/02/2020 à 14:17, enrike a écrit : hi Is it possible to get the average luminance of the camera input using GEM? I am exploring pix_data but as far as I can see it only works with individual pixels. If I could average or reduce the color information from the camera to a single color, then I think I could just take the pix_data grey value of any pixel. But I am not sure this can be done. I am checking different pix_ objects but I dont see how I could get this to work. Any tips? thanks enrike ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] get average luminance of the camera
On 2/4/20 2:17 PM, enrike wrote: > hi > > Is it possible to get the average luminance of the camera input using GEM? > > I am exploring pix_data but as far as I can see it only works with > individual pixels. If I could average or reduce the color information > from the camera to a single color, then I think I could just take the > pix_data grey value of any pixel. But I am not sure this can be done. I > am checking different pix_ objects but I dont see how I could get this > to work. Any tips? [pix_mean_color] gfmsadr IOhannes signature.asc Description: OpenPGP digital signature ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
[PD] get average luminance of the camera
hi Is it possible to get the average luminance of the camera input using GEM? I am exploring pix_data but as far as I can see it only works with individual pixels. If I could average or reduce the color information from the camera to a single color, then I think I could just take the pix_data grey value of any pixel. But I am not sure this can be done. I am checking different pix_ objects but I dont see how I could get this to work. Any tips? thanks enrike ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list