[L2Ork-dev] Won’t finish starting up

Jeff Morris jeff at morrismusic.org
Sun Oct 27 13:58:27 EDT 2024


Whew! I finally got [hidraw] working. At first, it was compiled as arm64
but my Pd install was x86_64 running in Rosetta 2 (apparently). Trying to
compile Pd-L2Ork for arm64 threw up enough hurdles that I tried leaving Pd
alone and bringing [hidraw] to align with it. I set it to x86_64 by using
the line

make PDDIR=../../pd/ PDBINDIR=../../pd/src/
CFLAGS="-I/usr/local/include/hidapi -arch x86_64" LDFLAGS="-arch x86_64"

and I also had to quit and restart Pd at the right time to keep it from
relying on old cached things that were causing errors.

Anyhow, [hidraw] appears to be working properly now!


By the way, regarding my original problem when I couldn't run Pd, it was
odd that deleting a plist file seemed to be the fix when I definitely had
done that previously while troubleshooting.

It turns out there were two plist files to watch for, one starting with org
and one starting with net, so they weren't next to each other in
Preferences:

net.pd-l2ork.nwjs.plist
org.puredata.pd-l2ork.plist

Hope that helps someone in the future.

Thanks for all your help,

𐌌

Jeff Morris
http://morrismusic.org
http://weblogmusic.org


On Tue, Oct 22, 2024 at 9:27 PM Bukvic, Ivica <ico at vt.edu> wrote:

