How to add a comma in a list?
Hi!
I want to create a list of numbers with MAX to copy it in a C code. I am using a multislider for that.
The values inside the list coming from the multislider object needs to be seperated by a comma... But how can I manage it?
I tried to add the ASCII value of a comma (44).. but unfortunately that doesnt work (look at my patch)
Any ideas?
Yours Brantiko
How about this?
regexp " " @substitute ", "
Hi!
Thank you, that looks good.. but I want to show the list in a textedit object because I need to copy the data out of max.
Illustrated in a textedit object the backslash is there again.. using a commentbox works without a backslash but there I cant copy the data.
BTW.. I am new at max and I have still problems dealing with the different datatypes like Lists,Symbols and stuff. Is there a tutorial dealing with it? Would be fine to know why different kind of objects show the same data in a different way..
Yours
Brantiko
sprintf %f, %f, %f
just write as many variables like this in the sprintf object as your multislider provides..
if you have ints instead of floats just substitute the f with i
Another problem with the regexp object is that it cuts of the list after 40 items? Why?
Hi Tobias!
The Number of variables is adjustable!
Thats why sprintf is not the very best solution.
then connect an iter to the left output of multislider, then a sprintf %f, - with the comma - then a zl group with an argument twice the value of your values in the multislider
you can always adjust the argument of zl group via its second inlet
As often I solved the problem without understanding it.
Using "append ," works.
This is great, thanks.
I'm just having some problems with longer lists and shorter times...