Re: [PD] Data structures: no object for freeing pointers?
I'd like one day to understand how to implement DS into a GOP, it's a bit triky, then on a single window it's possible to have the whole interface. I wrote something about it in a thread some weeks ago: http://lists.puredata.info/pipermail/pd-list/2013-05/102819.html it's not really possible to do this in the context we're talking about because we don't know which scalar is modified when it's embedded into an array, a way would be about using y value, but in this case y is always = 0 ah, you mean an element instead of a scalar (although they're all scalars when drawn). the only way I would remember now would be use the [struct] output to trigger a comparation of the previous array with the current one, saved as lists. not optimal at all, but it can work if there aren't too many elements. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Data structures: no object for freeing pointers?
Yes with visibility setting we can access an element of an array only, so each state can be stored, retrieved, replaced at will by accessing an element of te array... The matter is how accessing an element, idealy it would be a [nbx] where max value is the number of array elements, or a that's very easy, just get the number of elements from the array's pointer, and send it as [max $1( to the nbox (or whichever command defines the limits, I don't have Pd open). scalar but I don't how it's possible to fix limits to [drawnumber] I think not from the gui. Unless you enforce it programatically: route the change output from the [struct] in the template, and use it to force the maximum number to a [set] object. Like: [struct drawnumber...] | [route change] | [50( (assuming 50 is the current max number) | [set drawnumber...] In a parallel part, the current pointer gets and sets the maximum number of elements (now at 50) Look at the current help file for [drawnumber] for more details. De: João Pais jmmmp...@googlemail.com À: pd-list pd-list@iem.at, Patrice Colet colet.patr...@free.fr Envoyé: Jeudi 20 Juin 2013 11:09:26 Objet: Re: [PD] Data structures: no object for freeing pointers? One approach is to assign a variable for active/unactive scalars. And then use that variable to render the scalar visible/invisible. After a work session, the user can hide the active scalars, display the inactive ones, and select + delete these. It's still far from ideal, but a compromise. Envoyé: Mardi 11 Juin 2013 11:25:23 Objet: Re: [PD] Data structures: no object for freeing pointers? On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote: I've been building a sequencer with data structs. But now I've come to a dead end, because there seems to be no object, that let's you remove structs. The only way seems to be deleting them in the gui. It's still possible to put only one pointer and then arrays on it, then you can add or delete at the last array item, or it's possible to put an id at each array element and then remove the element id to delete, then it's possible to have undo's. pc ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Data structures: no object for freeing pointers?
Colet Patrice - Mail original - De: João Pais jmmmp...@googlemail.com À: pd-list pd-list@iem.at, Patrice Colet colet.patr...@free.fr Envoyé: Vendredi 21 Juin 2013 10:00:58 Objet: Re: [PD] Data structures: no object for freeing pointers? Yes with visibility setting we can access an element of an array only, so each state can be stored, retrieved, replaced at will by accessing an element of te array... The matter is how accessing an element, idealy it would be a [nbx] where max value is the number of array elements, or a that's very easy, just get the number of elements from the array's pointer, and send it as [max $1( to the nbox (or whichever command defines the limits, I don't have Pd open). Without opening pd I think it's something like range $1 $2 and that's what I'm doing when controlling DS from GOP, it seems the best way to go.. I'd like one day to understand how to implement DS into a GOP, it's a bit triky, then on a single window it's possible to have the whole interface. scalar but I don't how it's possible to fix limits to [drawnumber] I think not from the gui. Unless you enforce it programatically: route the change output from the [struct] in the template, and use it to force the maximum number to a [set] object. Like: [struct drawnumber...] | [route change] | [50( (assuming 50 is the current max number) | [set drawnumber...] In a parallel part, the current pointer gets and sets the maximum number of elements (now at 50) Look at the current help file for [drawnumber] for more details. it's not really possible to do this in the context we're talking about because we don't know which scalar is modified when it's embedded into an array, a way would be about using y value, but in this case y is always = 0 De: João Pais jmmmp...@googlemail.com À: pd-list pd-list@iem.at, Patrice Colet colet.patr...@free.fr Envoyé: Jeudi 20 Juin 2013 11:09:26 Objet: Re: [PD] Data structures: no object for freeing pointers? One approach is to assign a variable for active/unactive scalars. And then use that variable to render the scalar visible/invisible. After a work session, the user can hide the active scalars, display the inactive ones, and select + delete these. It's still far from ideal, but a compromise. Envoyé: Mardi 11 Juin 2013 11:25:23 Objet: Re: [PD] Data structures: no object for freeing pointers? On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote: I've been building a sequencer with data structs. But now I've come to a dead end, because there seems to be no object, that let's you remove structs. The only way seems to be deleting them in the gui. It's still possible to put only one pointer and then arrays on it, then you can add or delete at the last array item, or it's possible to put an id at each array element and then remove the element id to delete, then it's possible to have undo's. pc ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Data structures: no object for freeing pointers?
One approach is to assign a variable for active/unactive scalars. And then use that variable to render the scalar visible/invisible. After a work session, the user can hide the active scalars, display the inactive ones, and select + delete these. It's still far from ideal, but a compromise. Envoyé: Mardi 11 Juin 2013 11:25:23 Objet: Re: [PD] Data structures: no object for freeing pointers? On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote: I've been building a sequencer with data structs. But now I've come to a dead end, because there seems to be no object, that let's you remove structs. The only way seems to be deleting them in the gui. It's still possible to put only one pointer and then arrays on it, then you can add or delete at the last array item, or it's possible to put an id at each array element and then remove the element id to delete, then it's possible to have undo's. pc ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Data structures: no object for freeing pointers?
Yes with visibility setting we can access an element of an array only, so each state can be stored, retrieved, replaced at will by accessing an element of te array... The matter is how accessing an element, idealy it would be a [nbx] where max value is the number of array elements, or a scalar but I don't how it's possible to fix limits to [drawnumber] De: João Pais jmmmp...@googlemail.com À: pd-list pd-list@iem.at, Patrice Colet colet.patr...@free.fr Envoyé: Jeudi 20 Juin 2013 11:09:26 Objet: Re: [PD] Data structures: no object for freeing pointers? One approach is to assign a variable for active/unactive scalars. And then use that variable to render the scalar visible/invisible. After a work session, the user can hide the active scalars, display the inactive ones, and select + delete these. It's still far from ideal, but a compromise. Envoyé: Mardi 11 Juin 2013 11:25:23 Objet: Re: [PD] Data structures: no object for freeing pointers? On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote: I've been building a sequencer with data structs. But now I've come to a dead end, because there seems to be no object, that let's you remove structs. The only way seems to be deleting them in the gui. It's still possible to put only one pointer and then arrays on it, then you can add or delete at the last array item, or it's possible to put an id at each array element and then remove the element id to delete, then it's possible to have undo's. pc ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] Data structures: no object for freeing pointers?
I've been building a sequencer with data structs. But now I've come to a dead end, because there seems to be no object, that let's you remove structs. The only way seems to be deleting them in the gui. Am I missing something here? cheers, Jan ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Data structures: no object for freeing pointers?
On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote: I've been building a sequencer with data structs. But now I've come to a dead end, because there seems to be no object, that let's you remove structs. The only way seems to be deleting them in the gui. I think that is one of the limitations of data structures in Pd. You can clear a whole canvas, but not a single scalar, programmatically at least. The limitations of data structures have been discussed recently: http://lists.puredata.info/pipermail/pd-list/2013-05/102808.html a bit less recent post: http://lists.puredata.info/pipermail/pd-list/2011-04/088309.html Roman ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Data structures: no object for freeing pointers?
Envoyé: Mardi 11 Juin 2013 11:25:23 Objet: Re: [PD] Data structures: no object for freeing pointers? On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote: I've been building a sequencer with data structs. But now I've come to a dead end, because there seems to be no object, that let's you remove structs. The only way seems to be deleting them in the gui. It's still possible to put only one pointer and then arrays on it, then you can add or delete at the last array item, or it's possible to put an id at each array element and then remove the element id to delete, then it's possible to have undo's. pc ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Data structures: no object for freeing pointers?
I find the data structure deign extremely limited and have been thinking for years about how to make it more powerful. I have a rather weak idea about alowing deletion of individual items in lists that I'm planning to try out in the run-up to the next release - not that that can help you right now. (In addition to the manifold problems that others have noted I'll add more fundamental ones: fundamentally clunky pointer mechanism difficulty of making numerically accurate changes on visual data structures (except by escaping to a text represntation ala 'properties' :) cheers Miller On Tue, Jun 11, 2013 at 03:04:10PM +0200, Patrice Colet wrote: Envoyé: Mardi 11 Juin 2013 11:25:23 Objet: Re: [PD] Data structures: no object for freeing pointers? On Die, 2013-06-11 at 11:00 +0200, Jan Baumgart wrote: I've been building a sequencer with data structs. But now I've come to a dead end, because there seems to be no object, that let's you remove structs. The only way seems to be deleting them in the gui. It's still possible to put only one pointer and then arrays on it, then you can add or delete at the last array item, or it's possible to put an id at each array element and then remove the element id to delete, then it's possible to have undo's. pc ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list