> You may have to adjust the PDBINDIR=../../pd/bin or just leave it out from
> that command.
>
> Best,
>
> Ico
> --
> Ivica Ico Bukvic, D.M.A.
> Director, Creativity + Innovation
> Director, Human-Centered Design iPhD
> Institute for Creativity, Arts, and Technology
>
> Virginia Tech
> Creative Technologies in Music
> School of Performing Arts – 0141
> Blacksburg, VA 24061
> (540) 231-6139
> ico at vt.edu
>
> ci.icat.vt.edu
> l2ork.icat.vt.edu
> ico.bukvic.net
>
> ------------------------------
> *From:* L2Ork-dev <l2ork-dev-bounces at disis.music.vt.edu> on behalf of
> Bukvic, Ivica <ico at vt.edu>
> *Sent:* Tuesday, October 22, 2024 9:40:11 PM
> *To:* l2ork-dev at disis.music.vt.edu <l2ork-dev at disis.music.vt.edu>
> *Subject:* Re: [L2Ork-dev] Won’t finish starting up
>
> Great! Thanks for this info. I did some googling and was unable to find
> the source, so this is super helpful. I will include hidraw in the next
> pd-l2ork release (after I test it on all the platforms, we will probably
> skip the WebPdL2Ork build since it, by design, would likely violate the
> browser sandbox).
>
> In the meantime, the way you can build your own version is as follows
> (this may take a few steps):
>
>    1. Download and install Xcode from the Apple Store
>    2. go to https://github.com/pd-l2ork/pd-l2ork and follow instructions
>    on how to set up your Mac to be able to compile Pd-L2Ork, but DO NOT
>    compile it (just do steps 1-4, including 4).
>    3. type following commands:
>
>    cd externals
>    git clone https://github.com/Lucarda/pd-hidraw.git
>    cd pd-hidraw
>    git submodule update --init --recursive
>    make PDDIR=../../pd/ PDBINDIR=../../pd/src/
>
> That should build the external in that folder and have the help file in
> there, as well. Run pd-l2ork and click on open, and try opening the help
> file in that folder. Check the help file for permission adjustments on a
> Mac. If it all works, you should be able to embed the external
> (hidraw.pd_darwin, or whatever it ends up being called) and copy the help
> file anywhere on your computer, including your projects. You may also need
> to copy the hidapi subfolder with them.
>
> Let me know if this works. This will speed up my efforts at integrating it
> into pd-l2ork.
>
> Thanks.
>
> Best,
>
> Ico
> ------------------------------
> *From:* L2Ork-dev <l2ork-dev-bounces at disis.music.vt.edu> on behalf of
> Jeff Morris <jeff at morrismusic.org>
> *Sent:* Tuesday, October 22, 2024 8:02 PM
> *To:* l2ork-dev at disis.music.vt.edu <l2ork-dev at disis.music.vt.edu>
> *Subject:* Re: [L2Ork-dev] Won’t finish starting up
>
> Good to know.
>
> As far as HID externals, IEM lists four at
> https://pd.iem.sh/interface-pd-with/
>
> And among them, only one is listed for Linux, macOS, and Windows, and it's
> been updated this year (thanks, Lucas Cordiviola):
> https://github.com/Lucarda/pd-hidraw
>
> 𐌌
>
> Jeff Morris
> http://morrismusic.org
> http://weblogmusic.org
>
>
> On Mon, Oct 21, 2024 at 7:47 PM Bukvic, Ivica <ico at vt.edu> wrote:
>
> Thanks, Jeff. I use those objects periodically and they have never failed
> me. This is just an old help patch and those comments should be ignored. I
> will look into adding HID object to the pd-l2ork build. Would you please
> send me a link to the source? Also, does it work on all OSs?
>
> Best,
>
> Ico
> --
> Ivica Ico Bukvic, D.M.A.
> Director, Creativity + Innovation
> Director, Human-Centered Design iPhD
> Institute for Creativity, Arts, and Technology
>
> Virginia Tech
> Creative Technologies in Music
> School of Performing Arts – 0141
> Blacksburg, VA 24061
> (540) 231-6139
> ico at vt.edu
>
> ci.icat.vt.edu
> l2ork.icat.vt.edu
> ico.bukvic.net
> ------------------------------
> *From:* L2Ork-dev <l2ork-dev-bounces at disis.music.vt.edu> on behalf of
> Jeff Morris <jeff at morrismusic.org>
> *Sent:* Monday, October 21, 2024 4:08:07 PM
> *To:* l2ork-dev at disis.music.vt.edu <l2ork-dev at disis.music.vt.edu>
> *Subject:* Re: [L2Ork-dev] Won’t finish starting up
>
> Thanks. [legacy_mouseclick] and [legacy_mousemotion] work for me if I
> delete the full path from the name. However, I wonder how worried I should
> be about those messages in their help patchers saying things like "old
> legacy," "isn't stable," and "Don't depend on it."
>
> If there's a more appropriate way to get the mouse data, I'd like to know
> it. And I am still curious about HID control, whenever someone gets a
> chance to pipe in.
>
> Thanks,
>
> 𐌌
>
> Jeff Morris
> http://morrismusic.org
> http://weblogmusic.org
>
>
> On Mon, Oct 21, 2024 at 12:51 PM Bukvic, Ivica <ico at vt.edu> wrote:
>
> For mouse you should use legacy_mouse or something like that. I will look
> it up once I am back at the computer.
>
> Best,
>
> Ico
> --
> Ivica Ico Bukvic, D.M.A.
> Director, Creativity + Innovation
> Director, Human-Centered Design iPhD
> Institute for Creativity, Arts, and Technology
>
> Virginia Tech
> Creative Technologies in Music
> School of Performing Arts – 0141
> Blacksburg, VA 24061
> (540) 231-6139
> ico at vt.edu
>
> ci.icat.vt.edu
> l2ork.icat.vt.edu
> ico.bukvic.net
> ------------------------------
> *From:* L2Ork-dev <l2ork-dev-bounces at disis.music.vt.edu> on behalf of
> Jeff Morris <jeff at morrismusic.org>
> *Sent:* Monday, October 21, 2024 1:16:51 PM
> *To:* l2ork-dev at disis.music.vt.edu <l2ork-dev at disis.music.vt.edu>
> *Subject:* Re: [L2Ork-dev] Won’t finish starting up
>
> Thank, Albert and Ico,
>
> This is enlightening information about the lower-level state of things.
>
> So what do you guys use to get game controllers to work with your patches
> if not [hid]?
>
> Any idea what's up with [cyclone/mousestate]? It loads without error but
> never produces any output, and I don't see anything in the DevTools
> console. Clicking [poll( sometimes produces these messages in the Pd
> console:
>
> legacy tcl command at 473 of ../shared/hammer/gui.c: global
> hammergui_ispolling
> legacy tcl command at 474 of ../shared/hammer/gui.c: set
> hammergui_ispolling 1
> legacy tcl command at 475 of ../shared/hammer/gui.c: hammergui_poll
>
> And yes, for Purr-Data 2.20, I tried removing the quarantine attribute
> first and it wasn't until I used spctl that I got it to work.
>
> Thanks,
>
> 𐌌
>
> Jeff Morris
> http://morrismusic.org
> http://weblogmusic.org
>
>
> On Mon, Oct 21, 2024 at 2:57 AM Albert Graef <aggraef at gmail.com> wrote:
>
> Hi Jeff,
>
> On Sun, Oct 20, 2024 at 7:15 PM Jeff Morris <jeff at morrismusic.org> wrote:
>
> I was able to get Purr-Data working finally using sudo spctl
> --master-disable and it mostly works okay, except that it crashed upon
> quitting. The macOS console crash log shows the following. Looks like a
> memory segmentation fault experienced by nwjs.
>
>
> Completely disabling Gatekeeper shouldn't be necessary. At least with the
> latest 2.20.0 version, just removing the com.apple.quarantine attribute
> after installation should be enough (cf.
> https://github.com/agraef/purr-data/wiki/Installation):
> sudo xattr -r -d com.apple.quarantine /Applications/Purr-Data.app
>
> The nw.js crash-on-exit is a known bug:
> https://github.com/agraef/purr-data/issues/44. You can work around the
> annoying popup message from the OS as described in the ticket. Other than
> that, this bug is mostly harmless since the nw.js crash happens after
> purr-data already went through its entire finalization sequence. And you
> can also avoid the bug by closing all patch windows before exiting the
> program. At least that works for me on Big Sur (old Intel MB) and Sonoma
> (MB M1), your mileage may vary.
>
> As Ico already pointed out, there are various issues with the nw.js
> versions that we use. Probably the most serious regression is that NW2, the
> new browser window implementation being used as default in nw.js 0.42.4 and
> later, has some severe performance problems with dynamic code execution in
> the JavaScript interpreter. This makes rendering dynamic svg graphics on
> the canvas (such as array displays and pd-lua graphics) horribly slow,
> which is why both pd-l2ork and purr-data switch nw.js to the old NW1
> implementation. (Ico first discovered this and reported it upstream some
> two years ago, but we still need to produce a minimal example for the issue
> before it will be considered.)
>
> This in turn limits the nw.js versions that we can use, because anything
> past nw.js 0.67.1 has broken window management in NW1 mode. The
> crash-on-exit bug on macOS is also related to the use of NW1 AFAICT.
> Moreover, on Linux, nw.js 0.56.0 and later have another serious bug
> (nwworkingdir not working, which means that file dialogs will open in the
> wrong places) which AFAICT has never been fixed. Which is why I decided to
> go with nw.js 0.55.0 in purr-data 2.20.0, which is pretty much the last
> nw.js version that works without any serious regressions on all major
> platforms.
>
> But note that purr-data also includes a little shell script which lets you
> experiment with different nw.js versions and switch between NW1 and NW2, to
> find out what works best for you. See
> https://github.com/agraef/purr-data/wiki/Installation#patching-purr-datas-nwjs.
> (I doubt that the script will work with pd-l2ork as-is, but you can
> probably adjust it if needed, if you know a little shell programming.)
>
> HTH,
> Albert
>
> --
> Dr. Albert Gr"af
> Computer Music Research Group, JGU Mainz, Germany
> Email: aggraef at gmail.com, web: https://agraef.github.io/
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev
>
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev
>
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev
>
>
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://disis.music.vt.edu/pipermail/l2ork-dev/attachments/20241027/e9bfef09/attachment-0001.htm>


More information about the L2Ork-dev mailing list