[this mail was bounced, so it arrives a bit late to the thread]
Not sure if this makes sense, but:
- are you using data structures graphically, or just to store data? Once you have the model, are data structures really necessary anymore? Gem is much faster if you only need to show the data, but don't need the interaction. - [array]'s helpfile show how to get/set data from data structures. That could copy the data to normal arrays, so that they're accessed by [tabread~] - or see if Miller can add a -s flag to [tabread~] and similars, as it was done with [array]
jmmmp
Am Fr., 3. Jan. 2020 um 18:05 Uhr schrieb x nor x37v.alex@gmail.com:
This past week I've finally learned a bit more about data structures in PD and I've successfully created my own data structures that model data from ATS files (sines + noise analysis models). The re-synthesis ended up being a bit heavy because I didn't see a way to use tabread~/tabread4~ directly with arrays of complex data, so I patched some helpers that iterate the data structures and create float arrays from the fields as needed.
I'm wondering if I can replace this with an external that deals with these details internally so I have a few questions before I go down that road:
- I see that I can register "pointer" methods for externals.. my
structure has a field that stores an array that stores arrays of structs, can I expect to be able to get to that data in an external? Any examples? 2) If I am able to get to the data, can I mark it as 'used for dsp' somehow like i see you can do for garrays, and then use it within a dsp callback 'safely' or do i need to copy the data into separate float arrays to do that?.. maybe i should reorganize the data so that I don't have to do the copy, but if I end up creating a bunch of float arrays to model the data inside my data structure, can I then somehow treat it as a "garray" and mark it used in dsp and use it in my dsp method?
Thanks, Alex _______________________________________________ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
On Fri, Jan 3, 2020 at 4:13 PM João Pais jmmmpais@gmail.com wrote:
[this mail was bounced, so it arrives a bit late to the thread]
Not sure if this makes sense, but:
- are you using data structures graphically, or just to store data? Once
you have the model, are data structures really necessary anymore? Gem is much faster if you only need to show the data, but don't need the interaction.
I'm both storing data and showing it visually. I figured that is basically what data structures are for and was excited to finally have a reason to use them. I would eventually like to allow for interaction with the data. I do realize GEM is a possibility but, so many people seem to have trouble getting it working that it is tough to want to build new dependencies on GEM. It does turn out that I am actually converting the data from the datastructures into tables that I read into named arrays that I can read with [tabread~] though I am still using [get]... good though there on using [array get] !
Thanks!
- [array]'s helpfile show how to get/set data from data structures. That
could copy the data to normal arrays, so that they're accessed by [tabread~]
- or see if Miller can add a -s flag to [tabread~] and similars, as it was
done with [array]
jmmmp
Am Fr., 3. Jan. 2020 um 18:05 Uhr schrieb x nor x37v.alex@gmail.com:
This past week I've finally learned a bit more about data structures in PD and I've successfully created my own data structures that model data from ATS files (sines + noise analysis models). The re-synthesis ended up being a bit heavy because I didn't see a way to use tabread~/tabread4~ directly with arrays of complex data, so I patched some helpers that iterate the data structures and create float arrays from the fields as needed.
I'm wondering if I can replace this with an external that deals with these details internally so I have a few questions before I go down that road:
- I see that I can register "pointer" methods for externals.. my
structure has a field that stores an array that stores arrays of structs, can I expect to be able to get to that data in an external? Any examples? 2) If I am able to get to the data, can I mark it as 'used for dsp' somehow like i see you can do for garrays, and then use it within a dsp callback 'safely' or do i need to copy the data into separate float arrays to do that?.. maybe i should reorganize the data so that I don't have to do the copy, but if I end up creating a bunch of float arrays to model the data inside my data structure, can I then somehow treat it as a "garray" and mark it used in dsp and use it in my dsp method?
Thanks, Alex _______________________________________________ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
I do realize GEM is a possibility but, so many people seem to have trouble getting it working that it is tough to want to build new dependencies on GEM. It does turn out that I am actually converting the data from the datastructures into tables that I read into named arrays that I can read with [tabread~] though I am still using [get]... good though there on using [array get] !
not sure if gem is so problematic (I only use it sporadically) - there was a compatibility issue with 32b build on windows (which can kind of be solved), but maybe I'm not following what happens on other OSs. If you need to interact with scalars, then data-s would be helpful. Sometimes some bugs in tcl/tk happen, and pd has to be restarted.
(I have here a patch with more than 33548 scalars, and that window does take lots of time to open.)
On Sat, Jan 4, 2020 at 2:09 AM João Pais jmmmpais@gmail.com wrote:
I do realize GEM is a possibility but, so many people seem to have trouble
getting it working that it is tough to want to build new dependencies on GEM. It does turn out that I am actually converting the data from the datastructures into tables that I read into named arrays that I can read with [tabread~] though I am still using [get]... good though there on using [array get] !
not sure if gem is so problematic (I only use it sporadically) - there was a compatibility issue with 32b build on windows (which can kind of be solved), but maybe I'm not following what happens on other OSs. If you need to interact with scalars, then data-s would be helpful. Sometimes some bugs in tcl/tk happen, and pd has to be restarted.
(I have here a patch with more than 33548 scalars, and that window does take lots of time to open.)
Yeah.. my patch does have some issues locking up PD at this time.. the datastuct is quite complex and if I have the drawing window open when I create the ds then pd hangs for quite a while.. though once I do the initial draw opening and closing the window is quick... I do wish I could have more capabilities for manipulating the visualization without actually changing any data (zoom) which is something that would be pretty trivial with GEM.
-Alex
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
(I have here a patch with more than 33548 scalars, and that window does take lots of time to open.)
Yeah.. my patch does have some issues locking up PD at this time.. the datastuct is quite complex and if I have the drawing window open when I create the ds then pd hangs for quite a while.. though once I do the initial draw opening and closing the window is quick... I do wish I could have more capabilities for manipulating the visualization without actually changing any data (zoom) which is something that would be pretty trivial with GEM.
The complexity of the scalars isn't much an issue, more the quantity of elements is what brings tcl/tk down. I think the problem is there, and not really with the Pd core.
Zoom is also easy with donecanvasdialog or coords messages, although the speed doesn't change.
It also makes it faster and less prone to bugs to close the canvas while the scalars are being redone, then open it. Vis messages automatize that with no issues.
Joao