Awesome, many thanks @jancsika :
In the meantime, you should be able to choose "Help" -> "Open DevTools",
Nice, Chome developer console -- was looking for that as soon as I read Chromium, but could not otherwise find it
Btw, it is called "Help" -> "Show DevTools" in my PurrData 2.15.2
Oops, I forgot about the CSS styling and fonts. Let me investigate.
Yup, just tried it myself, fonts on [cnv] canvas seem fine, but not on regular objects; also some extension objects, and also abstractions, are rendered fully black. Also connector lines are missing.
Thanks for looking into this!
I'm aware this is an old thread, also for Linux, but just wanted to remark on this:
the -font-size command line startup flag does absolutely nothing on any system I've tried it on. Doesn't matter what size I set it to high or low it still loads the same default size.
I kind of noticed something similar, Purr Data 2.15.2 on Windows 10. I tried calling it with
pd.exe -font-face 50 -font-face "Consolas"
... and indeed, whatever old patch I opened, still had the old font size .... However, if I did Ctrl-N for a new patch, then Ctrl-1 to place an object, then start typing - then that font is indeed large ... So, it is possible that font size gets saved with the object in a .pd file.
However, my problem now is, that the
-font-facenever gets honored (font face remains the same, no matter what I use for
I am aware that there exists https://github.com/iem-projects/patch2svg-plugin :
This adds a new menu-item to the "File" menu: "Save patch as SVG..."
It allows you to save the current Pd patch as an SVG graphics.
... which is exactly what I need - but for Purr Data. Since
patch2svgis a TCL script for vanilla PD, and (https://agraef.github.io/purr-data-intro/Purr-Data-Intro.html mentions:
... it seems, I can't really use
patch2svgfor Purr Data.
Then again, Purr Data should already be drawing everything in SVG, it seems, - so it seems there should be a way for it to save the patch canvas as SVG natively; but I cannot see an obvious way to do it ...
I can print to PDF from Purr Data, and then convert that to SVG using inkscape - but in that case all texts become "curves"/"paths", and are not editable as texts ...
So, I was wondering - is there a way to export a patch in Purr Data as an SVG vector image (and preferably, with text information present)?
I would like to have a slider, which I can set up to be in range, say, from 0 to 255, which will be integer. I used the vsl slider ( https://puredata.info/docs/developer/PdFileFormat#r364 ), and that one produces float values, but I can have an
[int]box after that, and I get integers - that is fine.
However, depending on the size of the slider, sometimes the finest motion I can do with the mouse, results in jumps of more than 1 count - and the
vslslider seems to not react on arrow key presses.
So, I would like to have the possibility to "nudge" or "step" the slider in a defined increment of 1, using the arrow keys; for instance, if you try this in HTML:
<input type="range" id="my_slider" name="my_slider" min="0" max="255" step="1" />
.... then the resulting slider can be selected with a click, and then one can press the Arrow Left/Right (or Up/Down) keys, and the slider will increment/decrement the current value for the step (here 1).
Is there anything like that - maybe an external - in PD?
it's a Deken-package.
Deken is build-in PD-vanilla: search & install packages easily
Thanks for the explanation - was not aware of that!
Could anyone post a screenshot of the helpfile, please?
I saw you found it - but still, for reference, here is how it looks for me:
Thanks again @lacuna - great to have that thread as reference!
Just tried it for a bit: I cannot seem to find any binary releases in the github, https://github.com/mganss/pdjs (EDIT: found them https://github.com/mganss/pdjs/releases )- so I went along with this:
I don't really understand what this
.dekfile is supposed to be, but the page itself says it is a zip file, so I tried this (I use MSYS2
bashshell in Windows):
$ wget http://puredata.info/Members/mganss/software/pdjs/1.2.63/pdjs%5Bv1.2.63%5D%28Darwin-amd64-32%29%28Linux-amd64-32%29%28Linux-arm64-32%29%28Windows-amd64-32%29.dek/at_download/file -O pdjs_v1.2.63.dek $ unzip pdjs_v1.2.63.dek Archive: pdjs_v1.2.63.dek inflating: pdjs/js.dll inflating: pdjs/js.l_arm64 inflating: pdjs/js.pd_darwin inflating: pdjs/js-help.pd inflating: pdjs/js.pd_linux inflating: pdjs/js-help.js
nice, now I have a pdjs folder; so I tried copying it to my 32-bit copy of PurrData:
$ mv pdjs /c/bin/PurrData_x86_2.15.2/extra/ $ /c/bin/PurrData_x86_2.15.2/bin/pd.exe -verbose
Here, in an empty patch, I place an object
[pdjs/js test.js](see also the note in the Github README about
declare -path pdjs); and I get:
... tried C:\\Program Files (x86)\\Common Files\\Pd-l2ork\\pdjs\\js\\pdjs\\js.pd and failed tried C:\\bin\\PurrData_x86_2.15.2\\extra\\pdjs\\js.m_i386 and failed tried C:\\bin\\PurrData_x86_2.15.2\\extra\\pdjs\\js.dll and succeeded verbose( 1):C:\\bin\\PurrData_x86_2.15.2\\extra\\pdjs\\js.dll: couldn't load tried C:\\bin\\PurrData_x86_2.15.2\\extra\\pdjs\\js.pd and failed tried C:\\bin\\PurrData_x86_2.15.2\\extra\\pdjs\\js.pat and failed tried C:\\bin\\PurrData_x86_2.15.2\\extra\\pdjs\\js\\pdjs\\js.pd and failed error: couldn't create "pdjs/js test.js" ...
Hmmm... library got found, but is not loaded; then I thought, let's check:
$ file /c/bin/PurrData_x86_2.15.2/bin/pd.exe /c/bin/PurrData_x86_2.15.2/bin/pd.exe: PE32 executable (GUI) Intel 80386 (stripped to external PDB), for MS Windows $ file /c/bin/PurrData_x86_2.15.2/extra/pdjs/js.dll /c/bin/PurrData_x86_2.15.2/extra/pdjs/js.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows
Yeah - I cannot load a 64-bit .dll by a 32-bit .exe!
So, apparently, there is no 32-bit build for
pdjs(see "Supported platforms" in the Github README), so I installed the 64-bit build of Purr Data ... and tried it there:
$ cp -a /c/bin/PurrData_x86_2.15.2/extra/pdjs /c/bin/PurrData_x86_64_2.15.2/extra/ $ /c/bin/PurrData_x86_64_2.15.2/bin/pd.exe -verbose
... and finally, could see it working - instantiating
[pdjs/js test.js]gives messages:
... tried C:\\bin\\PurrData_x86_64_2.15.2\\extra\\pdjs\\js.m_i386 and failed tried C:\\bin\\PurrData_x86_64_2.15.2\\extra\\pdjs\\js.dll and succeeded pdjs version 1.2.63 (v8 version 8.6.395.24) tried C:\\bin\\PurrData_x86_2.15.2\\test.js and failed tried C:\\Users\\user\\AppData\\Roaming\\Pd-l2ork\\test.js and failed tried C:\\Program Files\\Common Files\\Pd-l2ork\\test.js and failed tried C:\\bin\\PurrData_x86_64_2.15.2\\extra\\test.js and failed error: Script file 'test.js' not found. ... click the link above to track it down, or click the 'Find Last Error' item in the Edit menu. error: couldn't create "pdjs/js test.js"
One invocation that works for quick test is
[pdjs/js pdjs/js-help.js], which succeeds - and then you can right-click the object and see the Help.
Finally, note this from the README:
There is no built-in editor like in Max, source files have to be created and edited outside of Pure Data.
Well, this is nice! On to see how to work with this object...
Thanks again for the help!
Thanks so much for the answer, @lacuna:
pdjs lib should run in Purr Data, doesn't it?
I had no idea it existed - I just wrote
pdjsin the OP as an "example pseudocode" - NICE!
Is this the link to
pdjsis not included with latest PurrData, but I'll try to install from the above link - hopefully it works ...
Back in the days, I was aware of the following:
(via https://newcome.wordpress.com/2013/12/29/scripting-pure-data/ ; https://forum.pdpatchrepo.info/topic/9650/best-way-to-write-code-in-pd):
pyext( http://puredata.info/Members/thomas/py/ ) - allows using the Python language to define/implement a Pure Data object
pdlua- ( https://github.com/agraef/pd-lua ) allows using the Lua language to define/implement a Pure Data object
pdj( http://puredata.info/downloads/pdj ) - "PDJ enables you to write java code to interact with pure-data objects"
I have tried these in latest Purr Data on Windows -
pdluais still there; however, no trace of
[pdjs myscript.js]object)? Just to specify, I do not really need to do audio-rate calculations with this, only control-rate calculations of data on inlets ...
Thanks in advance for any answers!
Meh, I should have thought of this earlier - the fix is just to use
[set $1(, to update the value but not trigger a bang/message on the output:
For a while I've wanted to have "synchronized" toggles, so that say I could have two of them, maybe one in top left of the patch window - and the other in the bottom right of the patch window, where I might be doing some work; and in case the window is large, then from the position of bottom right it would be a bit tedious and scroll to top left each time I wanted to click the button. In this kind of situation, I'd expect only one (say, the top left) to have its outlet connected to an actual object - the other would be there just to ease the working process.
So basically, it would be "either/or" pair - if I toggle one button on, the other turns on too; if I then toggle the other off, the first one turns of too.
Of course, if you just try to do the most trivial implementation of this:
... that is, outlet of one into inlet of other, and vice versa - and then you click either one, - PD will either crash/segfault, or you'll get a "stack overflow" message; since in this case, a recursive update loop happens.
So is there another method to allow for such "synchronized" buttons, without ending up in a recursive loop, and potentially crashing PD? Also, I could image synchronized number boxes to be useful, too...