Hallo, raul diaz hat gesagt: // raul diaz wrote:
I have made an abstraction for a table loop selection with data structure. That's the first I made with data structure, so I suposse there are some mistakes
There's a big mistake where you do the data subpatch traversal: There is no subpatch [pd 1_table] in your patch but still you try to do a [traverse pd-1_table(. Instead there is a [pd $1_table] subpatch. You should use something like
[symbol pd-$1_table] | [traverse $1(
instead, if you're using Pd 0.40, or
[symbol $1_table] | [makefilename pd-%s] | [traverse $1(
for older Pds.
and some things I would like to improve:
- I would like to limit init and end point rango between 0 and 100, that way
I could't drag either the init point down to 0 or the end point up to 100.
Check out the 09.scaling.pd help patch in the docs. You need to use a different syntax to paint, it looks something like this "x(0:100)(0:100)"
However for what you want to do, you need to change other parts of the patch as well and intruduce a "dummy-X"-coordinate. See attached patch.
- I don't know why I have two times the init and end markers (I only want
one init marker and another end marker)
Probably one was saved with the patch. If you clear the subpatch and put the markers on again, everything's fine.
- How can I modify either the init or end markers from an external value
(via receive)
You can send and receive pointers. Just get a pointer to one of the markers using for example traversal, then send that pointer somewhere, where you have a [set init x] object or so.
You can also store the received pointer in a [pointer] object, if you want to reuse it several times just like a [float] or [symbol].
Frank Barknecht _ ______footils.org_ __goto10.org__