i'm trying to build a xy-control-patch using a data structure.
in the "pd struct" subpatch i use a [get] object (banged every ms by a metro) to get the actual coordinates (float a and float .
to limit the values that they fit to the window size, i feed those coordinates to the "pd set graph" patch and limit them with [min]/[max] objects before i feed them to the [set] object.
for sure, thats not a very elegant solution, because the metro triggers the whole procedure in ms-ticks and i have a feedback-loop.
my question: is there a better solution to limit the size of the polygon to the window size without the metro?
-
Xy-control
-
The object is called [grid], but this data structure looks neat. Don't know anything about structs though and would really like to get into them. Anyone know of any decent tutorials besides the one that comes with PD?
-
- 1
Dual 1.8 IBM G5: Mac OSX 10.4.11 -- Asus eeePC 701: Pure:Dyne / eeeXubuntu GNU/Linux -- myspace.com/thearifd
-
thanks for your comments!
yes, i know grid and it works fine so far, nevertheless, i wanted to create my own one, just for learning because i'm new to pd, and maybe not everyone has the [grid] object!?
@ saturno: i found it hard too, to find a simple tutorial for data structures but i found a very easy set of tutorials in german and english language here:
http://www.pd-tutorial.com/
theres also a chapter about data structures, short but informative! -
@ arif: what do you mean? how can i use 2 arrays as an xy-pad?
-
listen to the output of the [struct]. youl get output when the structure is changed.
-
that's it!!! thank you, pulsed!
-
Could you upload the modified patch toxonic?
thanks
-
of course, here it is........
still far from perfect, but works fine for me for the moment. -
Sorry, I just realised I was thinking about something else, and that the very point of your data structures are to create a GUI. The two array system does nothing but house the backend for a polysensitive xy grid
Dual 1.8 IBM G5: Mac OSX 10.4.11 -- Asus eeePC 701: Pure:Dyne / eeeXubuntu GNU/Linux -- myspace.com/thearifd