This probably fits into the category of a wish for PD; I think there's no way to do it currently, but I'd love to be proven wrong!
I'd like to be able to change the data an array points to rather than actually change the data in the array. The scenario which me think of this is, I'd like to have a display of a currently-selected waveform (which could be one of many pre-allocated arrays). It would be wonderful to have a level of indirection where the display-array can be given a new address [object reference?] to one of the various pre-allocated arrays, after which it redraws itself.
I suppose this unleashes all the evils of pointers (multiple references to memory, etc.), but it would a serious advantage, performance-wise, for the scenario I'm envisioning.
I also think it would be very cool if arrays could act as buttons...but that's a different subject.
Phil Stone pkstonemusic.com
I've wanted to do this too -- for instance, to have a large collection of arrays and a window that could "see" one of them at a time to edit them.
It's a bit complicated to do it because every array would have to maintain a dynamic collection of pointers to every window (there could be meny) in which it was shown... unless there's a cool trick I haven't thought of yet.
cheers Miller
On Sat, Dec 08, 2007 at 12:26:23PM -0800, Phil Stone wrote:
This probably fits into the category of a wish for PD; I think there's no way to do it currently, but I'd love to be proven wrong!
I'd like to be able to change the data an array points to rather than actually change the data in the array. The scenario which me think of this is, I'd like to have a display of a currently-selected waveform (which could be one of many pre-allocated arrays). It would be wonderful to have a level of indirection where the display-array can be given a new address [object reference?] to one of the various pre-allocated arrays, after which it redraws itself.
I suppose this unleashes all the evils of pointers (multiple references to memory, etc.), but it would a serious advantage, performance-wise, for the scenario I'm envisioning.
I also think it would be very cool if arrays could act as buttons...but that's a different subject.
Phil Stone pkstonemusic.com
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
It would be possible, if not CPU-efficient, to have them all hidden in table objects, and simply use tabread and tabwrite to copy them to the skeleton array when you want to switch. You would only need one tabread and tabwrite pair, just different ways to specify the target of tabread. I would envision binding the tab key to page through them.
But it is possible to put several arrays in one graph which makes me wonder if there might even be a pure GUI way to do it. Kind of makes me want to take a look...
-Chuckk
On Dec 8, 2007 10:26 PM, Phil Stone pkstone@ucdavis.edu wrote:
This probably fits into the category of a wish for PD; I think there's no way to do it currently, but I'd love to be proven wrong!
I'd like to be able to change the data an array points to rather than actually change the data in the array. The scenario which me think of this is, I'd like to have a display of a currently-selected waveform (which could be one of many pre-allocated arrays). It would be wonderful to have a level of indirection where the display-array can be given a new address [object reference?] to one of the various pre-allocated arrays, after which it redraws itself.
I suppose this unleashes all the evils of pointers (multiple references to memory, etc.), but it would a serious advantage, performance-wise, for the scenario I'm envisioning.
I also think it would be very cool if arrays could act as buttons...but that's a different subject.
Phil Stone pkstonemusic.com
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
This does not answer your question exactly, but remember you can use the [set( method of [tabread~] objects to change arrays.
On Sat, 08 Dec 2007 12:26:23 -0800 Phil Stone pkstone@ucdavis.edu wrote:
This probably fits into the category of a wish for PD; I think there's no way to do it currently, but I'd love to be proven wrong!
I'd like to be able to change the data an array points to rather than actually change the data in the array. The scenario which me think of this is, I'd like to have a display of a currently-selected waveform (which could be one of many pre-allocated arrays). It would be wonderful to have a level of indirection where the display-array can be given a new address [object reference?] to one of the various pre-allocated arrays, after which it redraws itself.
I suppose this unleashes all the evils of pointers (multiple references to memory, etc.), but it would a serious advantage, performance-wise, for the scenario I'm envisioning.
I also think it would be very cool if arrays could act as buttons...but that's a different subject.
Phil Stone pkstonemusic.com
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Andy,
I think what I'm asking for would be more like a [set( method on an array, to change the data it sees. Not a trivial thing, I know (especially if Miller has thought about it and not come up with a way to do it!)
Phil
Andy Farnell wrote:
This does not answer your question exactly, but remember you can use the [set( method of [tabread~] objects to change arrays.
On Sat, 08 Dec 2007 12:26:23 -0800 Phil Stone pkstone@ucdavis.edu wrote:
This probably fits into the category of a wish for PD; I think there's no way to do it currently, but I'd love to be proven wrong!
I'd like to be able to change the data an array points to rather than actually change the data in the array. The scenario which me think of this is, I'd like to have a display of a currently-selected waveform (which could be one of many pre-allocated arrays). It would be wonderful to have a level of indirection where the display-array can be given a new address [object reference?] to one of the various pre-allocated arrays, after which it redraws itself.
I suppose this unleashes all the evils of pointers (multiple references to memory, etc.), but it would a serious advantage, performance-wise, for the scenario I'm envisioning.
I also think it would be very cool if arrays could act as buttons...but that's a different subject.
Phil Stone pkstonemusic.com
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list