Hello,
I've been in need of such trick lately you might be interested about it.
The following mail exposes a method using gridflow
http://lists.puredata.info/pipermail/pd-list/2010-06/080330.html
hascinna
On Tue, 27 Jul 2010, patko wrote:
I've been in need of such trick lately you might be interested about it. The following mail exposes a method using gridflow http://lists.puredata.info/pipermail/pd-list/2010-06/080330.html
BTW, that's a number-only solution, for fixed-width lists. Also, for non-integer numbers, a small change must be made in order to prevent casting to int.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
Thank you very much Patrice and Mathieu!
There are a couple of things though that are not clear to me:
http://lists.puredata.info/pipermail/pd-list/2010-06/080331.html
However, in my case I know only the number of columns (4), but the number for the other dimension cannot be fixed in advance (it could be, but I'd like it to calculate it with list-length/4 and then generate automatically the right grid). I tried to do [import ($1 4)] but it didn't work. Is there a way to do it?
how to use them in a grid.
before), I'm curious to know if there's another way of getting the same result using other objects: coll would be perfect, but it doesn't accept floating point numbers...
Thanks a lot,
Libero
On Tue, Jul 27, 2010 at 7:13 PM, Mathieu Bouchard matju@artengine.ca wrote:
On Tue, 27 Jul 2010, patko wrote:
I've been in need of such trick lately you might be interested about it. The following mail exposes a method using gridflow http://lists.puredata.info/pipermail/pd-list/2010-06/080330.html
BTW, that's a number-only solution, for fixed-width lists. Also, for non-integer numbers, a small change must be made in order to prevent casting to int.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
On Wed, 28 Jul 2010, Libero Mureddu wrote:
There are a couple of things though that are not clear to me:
sorry, I believe I forgot to answer some parts of this.
However, in my case I know only the number of columns (4), but the number for the other dimension cannot be fixed in advance (it could be, but I'd like it to calculate it with list-length/4 and then generate automatically the right grid). I tried to do [import ($1 4)] but it didn't work. Is there a way to do it?
For strange reasons, the open-parenthesis has to be separated from the "$1" so that the "$1" is replaced by its real value (even with pd version 40, which introduced $ elsewhere than at the beginning of a symbol). I don't understand why. Anyway, you just have to insert a space there.
But you can also change it dynamically by sending a list in the right inlet.
- Actually, I'm using non-integer numbers, but I cannot understand
how to use them in a grid.
You can only use them in literal forms that also explicitly state the size of the grid. Thus if you have "2 3 5 7", this can be written more explicitly as "4 # 2 3 5 7" (which means: a single-dimension grid of four values, which are 2 3 5 7). Then such a notation is an occasion to say that you want floats : "4 f # 2 3 5 7".
If you don't state that, GridFlow has to assume that you want ints, because that's the most traditional type in GridFlow and there is no way to differentiate number types in Pd itself, so GridFlow had to provide its own notation and its own choice of a default type.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801