Thanks @whale-av, it looks to be a great solution!
Unfortunately it doesn't work on my pd...
I can see that the paths are added to the paths preferences window with the plugin, but my abstraction still couldn't create untill I add a [declare -path mypath] object!
I also tried to add some lines directly in the open section of pd_menucomands.tcl
open_file $filename pdsend "pd-Untitled.pd declare -stdpath extra/path1
The same issue happend: it works for new objects created only...
The thing is, simple adding those files in the mainpatch.pd works perfectly;
#X declare -stdpath extra/path1;
But I don"t find the way to do it like in extended...
Hi @ingox, this is a clever solution.
Since I do not want a [namecanvas] object in my main patch, I am using [window_name 1] in my (unique) menu abstraction to get the main patch unique ID and send the the paths to the main patch this way.
It works, but I face another big issue: when I "open" a saved patch, the objects are not working because I guess the path messages are not initialisated before the main patch.
So I am still stuck :/
For some workshop, I am tuning tcl settings so I can give every students a pd with libs and special gui menu. In the pd-extended era, I was simply modifiying the command "New" in pd_menucomands.tcl so it would add thoses lines:
pdsend "pd filename $untitled_name-$untitled_number [enquote_path $::filenewdir]" #create new patch pdsend "#N canvas 0 0 900 600 12;" pdsend "#X declare -stdpath extra/path1" pdsend "#X declare -stdpath extra/path2" pdsend "#X obj 0 0 path/menu_bar" #menu object pdsend "#X pop 1"
The patch was created and saved with the paths inside the pd file; and no [declare] object was visible, hence, no path object deleted by mistake by user: perfect magic trick.
Now, many things have change in Vanilla pd. The "filename" command disappears replaced by "menunew".
So I need to do:
pdsend "pd menunew $untitled_name-$untitled_number [enquote_path $::filenewdir]" #create new patch pdsend "#X declare -stdpath extra/path1" pdsend "#X declare -stdpath extra/path2" pdsend "pd-$untitled_name-$untitled_number obj 0 0 path/menu_bar" #menu object
But Why the path trick doesn"t work anymore?
When hit the New patch it works but the console say:
#X: no such object #X: no such object
Is there a way to include the path without adding many objects [declare] automatically for every patch created? I know that I can use a .sh script with path flags but I prefer to keep this way so the native menu "New" of pd will add my special paths in every .pd files created, and add my menu object.
Same problem here... I tried with raspberry pi 4, Raspbian and after few seconds:
restart alsa output alsa xrun recovery apparently failed pd: pcm.c:1168: snd_pcm_prepare: Assertion 'pcm' failed. Pd: signal 6
It only happens when starting in nogui with rc.local using:
sudo pd -no gui /home/pi/patch.pd &
I don't now what to do, I have setup analog jack as the default output...
@60htz "It works on OSX if you copy Gem 0.94 from deken to the extra folder, You only need to add Gem in startup preferences and add "/Applications/PureData/Pd-l2ork.app/Contents/Resources/app.nw/extra/Gem" in the path.
Oh wow... OK. I'll try that when I can. Thanks! Would be better to keep them on the same distribution they're already using.
I tried and It works in Purr Data only in my old 10.9, not on my new 10.14 MacOs system (The lib load but some errors at gemwin's screen creation
[gemmacoswindow]: unable to switch to current window (do you have one?), cannot render!