Texts in Matrix ?
Hi,
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 (https://cycling74.com/tutorials/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...
Jan
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.
Thanks again
Stéphan
the coll could also to the complete job:
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.
Hi,
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.