Hi all
Finally an attempt to dive into data structures. I read Frank Barknecht's still excellent DS tutorial and, of course, section 4 of Pd's help written by Miller Puckette, which is a bit more demanding, but definitely very interesting. Though I can somewhat follow the simpler example patches, the fundamental concepts are still a bit nebulous.
Here's my problem. I found how to use [filledpolygon] to draw a rectangle whose width can be changed by mouse interaction. When using the same [struct] as the element of an array, I can draw many rectangles which can be grabbed and moved by the mouse (x-y-array). However, when it is used as an element, the ability to change the width dynamically with the mouse is lost. When it is not part of an array, it cannot be moved easily (without going into edit mode). How can I have both at the same time? Is it even possible at all?
Attached is an example that illustrates both cases.
Roman
Here's a quickly made approach that uses quanta syntax and checks for mouse manipulations from the outlet of [struct].
I wouldn't recommend spending too much time learning data structures. They are _extremely_ limited with the current implementation.
-Jonathan
----- Original Message ----- From: Roman Haefeli reduzent@gmail.com To: pd-list pd-list@iem.at Cc: Sent: Friday, May 24, 2013 6:15 PM Subject: [PD] first exercise with data structures
Hi all
Finally an attempt to dive into data structures. I read Frank Barknecht's still excellent DS tutorial and, of course, section 4 of Pd's help written by Miller Puckette, which is a bit more demanding, but definitely very interesting. Though I can somewhat follow the simpler example patches, the fundamental concepts are still a bit nebulous.
Here's my problem. I found how to use [filledpolygon] to draw a rectangle whose width can be changed by mouse interaction. When using the same [struct] as the element of an array, I can draw many rectangles which can be grabbed and moved by the mouse (x-y-array). However, when it is used as an element, the ability to change the width dynamically with the mouse is lost. When it is not part of an array, it cannot be moved easily (without going into edit mode). How can I have both at the same time? Is it even possible at all?
Attached is an example that illustrates both cases.
Roman
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
They are _extremely_ limited with the current implementation.
what do you mean by that?
cheers
2013/5/24 Jonathan Wilkes jancsika@yahoo.com
Here's a quickly made approach that uses quanta syntax and checks for mouse manipulations from the outlet of [struct].
I wouldn't recommend spending too much time learning data structures. They are _extremely_ limited with the current implementation.
-Jonathan
----- Original Message ----- From: Roman Haefeli reduzent@gmail.com To: pd-list pd-list@iem.at Cc: Sent: Friday, May 24, 2013 6:15 PM Subject: [PD] first exercise with data structures
Hi all
Finally an attempt to dive into data structures. I read Frank Barknecht's still excellent DS tutorial and, of course, section 4 of Pd's help written by Miller Puckette, which is a bit more demanding, but definitely very interesting. Though I can somewhat follow the simpler example patches, the fundamental concepts are still a bit nebulous.
Here's my problem. I found how to use [filledpolygon] to draw a rectangle whose width can be changed by mouse interaction. When using the same [struct] as the element of an array, I can draw many rectangles which can be grabbed and moved by the mouse (x-y-array). However, when it is used as an element, the ability to change the width dynamically with the mouse is lost. When it is not part of an array, it cannot be moved easily (without going into edit mode). How can I have both at the same time? Is it even possible at all?
Attached is an example that illustrates both cases.
Roman
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
From: Alexandre Torres Porres porres@gmail.com To: Jonathan Wilkes jancsika@yahoo.com Cc: Roman Haefeli reduzent@gmail.com; pd-list pd-list@iem.at Sent: Saturday, May 25, 2013 1:18 AM Subject: Re: [PD] first exercise with data structures
They are _extremely_ limited with the current implementation.
what do you mean by that?
or animations of any complexity
having flexible approach where you can save/retrieve state. (Unlike a "Put" menu array where you can get both)
array)
Usable for making a static score/diagram that will not be encapsulated inside an abstraction, and for array manipulations that don't require any drawing instructions. So _extremely_ limited.
-Jonathan
I see, limited, buggy, hard learning curve and no easy step by step tutorial included for beginners...
Not to mention it has been hardly used by the vast majority of users.
I'd like to know of any tutorials or good examples out there.
I've just started tweaking with it to see if I finally learn it, but it's crashing a lot!!! I'm just changing arguments in the struct object and it crashes... I clicl on GOP box and it crashes... things like that.
Also, it seems completely incomprehensible how to use them for display in a GOP subpatch or abstraction. I wonder how the hell can someone manage to do that and why is it so different than anything else on Pd?
I mean, if you check GOP, the data structuresI displayed just increase insanely in size, and in João's belzier patches, they are completely out of the red graph boundaries.
I'm pending to nevermind about getting myself involved with it indeed. But any guiding help is appreciated ;)
cheers
2013/5/25 Jonathan Wilkes jancsika@yahoo.com
*From:* Alexandre Torres Porres porres@gmail.com *To:* Jonathan Wilkes jancsika@yahoo.com *Cc:* Roman Haefeli reduzent@gmail.com; pd-list pd-list@iem.at *Sent:* Saturday, May 25, 2013 1:18 AM *Subject:* Re: [PD] first exercise with data structures
They are _extremely_ limited with the current implementation.
what do you mean by that?
- big resource hog-- you'll get dropouts with drawing instructions
or animations of any complexity
- you must choose between using $0 in struct name (for locality) or
having flexible approach where you can save/retrieve state. (Unlike a "Put" menu array where you can get both)
- no option to _not_ save ds state with the patch (Unlike a "Put" menu
array)
- buffer overflow when reading state from file
http://sourceforge.net/tracker/index.php?func=detail&aid=1469910&gro...
- cannot easily set hotspot for mouse manipulation
- hotspot bug
http://sourceforge.net/tracker/index.php?func=detail&aid=2457992&gro...
- flickering animation with arrays and/or lots of scalars on screen
- crashes with nested arrays when changing struct args
- many other problems
Usable for making a static score/diagram that will not be encapsulated inside an abstraction, and for array manipulations that don't require any drawing instructions. So _extremely_ limited.
-Jonathan
I've just started tweaking with it to see if I finally learn it, but it's crashing a lot!!! I'm just changing arguments in the struct object and it crashes... I clicl on GOP box and it crashes... things like that.
as someone told me, in this kind of data management it is kind of expected
to count that some memory problems can happen, if you're changing the
template too often, or in the wrong places. I don't know if it's true, but
from the issues data structures have, this is the one I usually try to
cope with.
Besides regular saving, one thing that usually helps, is to close the
display window when messing with the template. I also noticed that windows
is more stable then debian regarding data structures.
Also, it seems completely incomprehensible how to use them for display
in a GOP subpatch or abstraction. I wonder how the hell can someone manage to
do that and why is it so different than anything else on Pd?I mean, if you check GOP, the data structuresI displayed just increase insanely in size, and in João's belzier patches, they are completely out
of the red graph boundaries.
that patch is a bit complicated (and not super-efficient in the
implementation in some details) to be looking at. there are other patches
in my folder (and more coming) which have simpler concepts.
not sure if I can explain the GOP display correctly: the size in points
applies just like any other gui object, when looking from outside the gop.
And a nice detail is, as long as the "range" parameters are correct, when
you change the gop window size, the data structures rescale to it (in
contrary to a fixed-size gui object).
But when you open the patch inside, the scalars adjust to the size of the
subpatch canvas.
And to make matters more "logical", if you switch off the gop box, then
scalars inside the patch display correctly. Don't know how far this can be
considered a bug.
Anyway, if working with data structures inside gop, it's the view from
outside that counts.
Adding to that, the bug explained in the [bezier] help file: data
structures (or maybe all objects?) outside of the gop aren't clickable.
But they still work.
I'm pending to nevermind about getting myself involved with it indeed.
But any guiding help is appreciated ;)
keep trying, and make pressure for better implementations. the more we
are, there is more motivation for Puckette (and others?) to work on it.
João
----- Mail original -----
De: "Alexandre Torres Porres" porres@gmail.com
I've just started tweaking with it to see if I finally learn it, but it's crashing a lot!!! I'm just changing arguments in the struct object and it crashes... I clicl on GOP box and it crashes... things like that.
Every scalars have to be removed before modifying [struct] otherwise it crashes
----- Mail original -----
De: "Alexandre Torres Porres" porres@gmail.com
I've just started tweaking with it to see if I finally learn it, but it's crashing a lot!!! I'm just changing arguments in the struct object and it crashes... I clicl on GOP box and it crashes... things like that.
Every scalars have to be removed before modifying [struct] otherwise it
crashes
not exactly. sometimes Pd crashes when you change a template (specially if the scalars are being displayed), but that's not a thumb rule.
On 05/25/2013 03:01 AM, Jonathan Wilkes wrote:
- buffer overflow when reading state from file
http://sourceforge.net/tracker/index.php?func=detail&aid=1469910&gro...
AFAICT this bug does not affect either pd-l2ork or pd-extended, so unless it affects vanilla (which seems unlikely but I haven't checked), I would suggest closing this bug.
- cannot easily set hotspot for mouse manipulation
- hotspot bug
http://sourceforge.net/tracker/index.php?func=detail&aid=2457992&gro...
Confirmed in pd-l2ork. Will look into this next...
- flickering animation with arrays and/or lots of scalars on screen
- crashes with nested arrays when changing struct args
Can you send me example patches for these last two points? I would like to test them with pd-l2ork. Thanks!
On 05/26/2013 10:14 PM, Ivica Ico Bukvic wrote:
- cannot easily set hotspot for mouse manipulation
- hotspot bug
http://sourceforge.net/tracker/index.php?func=detail&aid=2457992&gro...
Confirmed in pd-l2ork. Will look into this next...
This has been fixed in the latest pd-l2ork git as well as nested arrays now have properly aligned selection hotspot/selection box (latter may require further testing for regressions). For more info on the bugfix (it's a bit messy as I had to spend some time learning how this part of the code works) see:
https://github.com/pd-l2ork/pd/commit/f0916f85a11894a43067d5b07ae5f8eea2b2c1...
Regarding sluggish scalars/structs, pd-l2ork already accelerates their displacement when editing and moving entire scalars around. I am still working on figuring out how to deal with struct selection and displacement at runtime.
- flickering animation with arrays and/or lots of scalars on screen
This is most likely due to scalars currently redrawing themselves every time you move something which becomes increasingly obvious when you have lots of stuff on screen.
- crashes with nested arrays when changing struct args
I've been experimenting with the patch provided in the bug report that has nested structs and no matter what I delete/change, I've not yet managed to crash pd-l2ork. If you find a way to do this, an example patch will be most appreciated.
Cheers!
P.S. Next pd-l2ork release is imminent with some really cool new features, like intelligent multi-connect and more accelerated operations (pddplink), as well as the usual bagful of bugfixes.
From: Ivica Ico Bukvic ico@vt.edu To: Jonathan Wilkes jancsika@yahoo.com Cc: "pd-list@iem.at" pd-list@iem.at Sent: Monday, May 27, 2013 3:32 PM Subject: Re: [PD] first exercise with data structures
I've been experimenting with the patch provided in the bug report that has nested structs and no matter what I delete/change, I've not yet managed to crash pd-l2ork. If you find a way to do this, an example patch will be most appreciated.
Do you have scalars existing while you delete/change structs and drawing instructions?
-Jonathan
On May 27, 2013 6:44 PM, "Jonathan Wilkes" jancsika@yahoo.com wrote:
From: Ivica Ico Bukvic ico@vt.edu To: Jonathan Wilkes jancsika@yahoo.com Cc: "pd-list@iem.at" pd-list@iem.at Sent: Monday, May 27, 2013 3:32 PM
Subject: Re: [PD] first exercise with data structures
I've been experimenting with the patch provided in the bug report that
has nested structs and no matter what I delete/change, I've not yet managed to crash pd-l2ork. If you find a way to do this, an example patch will be most appreciated.
Do you have scalars existing while you delete/change structs and drawing
instructions?
AFAICT yes. They appear and disappear as I edit struct properties/objects.
-Jonathan
I wouldn't recommend spending too much time learning data structures. They are _extremely_ limited with the current implementation.
too late, datastructure is really awsome for managing settings, the -v flag makes possible the coding of panels that is containing a lot of data... Is there a trick to copy data stored into a struct to an array element made with the same struct? I guess it should be possible to do it with textfile and some load/save messages, I'm actually doing it by using [get], [set] and [element], it a bit complicated... Would [sublist] simplify this task? How can we make list fields?
From: Patrice Colet colet.patrice@free.fr To: Jonathan Wilkes jancsika@yahoo.com Cc: PD List pd-list@iem.at Sent: Saturday, May 25, 2013 5:18 AM Subject: Re: [PD] first exercise with data structures
I wouldn't recommend spending too much time learning data structures. They are _extremely_ limited with the current implementation.
too late, datastructure is really awsome for managing settings, the -v flag makes possible the coding of panels that is containing a lot of data...
do you have a demo patch?
Is there a trick to copy data stored into a struct to an array element made with the same struct? I guess it should be possible to do it with textfile and some load/save messages, I'm actually doing it by using [get], [set] and [element], it a bit complicated... Would [sublist] simplify this task? How can we make list fields?
[sublist] is all but guaranteed to crash Pd.
-Jonathan
Colet Patrice
----- Mail original -----
De: "Jonathan Wilkes" jancsika@yahoo.com
too late, datastructure is really awsome for managing settings, the -v flag makes possible the coding of panels that is containing a lot of data...
do you have a demo patch?
I could work on it, what kind of data would this demo manage? I use DS for managing Gem.
--- Mail original -----
De: "Jonathan Wilkes" jancsika@yahoo.com
too late, datastructure is really awsome for managing settings, the -v flag makes possible the coding of panels that is containing a lot of data...
do you have a demo patch?
I could work on it, what kind of data would this demo manage? I use DS for managing Gem.
attached proposing to define a modular synth environment, there are only struct declarations for the moment
Colet Patrice
----- Mail original -----
De: "Jonathan Wilkes" jancsika@yahoo.com À: "Patrice Colet" colet.patrice@free.fr Cc: "PD List" pd-list@iem.at Envoyé: Samedi 25 Mai 2013 16:52:43 Objet: Re: [PD] first exercise with data structures
hello,
One template for setting an operator with a waveform and adsr, and another template using those operators as array elements, displayed for interfacing fm synthesis, I didn't leave any comment but it should show how datastructure are useful with the -v flag, and how it's not easy to copy scalars from a template to array elements.
From: Patrice Colet colet.patrice@free.fr To: Jonathan Wilkes jancsika@yahoo.com Cc: PD List pd-list@iem.at Sent: Saturday, May 25, 2013 5:18 AM Subject: Re: [PD] first exercise with data structures
I wouldn't recommend spending too much time learning data structures. They are _extremely_ limited with the current implementation.
too late, datastructure is really awsome for managing settings, the -v flag makes possible the coding of panels that is containing a lot of data...
do you have a demo patch?
On Fre, 2013-05-24 at 16:13 -0700, Jonathan Wilkes wrote:
Here's a quickly made approach that uses quanta syntax and checks for mouse manipulations from the outlet of [struct].
Thanks a lot. A lot of new stuff (for me) in your example.
I wouldn't recommend spending too much time learning data structures. They are _extremely_ limited with the current implementation.
I appreciate your advice. I have the impression one finds out about the limitations only by diving into data structures a bit more deeply. Although I haven't a clear picture yet what is possible and what is not, I find some of the examples in Millers documentation quite intriguing.
Roman
----- Original Message ----- From: Roman Haefeli reduzent@gmail.com To: pd-list pd-list@iem.at Cc: Sent: Friday, May 24, 2013 6:15 PM Subject: [PD] first exercise with data structures
Hi all
Finally an attempt to dive into data structures. I read Frank Barknecht's still excellent DS tutorial and, of course, section 4 of Pd's help written by Miller Puckette, which is a bit more demanding, but definitely very interesting. Though I can somewhat follow the simpler example patches, the fundamental concepts are still a bit nebulous.
Here's my problem. I found how to use [filledpolygon] to draw a rectangle whose width can be changed by mouse interaction. When using the same [struct] as the element of an array, I can draw many rectangles which can be grabbed and moved by the mouse (x-y-array). However, when it is used as an element, the ability to change the width dynamically with the mouse is lost. When it is not part of an array, it cannot be moved easily (without going into edit mode). How can I have both at the same time? Is it even possible at all?
Attached is an example that illustrates both cases.
Roman
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
jonathan already gave a smart reply to your question, using variable
variables as delimiters in your polygons, you can vary everything. If you
notice, in your first example you could vary the position of the
individual array elements (because you don't have a fixed x distance), but
you couldn't vary the position of the whole array - which wasn't necessary
for now, but I just wanted to remark that.
I would add only something to your [setsize bar_struct bar_array]
construct: in case you want to get a pointer of a specific template, use
the template's name as argument e.g. [pointer bar_struct], and route the
exit of the 2nd outlet to a [next(. That creates a loop that only stops
when you get your pointer. if you have several scalars of the same
template, adding a [get ...] to that loop makes it better (in case you
have a sort of identifier for each scalar).
A not-so-efficient-as-Jonathan's example of dynamic polygons can be seen
in my [jmmmp/bezier] abstraction (attached also the upcoming audio
version). Inside my folder are a couple other abstractions using data
structures (some new ones might appear only in the next pd-ext release).
I wouldn't say "don't bother with data structures", but rather "work a lot
with it and make pressure so that they get improved". besides Jonathan's
remarks, there are many other simple things that make life harder: lack of
methods for simple operations (select previous pointer, or previous/next X
pointers), math or expr functions inside of data-s templates (you need to
get the data and then set it again), can't delete scalars without using
the delete key or clearing the whole canvas, ...
many small things that make one patch a lot just to make simple operations.
and the biggest problem, rendering. don't even try to think of using
data-s for any high-rate GUI. for that better to look at GEM.
looking at Miller's words, data structures was one of the main reasons to
start Pd. after all this time, they didn't change that much.
very nice would be to have Ircam's FTM library implemented in Pd, but it
seems to be an impossible task, someone has tried already.
On Fre, 2013-05-24 at 16:13 -0700, Jonathan Wilkes wrote:
Here's a quickly made approach that uses quanta syntax and checks for mouse manipulations from the outlet of [struct].
Thanks a lot. A lot of new stuff (for me) in your example.
I wouldn't recommend spending too much time learning data structures. They are _extremely_ limited with the current implementation.
I appreciate your advice. I have the impression one finds out about the limitations only by diving into data structures a bit more deeply. Although I haven't a clear picture yet what is possible and what is not, I find some of the examples in Millers documentation quite intriguing.
Roman
----- Original Message ----- From: Roman Haefeli reduzent@gmail.com To: pd-list pd-list@iem.at Cc: Sent: Friday, May 24, 2013 6:15 PM Subject: [PD] first exercise with data structures
Hi all
Finally an attempt to dive into data structures. I read Frank Barknecht's still excellent DS tutorial and, of course, section 4 of Pd's help written by Miller Puckette, which is a bit more demanding, but definitely very interesting. Though I can somewhat follow the simpler example patches, the fundamental concepts are still a bit nebulous.
Here's my problem. I found how to use [filledpolygon] to draw a rectangle whose width can be changed by mouse interaction. When using the same [struct] as the element of an array, I can draw many rectangles which can be grabbed and moved by the mouse (x-y-array). However, when it is used as an element, the ability to change the width dynamically with the mouse is lost. When it is not part of an array, it cannot be moved easily (without going into edit mode). How can I have both at the same time? Is it even possible at all?
Attached is an example that illustrates both cases.
Roman
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
Thanks for sharing your mind on the topic.
Probably this has already been covered as a limitation and may I haven't really understood it. There is one thing troubling me at the moment.
From what I can see, you can easily get data out of your data structure.
And for what I am trying, editing data manually/per GUI is quite easy. But how to set data programmatically, i.e. by message? As you can only change a certain scalar by setting a pointer to it, the only way I see is to traverse all scalars until you find the one you want to change. Is this currently the only way to change a property of a particular scalar?
Roman
On Sam, 2013-05-25 at 12:13 +0200, João Pais wrote:
jonathan already gave a smart reply to your question, using variable
variables as delimiters in your polygons, you can vary everything. If you
notice, in your first example you could vary the position of the
individual array elements (because you don't have a fixed x distance), but
you couldn't vary the position of the whole array - which wasn't necessary
for now, but I just wanted to remark that.I would add only something to your [setsize bar_struct bar_array]
construct: in case you want to get a pointer of a specific template, use
the template's name as argument e.g. [pointer bar_struct], and route the
exit of the 2nd outlet to a [next(. That creates a loop that only stops
when you get your pointer. if you have several scalars of the same
template, adding a [get ...] to that loop makes it better (in case you
have a sort of identifier for each scalar).A not-so-efficient-as-Jonathan's example of dynamic polygons can be seen
in my [jmmmp/bezier] abstraction (attached also the upcoming audio
version). Inside my folder are a couple other abstractions using data
structures (some new ones might appear only in the next pd-ext release).I wouldn't say "don't bother with data structures", but rather "work a lot
with it and make pressure so that they get improved". besides Jonathan's
remarks, there are many other simple things that make life harder: lack of
methods for simple operations (select previous pointer, or previous/next X
pointers), math or expr functions inside of data-s templates (you need to
get the data and then set it again), can't delete scalars without using
the delete key or clearing the whole canvas, ... many small things that make one patch a lot just to make simple operations. and the biggest problem, rendering. don't even try to think of using
data-s for any high-rate GUI. for that better to look at GEM.looking at Miller's words, data structures was one of the main reasons to
start Pd. after all this time, they didn't change that much.very nice would be to have Ircam's FTM library implemented in Pd, but it
seems to be an impossible task, someone has tried already.On Fre, 2013-05-24 at 16:13 -0700, Jonathan Wilkes wrote:
Here's a quickly made approach that uses quanta syntax and checks for mouse manipulations from the outlet of [struct].
Thanks a lot. A lot of new stuff (for me) in your example.
I wouldn't recommend spending too much time learning data structures. They are _extremely_ limited with the current implementation.
I appreciate your advice. I have the impression one finds out about the limitations only by diving into data structures a bit more deeply. Although I haven't a clear picture yet what is possible and what is not, I find some of the examples in Millers documentation quite intriguing.
Roman
----- Original Message ----- From: Roman Haefeli reduzent@gmail.com To: pd-list pd-list@iem.at Cc: Sent: Friday, May 24, 2013 6:15 PM Subject: [PD] first exercise with data structures
Hi all
Finally an attempt to dive into data structures. I read Frank Barknecht's still excellent DS tutorial and, of course, section 4 of Pd's help written by Miller Puckette, which is a bit more demanding, but definitely very interesting. Though I can somewhat follow the simpler example patches, the fundamental concepts are still a bit nebulous.
Here's my problem. I found how to use [filledpolygon] to draw a rectangle whose width can be changed by mouse interaction. When using the same [struct] as the element of an array, I can draw many rectangles which can be grabbed and moved by the mouse (x-y-array). However, when it is used as an element, the ability to change the width dynamically with the mouse is lost. When it is not part of an array, it cannot be moved easily (without going into edit mode). How can I have both at the same time? Is it even possible at all?
Attached is an example that illustrates both cases.
Roman
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
Probably this has already been covered as a limitation and may I haven't really understood it. There is one thing troubling me at the moment. From what I can see, you can easily get data out of your data structure. And for what I am trying, editing data manually/per GUI is quite easy. But how to set data programmatically, i.e. by message? As you can only change a certain scalar by setting a pointer to it, the only way I see is to traverse all scalars until you find the one you want to change. Is this currently the only way to change a property of a particular scalar?
yes, you can only get or set data if you point to the relevant scalar.
clicking allows you to get a pointer (for any method you want), but if you
do everything with the program, you need to traverse until you get it
right.
for that I usually create an identifier (number, symbol, whatever) that I
use to confirm if I have the correct reference before editing it. the
method was explained in a previous mail.
I guess the way you get the relevant pointer will vary on the program,
difference contexts have different needs.
but the same happens when access/edit an element from a list or an array.
the program must know beforehand (by user interaction or by the program
itself) which element is relevant.
On Die, 2013-05-28 at 11:25 +0200, João Pais wrote:
Probably this has already been covered as a limitation and may I haven't really understood it. There is one thing troubling me at the moment. From what I can see, you can easily get data out of your data structure. And for what I am trying, editing data manually/per GUI is quite easy. But how to set data programmatically, i.e. by message? As you can only change a certain scalar by setting a pointer to it, the only way I see is to traverse all scalars until you find the one you want to change. Is this currently the only way to change a property of a particular scalar?
yes, you can only get or set data if you point to the relevant scalar.
clicking allows you to get a pointer (for any method you want), but if you
do everything with the program, you need to traverse until you get it
right. for that I usually create an identifier (number, symbol, whatever) that I
use to confirm if I have the correct reference before editing it. the
method was explained in a previous mail. I guess the way you get the relevant pointer will vary on the program,
difference contexts have different needs.
Yeah, it depends on the data. I'm currently working with a rectangular grid of scalars and I figured I can easily translate the scalar's coordinates to the right number of 'next' messages in order to move the pointer to the desired scalar.
Roman
Hey all
Thanks again for this thread. For those interested I attached a little sequencer abstraction I made with data structures based on some concept I learned here.
Roman
On Die, 2013-05-28 at 16:35 +0200, Roman Haefeli wrote:
On Die, 2013-05-28 at 11:25 +0200, João Pais wrote:
Probably this has already been covered as a limitation and may I haven't really understood it. There is one thing troubling me at the moment. From what I can see, you can easily get data out of your data structure. And for what I am trying, editing data manually/per GUI is quite easy. But how to set data programmatically, i.e. by message? As you can only change a certain scalar by setting a pointer to it, the only way I see is to traverse all scalars until you find the one you want to change. Is this currently the only way to change a property of a particular scalar?
yes, you can only get or set data if you point to the relevant scalar.
clicking allows you to get a pointer (for any method you want), but if you
do everything with the program, you need to traverse until you get it
right. for that I usually create an identifier (number, symbol, whatever) that I
use to confirm if I have the correct reference before editing it. the
method was explained in a previous mail. I guess the way you get the relevant pointer will vary on the program,
difference contexts have different needs.Yeah, it depends on the data. I'm currently working with a rectangular grid of scalars and I figured I can easily translate the scalar's coordinates to the right number of 'next' messages in order to move the pointer to the desired scalar.