Sometimes pure data is really doing my head in and feels so counterintuitive
At the leftt there are three message boxes "-" "kick" and "hat " ..in Pure data world these are are (implicit)symbols.
The select module however does not identify these because there is NO symbol selector , this feels so counter intuitive .
When sending a list through a list store and retrieve the individual elements , a symbol selector is automatically added since the select module accepts these
-
Symbols explicit
-
@porres Couple of things SuperCollider can do that Pd cannot:
-
Dynamically add DSP glitch-free -- this is central to my musical practice, actually, the idea that I can load up an instrument at any time and already-running audio will continue without a break. In Pd, loading a big audio file can glitch the audio so you need a workflow where everything is laid out in advance and that's just what you're working with. Understood that one of the benefits on the Pd side is a tighter timing model, but that comes at a cost of less flexible improvise-ability.
-
In SC, I implemented a live-coding dialect and I can safely say, the kinds of string manipulation that this requires are beyond the practical limits of Pd. You can convert a symbol to a list of ASCII bytes but the state-machine iteration over the source string IMO exceeds the threshold of what's practical to do in graphical patching (and that's not even mentioning regex matching, which I use extensively). It's not impossible but it would be so complex in patching that anyone who wanted to do it would be advised to just write the parser in Lua and embed into the patch. Don't even try; Pd does not have the string tools.
That second point is related to the fact that graphical patching is not at all well adapted to traditional comp-sci types of tasks. If it were better than coding, computer scientists would have adopted it. But it's (sorry) objectively clumsier at if-then-else and looping. Like, if you put a hundred Pd users in a room and asked them to make a for loop with an index, a majority wouldn't be able to (not really their fault, because nobody really teaches how to write a for loop) and of those who could, you'd get all unique solutions with varying degrees of efficiency. That's just a basic for loop. In SC, there's ".do" -- there are things I'll try to do in SC because basics like this (or recursion, or early-exit from a loop) are more straightforward; I would never, ever attempt some of those in Pd (and it's hard to express the depth of that feeling -- incidentally I did implement a classical priority heap algorithm in Pd, and that was ok because it's just a
while
, but I could have done it faster in SC -- except I wouldn't have to because SC already has a PriorityQueue).
I also think many media artists don't need all the CS stuff, and that's fine, Pd is an easier way in.
hjh
-
-
@oid said:
No, it is just a message, to be a symbol it would need the symbol selector.
Torres says:
Yes, it is a symbol, hence, it is the selector of the message, so "c3 d3 e3" is a message whose selector is "c3" and the actual message is "d3 e3".I wrote :
The message c3 f3 a3 , the first selector is c3 and thus this message is an implicit symbol , correct ?So It's not implicit but c3 is a symbol .
@toress
Why would I bring this up , because this is the topic for it , no ?
And because I am writng my note notation/ rests like this : c3---f#4---g3--- ,
edit : can't (yet ) get the multiquote to work . -
@gentleclockdivider said:
So It's not implicit but c3 is a symbol .
c3 is a symbol, the message type is not a symbol, not implicitly a symbol message type. The type of message is 'c3', the actual message is 'd3 e3', so this 'c3' message has two arguments: 'd3' and 'e3'.
I bring this up , because this is the topic
I meant I didn't understand the confusion about it.
-
@porres said:
The "set" IS the selector. What you refer as a "method" is if the object understands that message selector. So it means it has a function (or "method") to deal with it. If it does not, it will say "no method for set", but it can also say "no method for symbol/float/bang", so it's the same for the special selectors as is with any other general selector.
And that is what I was missing, the old terse documentation which I learned from made it seem like selectors were essentially types and methods had nothing to do with selectors but the reality is that any valid selector has a corresponding method, that any object which accepts the float selector also has a corresponding float method? To put it into pd terms, a [f ] is essentially this on the inside:
If I understand this correctly, what a selector actually selects is the method for its arguments? If so I think this is why section 2.4.1 comes off as overly technical to me, it never tells us what a method is and how selectors relate to methods but it and pd's help files and pd's errors assume we will just understand this relation; for many of the seasoned programmers coming to pd this is probably a safe assumption but pd attracts a wide range right down to those who have no programming experience and for them it is quite abstract. -
@porres said:
I guess this subpatch that I referenced to earlier has more examples and makes things clearer?
Well, that's in "Fig. 2.4.2 Different selectors", so I put there as well in the manual, so I wonder what is not clear about all this.
-
@oid said:
any object which accepts the float selector also has a corresponding float method?
yup, which is the function that deals with it, and float, symbol, bang, list and pointer are special methods, with predefined macros to add them, others have to be specified manually. Check the source code of any object, it'll be clear.
it never tells us what a method is and how selectors relate to methods
that section does not, and the manual doesn't say much about it other than one mere usage of the term. I agree we could have some more and I could add that... it's nice to better explain what the "no method" error is... but hey, this is not being "overly technical", on the contrary, mentioning about "method" here could be arguably an unnecessary technicality in that subsection.
-
@ddw_music I hear a lot about what SC can do that Pd can't, but that was not the discussion, far from it, as it was actually about how Pd is so much more complicated, or one might say complex, when I think it is not at all the case
and sure, SC being more complex and complicated should give people something in exchange of that steep learning curve.
Not for me though.
I don't care for live coding, for instance. I never needed scripting in Pd as well. Having said that, I'd love to be challenged in offering a "pd solution" to some of its things.
You know, I stole a lot from SuperCollider into ELSE, I'm interested.
In Pd, loading a big audio file can glitch the audio so you need a workflow where everything is laid out in advance and that's just what you're working with
This can be solved with an external, and [else/sfload] can load big files without choking Pd by having a multi-thread mechanism.
that's not even mentioning regex matching
MAX has a [regex[ object and I thought about having something like that as an external, I just never needed, but I just see that you can offer some alternatives with externals.
Don't even try; Pd does not have the string tools.
let me try, I wanna have a better idea of what you mean
if you put a hundred Pd users in a room and asked them
to make a for loop with an index, a majority wouldn't be
able to (not really their fault, because nobody really teaches
how to write a for loop)Did you really run that test though?
and well, not sure if I know what you mean, because if it's what I think, it this seems like a pretty basic lesson for Pd. It's on the control examples, I have it in my tutorial, tell people to check them
I always teach my students. It's a pretty simple operation and task. ELSE also has the [loop] object...
-
@porres said:
so I wonder what is not clear about all this.
It is a tricky thing to explain when your audience includes everything from complete layman to accomplished programmers. I can see now that it is all there and have been studying it and a few other sections trying to figure out what tripped me up and I think it is just a minor structural and terminology issues. What a selector is and does should be covered in the first paragraph instead of being split out between the first and fourth. This is the main thing the user needs to understand in this section and it should be laid out up front so anytime they refer back to this section it gets beaten into our heads. Maybe something like this?
Messages contain a selector followed by any number of arguments. The receiver of a message uses the selector to 'select' how it should proceed and handle any arguments. Selectors can be any valid symbol and arguments are anything that follows the selector and may be symbols or numbers (aka atoms). For instance "list a b c" has a "list" selector, which tells the receiver to process the arguments "a b c" as a list data type. This message is only composed of symbols but a list message can combine two or more symbols and/or floats.
You are right about keeping methods out of this section, the detailed explanation including methods should be in 2.7.3 which is almost there, just needs a few things like methods added in and probably simple definitions of things like object, class and method in context of pd. Maybe a reference to 2.7.3 in 2.4.1, "this will be covered in more depth in 2.7.3" or the like? The rest seems good to me.
I really hate doing documentation.
-
@oid said:
I really hate doing documentation.
It's not easy and sometimes it's quite the nightmare. I don't know why I like it
-
@porres said:
@ddw_music I hear a lot about what SC can do that Pd can't, but that was not the discussion...
Sure, I was hijacking a bit.
I don't care for live coding, for instance. I never needed scripting in Pd as well. Having said that, I'd love to be challenged in offering a "pd solution" to some of its things.
It's not that Pd can't necessarily -- it's rather that the weight is heavier:
anArray.do { |item| ... some operations... }
vsA concrete weakness of patching is when you have a stateful object that needs to be accessed in multiple places. In a text language, this object lives in a variable, and you can use the variable anywhere in its scope. The best I can figure out for Pd is:
It's "ok" but with a bit more effort. And this effort is kind of the point -- if enough things are just a little bit more difficult, then the "it's not worth it" threshold is lower. Like, I've got a function in SC that takes an array of intervals, a root scale degree and a top-note scale degree, and it does a recursive tree search to find the most consonant (relative to the root) arrangement of those intervals coming down from the top note. In SC I get recursion and scale-degree mapping for free, making it a lot more approachable to implement (where in Pd, I'd have to implement my own recursion stack and at least search for an external for scale degrees).
You know, I stole a lot from SuperCollider into ELSE, I'm interested.
I saw that -- [resonant~] vs Ringz.ar is what tipped me off.
In Pd, loading a big audio file can glitch the audio so you need a workflow where everything is laid out in advance and that's just what you're working with
This can be solved with an external, and [else/sfload] can load big files without choking Pd by having a multi-thread mechanism.
Feature request for sfload: provide file statistics (sample rate, number of frames etc.) upon completion. If the file read is asynchronous, currently you have no way to know when it's done and no way to get access to these properties.
More serious for Pd, though, is that adding signal processors causes the entire graph to be re-sorted, and this can glitch. So if I add a poly instrument with 15 copies of a big synth, I wouldn't trust doing that on the fly.
let me try, I wanna have a better idea of what you mean
Maybe in a different thread... more than I can write up just at the moment.
Did you really run that test though?
and well, not sure if I know what you mean, because if it's what I think, it this seems like a pretty basic lesson for Pd. It's on the control examples...
Of course I haven't... sure, I could be wrong. But it does come up from time to time on the forum, without referring to the control examples.
hjh
-
@ddw_music said:
anArray.do { |item| ... some operations... } vs
Well, if you're gonna use Vanilla objects, live's definitely gonna be harder, but I say life's too short to stick with Vanilla. Being someone who is about to reach 600 objects in his library soon, you may assume what my view is. Pd with just the vanilla objects is simply not a complete set of tools for computer music, nor enough... I don't doubt that. Pd Vanilla is simply the bare minimum at best. But even so, you can build a list iteration object with your patch above just fine and use it as an object. Or use [else/iterate]
and [else/loop] like I said....
A concrete weakness of patching is when you have a
stateful object that needs to be accessed in multiple places.I don't think I know what you mean here, really. How is this not like using [value]? Or the "send" message to "float". Anyway, I bet one can think of an external solution for this. I'd like to try it if I get it. I also think of [else/retrieve]...
Anyway, your examples are not clear to me, but the discussion interest me. I wanna get what is deal with recursiveness, for instance, but hey, we're hijacking the thread
Feature request for sfload: provide file statistics
(sample rate, number of frames etc.) upon completion.new version already does that
I wouldn't trust doing that on the fly.
no, Pd is not for Live Coding (something else i don't care for)
Maybe in a different thread...
sure, go ahead please
-
@ddw_music said:
The best I can figure out for Pd is:
In that situation I would say that [pd my-stateful-thing] should have a send method. But [value] is also good if floats, if symbols/lists then an abstraction which works the same as value but holds any sort of data is trivial, probably some externals which do that as well.
Regarding your live-coding dialect, would be curious to see it if you shared it anywhere. Not much for live-coding but it would be interesting/informative to see how you went about things. Most of what I do in pd is designing languages, it is not so bad but you have to go about things differently than you would in other languages, instead of designing a dialect of pd I design a language including the audio generation aspects, SC style server/client or a VM. Pd is a low level language and you need to treat it as such, work to its strengths instead of fight its weaknesses.