Texts in Matrix ?
I believe I well understand that a text (a string of characters) is viewed as a matrix of characters (ASCII).
But is it possible to create a matrix of texts (i.d. a matrix of matrix ?), where each location in the grid contains a matrix of characters (string of characters), like a word or a group of words?
Is any other solution to make this kind of "table of table".
My intent is to storage, in a matrix, these informations:
– first plane : word or group of words
– second plane : x position (of the word or group..)
– third plane : y position
– fourth plane : alpha
For now, I’m working with poly~ object, but it’s not the ideal..
Thanks a lot for any help and explanation.
If I understund you right, what you need is a so-called multidimentional array.
In theory a matrix can be seen as such an array.
Just the problem with a jitter matrix might be that for each cell and plane you can only store one numeric value. so depending on the length of the word you would need a variable amount of cells.
I get the feeling that this might become very complicated…
Depending on the execution speed you need maybe a sqLite database table would be more helpful (http://cycling74.com/2008/09/05/data-collection-building-databases-using-sqlite/)
Another idea that i havent thought throught in details:
You could use a matrix in wich you store the information x-position, y-position, alpha and only a number that is a reference to a entry in a [coll] object. This reference number you could use to read the word-group.
In that case you also can have a variable word length.
But there might be a slicker solution…
Thanks a lot, Jan, for your discernment in my problem.
Yes.. a "multidimentional array". That’s the expression I was looking for..
So. I don’t how sqLite database works.. And I’m quite afraid by this way..
Actually, I thought about the matrix+[coll]object solution. I’ve not tried yet, but it seems It will work for my project.
I’m going on, and maybe I’ll come back in the Forum to submit some propositions/problems.
the coll could also to the complete job:
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 798.3ocyX11aZCCDG+0oR86fUdMXYe9gDuMMo84XzUE.2R1HOnDyJcU669Nm TJPaIf5ZSP7fStXhO+i+2Ye4gKuHHbZwZacH4SjuSBBd.sDzXyaIXigfvrj0 yVlT2zwvb6cES+Y3nGulyt10X+lphr56ylVr7oqUl3lsHM+1qqrybsiBWKor QDgh4ahD9uA7XxUa9Q4qxRyWZcMiFeGqEqbuv7ME4t7jLaiG7spzjsCda2c2 WZaG4vvsiQ57le.NOFyC28dUm9mltyAJqw7eu7BeK1L5jIzrhrLat6kHpxlL m34DYVwxkjwesSRwXTgDT5HjPbAUxL36QncAEOOBf2B4Xm.41gNRYOhGxWFS tqJ0YIthFB0EdjBEUKk.n83IhJXwfJFwSqx5imLPORlePRVVtHoSdn4TilKi Q4hjqn7HEv3iHJIUFEy5EwB68GIY155jascOyApQnAIFbHLbphEy4nRnUHvi O3rF9vStHh+3IxShDNYRyIj5jrxk1IgXpBBnHB1mmTMIuKDBQLpAULRuLAIF DClH4SASCKC08Zf18iKKpScoEcBLAFVEIAiZ+fsXIUaPChdHZSzuIfVeRbAS ASALfTpGPvv6Uv3VfqW4C6JWTkT2YlJb9SMJdrTrOcL3xWZkT1CvALCRNZgR g4k4J+p0BCtjj..E+rHGMnFDh.3TGD.tf0Y2pVfdPHBWZnwBcLH7DA2vqJRo NO.Rz6OPNTYTqxKSl8KRMg4e0oBhwoQbH1iK7PtPn80JDada6+U9l30HRXpO u3dMuNDk84dg5FbBpViUN.6WYk.npgVow5Ok1wpvBX39piwJr7XRGgGq3FDS JiGS8n.6oOudA7GVWswdcxusyuF6LN2tNw4pRmtx09bOB1RsfPa1TayMtE1a n8NTu0CBWll+hGaRCA8W3Y+WTWrpZ1loyiOwAxNnats1klmzrypscxmxgv21 qEoymay2aA+rz4kEX31iNB4pCqPNYeyGjRDGy47k0LTNG+njSObNGbTmSMHN mOF4DzbOqW8E4XmhywGFmyW84YqyAmzeq7+aeya.a92BEGdK -----------end_max5_patcher-----------
ircam’s FTM could be really helpful for this – you can make matrices that contain anything in the cells – strings, floats, ints, dictionaries, other matrices, float matrices, note sequences – you name it. You can also have, for instance, dictionaries that contain tracks of time tagged matrices that have all this stuff in them – you get the idea :)
just watch out because some parts of it are not 100% thread safe – make sure you follow their guidelines or you can get crashes. Sometimes you can get crashes anyhow. And the syntax takes a little getting used to. But its super powerful stuff.
Here enclosed my first version of "Text Generator", built with [poly]+[jit.gl.text3d] method.
My intent is to fill all the screen (the window) with some pieces of text — each piece in a poly instance — and change randomly their alpha value, or change all the pieces displayed in the window.
The problem is that above some tens of instances the processor can’t follow… Besides, I have later to add to this "graphic" text generator a sound/voice generator.
I’m now going to try with [coll]+[matrix] method, without being sure that it will work better, and faster.
… Considering my patch, is there any better or speeder method ?
Thanks for any advice or help.
Forums > Beta