-
soundproofskin
I do find the help docs very useful while learning Pd, and a good reference when I forget what something does. It's refreshing not to have to Google everything like I would do if I was lerning something like Javascript, for example.
In this case though I couldn't find what I was looking for (a way to 'get' the ymax of an array) so I thought maybe I was overlooking something. With the help you have both given, the workaround is to set the properties of the local array and the array in the abstraction at the same time (the bang that does that also sends the data from the array in the main patch to the array in the abstraction at the same time).
This works well for new arrays, but is a bit clunky if I grab an array existing from somewhere that already has properties set - I have to check the existing properties, then reapply the properties via a message. It works, but being able to 'get' the ymax of an array so that it can be applied to another would mean not having to do that manual step each time.
-
soundproofskin
Thanks for the Pd extended info. I have a rough patch working now, thank you both for the help.
-
soundproofskin
Thanks for the explanation @oid, I think I get it now. The y axis functions slightly differently because the values of the data are the y axis size property in that respect.
What was/is confusing me is that, though modifying the size property clips the data on the x axis when there is overflow as you describe, and I see the array stretch and shrink visually, modifying the xmin and xmax has no visual effect on my array. I'm using Plugdata, I don't know if that would have something to do with it.
-
soundproofskin
Thanks for the replies @oid and @whale-av, I'm going to have a play with it again today and see if I can get that working.
In the help file, details for the "bounds" message are "bounds <list> - sets rectangle bounds (xmin, ymax, xmax, ymin)."
ymax and ymin are the ones that I'm looking for, but what do xmax and xmin do? I'm confused because the "size" property seems to set the amount of steps for the x axis. How are xmax/xmin and size related?
-
soundproofskin
Hello, I want to send an array (1) from my main patch, to another array (2) that is within an abstraction, replacing the contents of array 2 in the process.
I want the size and the range of array 1 to also overwrite those properties of array 2, so that I can drop an array of any size and range into the master patch.
I have so far managed to overwrite the size of array 2 using [array size array-1], which allows you to get and change the size of an array, but I cannot find the equivalent for the range property. The [array] object has a couple of arguments, 'min' and 'max' that I thought might help, but they get the min and max values from the data in the array, not the actual min and max range from the array properties.
Does anyone know if there is a way to get min and max range properties from an array, and then set those properties to another?