-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
suggestion to add an object like [canvasinfo] from purr data in vanilla #273
Comments
I don't really care abbout that many features, mostly "args" and "dir", in which I designed two externals myself that take care of that |
I would also find the "args" and "dir" functionality helpful as well as "name" (but I'd see no reason to exclude any of the apparent functionality of [canvasinfo], not so familiar with the object though). Another potential source of inspiration for canvas-oriented functionality would be the iemguts library which has [canvasargs], [canvasconnections], [canvasdollarzero], [canvaserror], [canvasindex], [canvasname]. [canvasobjectposition], [canvasposition], [canvasselect], [receivecanvas]. It looks like [canvasargs], [canvasdollarzero], [canvasindex], [canvasname], and [canvasposition] have similar functionality to [canvasinfo] (but the latter looks to be simply a "getter" and not a "setter" at least for name which is perhaps safer). |
it'd be silly to have an object with the same name and less functionalities, indeed, but my point was that it could be a different object with different functionalities and a different name - like, it could be just [canvas] (as discussed in #150) |
I back that especially because the |args( method is a must. Currently the only vanilla solutions to get the argument list is either using a tricky exploit + dynamic patch routine or actually passing everything in a single symbol, like arg1/arg2/arg3, and then splitting it into a list using [list fromsymbol/tosymbol]. But this is not compliant with PD's standard syntax! One thing a miss from [namecanvas] is a selector. If you send |args( to it i would like it to prepend "args" to the list of arguments. So one would be able to use something like [route args dir toplevel] to easily send the information to the right place. On a side note: I see [namecanvas] on the "obsolete" (i'm reading deprecated) list of pd's object list so |name( might be a substitute, but i'm not sure. I like the ability to pass a canvas' name as an argument to an abstraction, like |namecanvas $0-this] [someAbstraction $0-this ] It allows me to send |map 0, map 1( from the abstraction to the parent. It is useful in cases where the abstraction change it's graph-on-parent values during execution and need to tell the parent to update the canvas. |
you can also do things like that with an external, ask for the arguments of a parent patch |
Yes but you can't pass them as abstraction arguments with [canvasinfo]. You must pass them through an inlet. Yet i still think [canvasinfo] is still desireable, of course. |
No, you don't need to pass them via an inlet. You can ask the object to give you the arguments of a parent patch, that is what I meant to say |
Oh, i see. I've missed that. Still beeing able to have the $@ expansion would allow you to do things like the following: Take for example this abstraction to perform operations on two [value] objects: You pass the operator as an argument and it is instantiated with That case works because you know the operator is a "list of size 1". But let's say the user wants to pass a variable size object. Let's say you want the user to be able to pass to the abstraction a "[drawpolygon] lamba". That means the user might call
By having a Using a something like |
how would you imagine that to work? |
The But if you want a subset of the arguments and you know which subset it is you can just do something like this
The problem is that you would not be able to mix both aproaches.
Something like this. So, let's say you want to pass 4 arguments to an abstraction and after that a variable number of arguments that are going to be a [drawpolygon] object. You could have some objects using the first 4 arguments as normal and then an box with the new syntax for reading the rest of the arguments:
And instantiate it like
|
btw the |
Totally missed it in extended. Oh, the .patch was created in 2006! Why it wasn't included in vanilla? |
@porres which version of Pd-extended is this? |
42-5, is it on the last one (43)? |
ok, I see, yes it is, and I also totally missed that too!!! |
Well, since you mentioned this was from a decade ago (actually from 2006 according to henri) and was in Extended for ages I assumed it should have been in 42-5... well, this is mind blowing! I also wonder why it didn't make into vanilla. But anyway, this is a suggestion for an object maybe a discussion for $@ could be carried in another issue ;) |
I'm closing this since I don't think we should port this object from Purr Data and because I'm working on a new object from scratch. |
It could be a simple adoption of that object or a newly designed one with a different name and features.
For a previous discussion about it, see #150
The text was updated successfully, but these errors were encountered: