I've created an array with a size of 50 data points. I'm using a tabwrite object to send it new values.
When I right-click on the array and choose Properties, I get a dialog box (Canvas Properties) in which I can set the X range and Y range. I have set the Y range from 120 to 20. Yet when I send values outside of this range to the array, the canvas cheerfully draws the data points outside of the box. The object does not limit the input values to the specified range.
Is this user error on my part, or are the array object's Y boundary parameters just ignored by Pd?
--Jim Aikin
As you're able to draw outside of the array you're obviously able to tabwrite outside it. To help yourself in this case I would limit the input to the [tabwrite] object. [moses] does that trick. If you set the argument to 20 every number up to 20 goes to the left outlet, 20 and above to the right one, so you're not going to use that outlet.
/numberbox] (ctrl/cmd 3) (or whatever input of floats) | [moses 20] | [tabwrite your_array]
They aren't ignored-- you're creating a new range for the visible area of the graph. It's just that there is no way to restrict the values to stay inside the boundaries of the graph. This can be helpful sometimes, like visualizing an audio signal that hasn't been scaled to lie between 1 and -1.
However, you can restrict the values of an array when you use data structures-- so maybe "Put" menu arrays should have an option to do this as well.
-Jonathan
From: Jim Aikin midiguru23@sbcglobal.net To: pd-list@iem.at Sent: Sun, June 6, 2010 11:28:23 PM Subject: [PD] Question About Arrays
I've created an array with a size of 50 data points. I'm using a tabwrite object to send it new values.
When I right-click on the array and choose Properties, I get a dialog box (Canvas Properties) in which I can set the X range and Y range. I have set the Y range from 120 to 20. Yet when I send values outside of this range to the array, the canvas cheerfully draws the data points outside of the box. The object does not limit the input values to the specified range.
Is this user error on my part, or are the array object's Y boundary parameters just ignored by Pd?
--Jim Aikin
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
(.. and now for the whole list:)
maybe "Put" menu arrays should have an option to do this as well.
I agree on that! I once built a sequencer controlled by arrays in which I could draw amplitude-envelopes in realtime. I wasn't able to limit it to zero.
However, the array object (which I doubt is in one of the extended libraries) is not shown in the flossmanual list of objects.
As far as I know arrays are not objects but GUI representations of tables, so there's no object help-file for it, except for the object [table].
There is a page on arrays, graphs, and tables. But it doesn't mention the idea of clipping the values within an array, which I have now been reminded is done by processing the input value using a moses.
That's a pity. I agree that it's sometimes hard to figure things out. I never read, except for today, thanks to Jonathan, that clipping arrays is not possible within the properties menu, but I thought so because I couldn't get it clipping.
to filter out of bound values, someone suggested [moses]. I prefer
[split], because moses drops values out of range, and split replaces them
with the maximum range. if you sent 50 values, with split you get 50
values, with moses you get the values only between x and y.
However, you can restrict the values of an array when you use data
structures-- so maybe "Put" menu arrays should have an option to do this as well.
I've written a version of an array with step values and limits, using data
structures. I could send it to the list, but I would need some time to
isolate the code from the main patch.
I've written a version of an array with step values and limits, using data
structures. I could send it to >the list, but I would need some time to isolate the code from the main patch. That would be interesting João! Another possibility is turning that into a direct external, that does the work internally. (I'm assuming you did an abstraction... "because you said isolate it from the main patch" - if not, even better!)
Best regards, Pedro
On Mon, Jun 7, 2010 at 2:39 PM, João Pais jmmmpais@googlemail.com wrote:
to filter out of bound values, someone suggested [moses]. I prefer [split], because moses drops values out of range, and split replaces them with the maximum range. if you sent 50 values, with split you get 50 values, with moses you get the values only between x and y.
However, you can restrict the values of an array when you use data
structures-- so maybe "Put" menu arrays should have an option to do this as well.
I've written a version of an array with step values and limits, using data structures. I could send it to the list, but I would need some time to isolate the code from the main patch.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I've written a version of an array with step values and limits, using
datastructures. I could send it to >the list, but I would need some time to isolate the code from the main patch. That would be interesting João! Another possibility is turning that into
a direct external, that does the work internally. (I'm assuming you did an abstraction... "because you said isolate it from the main patch" - if
not, even better!)
turning that into an external is maybe not efficient - it would better to
add these features to the already existing array object.
yes, it would be an abstraction. it isn't in my patch, but can easily turn
into one. I'm very busy now, if I find the time I'll make an abstraction
out of it.
turning that into an external is maybe not efficient - it would better to
add these features to the >already existing array object. I meant, altering the existing array into a new bounded_array object, or whatever name suits better. The difference is it would be a compiled object and not an abstraction.
best regards, Pedro
On Mon, Jun 7, 2010 at 3:26 PM, João Pais jmmmpais@googlemail.com wrote:
I've written a version of an array with step values and limits, using data
structures. I could send it to >the list, but I would need some time to isolate the code from the main patch. That would be interesting João! Another possibility is turning that into a direct external, that does the work internally. (I'm assuming you did an abstraction... "because you said isolate it from the main patch" - if not, even better!)
turning that into an external is maybe not efficient - it would better to add these features to the already existing array object.
yes, it would be an abstraction. it isn't in my patch, but can easily turn into one. I'm very busy now, if I find the time I'll make an abstraction out of it.