On 3/22/21 3:47 PM, Csaba Láng wrote:
I try to make it simple without unicode, let's say.

What if I add [list $1 $2 $3 $4( to text3d where each $ is a word (max
number of $ is the amount of words in the longest sentence)
How can I achieve not to display 0 0 0 at the and of the list if number of
words are less than max number of words in the longest sentence.


i probably misunderstood your question as "how do I correctly print text that contains multiple consecutive spaces" instead of the trivial "i want to print multiple words".

if your only problem is to create a list of variable length, then this is pretty unrelated to both [netreceive]/telnet and [text3d]

checkout the help for [list prepend] and possibly [list split] (and generally of the [list] objects).

also, i fail to see why you can't just use the patch i so beautifully painted. why does it not work for you?


gdmfs
IOhannes


On Mon, Mar 22, 2021 at 3:25 PM IOhannes m zmoelnig <[email protected]> wrote:

On 3/22/21 2:52 PM, Csaba Láng wrote:
Iohannes,

can you explain how I can send unicodepoints to text3d?

using the [string( message (see the [text3d] help-patch)

e.g. [string 67 115 97 98 97 32 76 225 110 103(

the problem is mainly that what comes out of [netreceive -b] is not
going to be unicode-points but utf-8 encodings thereof.
this is where the unicode-library i mentioned earlier comes into play.

something like:

[declare -path unicode]

[netreceive -b 9999]
[select 10 13]
|     /      [append $1(
|    /       [s $0-store]
| __/
|/           [r $0-store]
[list   store]
|
[t a b]
|     [s $0-store]
|
[route bang]
             [utf82unicodenumber]
             [list prepend string]
             [list trim]
             |
             [text3d]

(the [s/r $0-store] is only to make the ascii-art nice; use proper
connections instead)

if you can use UDP instead of TCP, you can practically omit anything
between [select] and [route].

gfmadsr
IOhannes


_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management ->
https://lists.puredata.info/listinfo/pd-list



_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list




_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to