-
ddw_music
posted in technical issues • read more@playinmyblues said:
In my op, I provide what I used to install it but I think that was just for Ruby.
Actually not:
$ apt show gem ... skipped some stuff... Description: Graphics Environment for Multimedia - Pure Data librarySo it's definitely gem for pd.
I could not find the library anywhere on my Raspberry Pi...
I always forget this and I always have to do a google search for "linux apt list installed files," but:
$ dpkg -L gem ... long list of files, including a lot of them like this: /usr/lib/pd/extra/Gem/GEMglBegin-help.pd /usr/lib/pd/extra/Gem/GLdefine-help.pd /usr/lib/pd/extra/Gem/Gem-meta.pd /usr/lib/pd/extra/Gem/Gem.pd_linux... where I pasted these specifically because the last one, Gem.pd_linux, is the actual library that gets loaded when you
[declare -lib Gem].Then you can infer that
/usr/lib/pd/extra/Gemis the location to which the package is installed. (The point being that even in a command-line environment, there are ways to find out what was installed where. You might have to do some searching to find the commands. BTW I'm not using rpi now but its OS is based on debian, so these commands "should" be OK.)As I see it, there are just a few possibilities:
- (1) Maybe
sudo apt install gemdidn't install it properly. That seems unlikely (but, worth it toapt show gemto check the package metadata). - (2) Or, maybe
sudo apt install gemdid install it properly. That divides into a couple of sub-cases:- (2a) Maybe Pd can't find the package. If that's the case, then what I would do is: go to the pd path preferences and make sure
/usr/lib/pd/extrais in the list. Then [declare -lib Gem] should find it. - (2b) Or maybe the package is incompatible with RPi. In that case, everything would look right environmentally but the package simply wouldn't load.
- (2a) Maybe Pd can't find the package. If that's the case, then what I would do is: go to the pd path preferences and make sure
For 2a, everybody -- everybody -- gets tripped up on pd external loading. For me, the best strategy has been to keep the Pd "path" preferences as simple as possible --
/home/your_user_name/Documents/Pd/externalsfor user-specific externals, and maybe add/usr/lib/pd/extrafor systemwide packages -- and nothing else. Then the Gem/ root folder would go directly into one of these, e.g./usr/lib/pd/extra/Gem. I rigorously avoid putting externals in any other locations.Then, use a [declare] in the patch. [declare -lib Gem] tries
path ++ "/Gem"for each of the entries in your path preferences. If you have kept things in standardized locations, this will work.Maybe try this with a different external package first, one that is RPi compatible, to make sure that you understand the mechanics. (I've seen a lot of threads where people were haphazard about external installation and got tied up in knots. It's really worth some time to get it right, to be certain that this case can be ruled out.)
For 2b, if there is no pre-compiled package available for RPi, the only alternative is to compile it yourself, unfortunately. The
./configurescript should tell you if that's supported for your machine or not.sudo installs gem for you
Well, not exactly.
sudois "superuser do," which runs a command with elevated privileges so that, for instance, files can be installed in system executable locations that are normally write-protected.sudoitself doesn't install anything.sudo apt install gemwould install Gem.aptis the package manager -- this is the component that actually installs it.I mean, now I see what you were trying to say, but there were enough pieces left out of your comment that the meaning was unclear.
hjh
- (1) Maybe
-
ddw_music
posted in technical issues • read more@willblackhurst said:
I only ever got gem to work from sudo
With all due respect, but... whaaa? That's not how Gem runs.
If you install a VST plugin, you don't run it at the command line. It will never work that way. Gem is a Pd plugin. It can't run without a Pd host. Sudo isn't a Pd host.
the cia people dont even do anything someone else installs it for them
I'm at some pains to understand the relevance, but, oh-kay.
hjh
-
ddw_music
posted in technical issues • read more@lacuna said:.
Haven't tested but I think this works: clone [del] and [list store]
Oh yeah, that's a nice minimal solution.
I had made that tick-scheduler for PlugData DAW integration. If I hadn't, it would certainly be overkill for this problem.
hjh
-
ddw_music
posted in technical issues • read more@rewindForward said:
I'm not clear on what value "le+23" is meant to indicate.
Edit: crossed messages, didn't see the reply before sending mine...
It isn't le -- it's 1e.
Scientific notation is a way to write very large and very small numbers, with one digit to the left of the point, and then multiply by a power of 10. 123 in scientific notation would be 1.23x10^2; 123 million, 1.23x10^8. By convention, these are shortened to 1.23e+2 and 1.23e+8. 1.23e+2 is a bit silly, so a relatively small number like 123 is displayed without the exponent, but if you type 123000000 into an object box, Pd will show it as 1.23e+8.
1e+23 then is a 1 followed by 23 zeroes.
The vanilla way to do a comparator (as solipp and others pointed out) is to subtract the signals first. If a > b, then a - b > 0. To flatten "any number that's >0 (true) or <=0 (false)" into 1 or 0, you multiply by a very large number (such as 1 then 23 zeroes) and clip: [clip~ 0 1] gives you a binary result, or [clip~ -1 1] gives you +1 for a > b, -1 for a < b, or 0 for a == b. (There's a very narrow range of numbers where the multiplication result would be between -1 and +1, but it's extremely unlikely to hit. So we just ignore it.)
hjh
-
ddw_music
posted in technical issues • read more@FFW said:
The gui ping when you change the array values by mouse:
Only in Pd vanilla.
It would be better if a message specific to the array, index and value were emitted by something in the backend, rather than in the Tcl/Tk layer.
hjh
-
ddw_music
posted in technical issues • read more@Glop-Glop said:
I want to coordinate two arrays : tab24 which has 24 steps and tab_var which has 1, 2, 3, 4, 6 or 8 steps.
In a first time, I want to move the value of the 0 stept of tab_var graphically and report it on step 0 of tab24.
Does anyone have a solution without using a bang to let the value get out ?Basically... no. If there are any messages emitted by arrays when they're changed graphically, the documentation is so well hidden that I guess it doesn't exist.
The only way I can think of is to poll the array repeatedly.

I wouldn't call this a beautiful solution -- perhaps someone else knows some array messaging magic that I wasn't able to find.
hjh
-
ddw_music
posted in technical issues • read more@alexandros said:
Am I missing something, or the patch below isn't correct?
It's correct if you use the right outlet instead of the left outlet of threshold~.
supercollider in the early 2000s
SC person here!
ignored PD for the most part under an impression it lacked refinement
Just the other day, I already did the rant about how Pd's 1990s-style GUI gives people the wrong impression about its capabilities, and how PlugData is a good way forward that deserves more support... so I'll stop there.
Pd is solid. What's lacking in the built-in feature set is convenience. For example, if you load a soundfile... how long is it? What is its sample rate? In SC, you have BufFrames, BufDur, BufSampleRate, BufRateScale. Pd does spit this information out of soundfiler at the moment of loading, but if you didn't retain those values at that time, then they're gone. So with SC, I feel like it's more straightforward to get into it incrementally -- you're hacking away, and then you find that you need the buffer's sample rate, no problem! It's right there. In Pd, at minimum, you'll have to issue a dummy read command to soundfiler, and unpack the list.
I got annoyed enough about this that I created some abstractions to help deal with soundfiles: https://github.com/jamshark70/hjh-abs :

[monofile] and [stereofile] for basic reading. Mono files play by sf-play~ or sf-varispeed~; stereo by sf-play2~ and sf-varispeed2~. Rate = 1.0 is always the file's normal speed. Also it creates [value] vars for buffer stats, and I have a read-only [getvalue] abstraction to access them without risk of overwriting.
... Strictly speaking, you don't "need" these -- they're only using information that is available in vanilla anyway -- but I just don't think users should have to deal with these fiddly details routinely. So it's not a matter of lacking refinement, but rather that it takes more work to rearchitect features that you might take for granted in other platforms.
I suppose it depends on the task, but in most cases, I can get there faster in SC; the threshold of complexity that I'm willing to attempt in SC is higher than that in Pd. (I usually find patching to be more cumbersome than code.)
hjh
-
ddw_music
posted in technical issues • read more@_ish said:
- there used to be a random object that spit floats (randomF).
The ELSE library has [rand.f].
(I wish, when I started with Pd, that someone had pointed me to ELSE... a lot of the things that are missing from vanilla, or "build it yourself," are just there.)
- Earlier I was working on an array, and really wanted to send a bang every time it looped around to index 0. This feels like it should be really easy, but I couldn't think of anything that would send the active index step as out (the contents of the index step, sure, but not the step number itself).
Are you reading the array in the control or signal domain?
whale-av:
As in that link if using [phasor~] catching it's output as it passes 0 is unreliable because the value of [phasor~] will likely not be 0 as it is captured at a block boundary.
The value of phasor~ isn't reliable for this, but the two-point difference ([rzero~ 1]) is guaranteed to be positive most of the time, and negative only when the phasor jumps down. So this will always work (for a positive phasor~ frequency).

hjh
-
ddw_music
posted in technical issues • read more@ddw_music said:
At this point, there are a couple of differences from the classic Pd GUI. One is that the graph-on-parent area is locked to the top left corner -- origin is always (0, 0). That's a limitation, but not an outrageous one.
FWIW -- I rechecked and this is not true. You can move the top left corner by mouse.
@whale-av "Did I just lose an eyebrow?"

hjh
-
ddw_music
posted in technical issues • read more@_ish FWIW... in PlugData (a JUCE wrapper around Pd, which can run as a plugin or standalone), you can:
- Create a [pd something] box and open it for editing.
- Right-click in an empty area of the canvas --> Properties.
- Set "Is graph" = Yes.
At this point, there are a couple of differences from the classic Pd GUI. One is that the graph-on-parent area is locked to the top left corner -- origin is always (0, 0). That's a limitation, but not an outrageous one. The other is that you can grab the lower right corner and resize by mouse -- both in the subpatch window and in the parent window. (In the PlugData version installed on my machine, however, there is a UI inconsistency -- the canvas properties panel shows width and height, but the numbers here do not sync up with the size that you set by mouse -- in fact, they seem to have no effect at all. That's obviously a bug; I'll report it later.)
Should I do the rant? I kind of feel like doing the rant.
The classic Pd GUI was designed in the mid-90s, and it looks like it, and it acts like it. It's not going to improve. You'll get people on this forum telling you that it doesn't need to improve, because they've been using it for a long time and they're used to it. As an opinion, that's fair enough, but being used to it doesn't negate the observation that this GUI has been sleeping through three decades of UI standards development (and it contradicts those UI standards in some areas -- "no GOP resize by mouse" is one -- the weird behavior of entering edit mode after moving an object by mouse is another).
This GUI is holding Pd back. I've had students tell me, when they see the classic GUI, basically... "Uh. Just no." They won't touch it. They don't care that it's nice and comfy and familiar for old-guard users on the forum. For them, this is not how software is supposed to look.
PlugData is a much-needed shot in the arm, to keep Pd going for a few more decades and attract users who would otherwise look at the chunky black-and-white non-anti-aliased* UI (edit: I forgot about only monospaced fonts in object boxes!) and think, "Why are these people still stuck in 1996?"
* (IIRC Tcl/Tk line drawing is anti-aliased on Mac but it isn't on Windows or Linux. But even suggesting this really basic UI improvement can be controversial on this forum. Few years back, I saw someone on here say that anti-aliased diagonal lines are "too smudgy," preferring stair-stepped pixels because they're "sharp." If that's the climate, then the only way to bring Pd's UI into the modern era is for somebody just do it... which Timothy Schoen did.)
Speaking of being stuck in the 90s, I'll now say "flame suit on"

Anyway, do try PlugData. I use it routinely, pretty much only using the classic GUI if I found a bug and somebody asks, "Did you reproduce it in vanilla?"
hjh