Author |
Message |
lglima

Joined: Mar 05, 2007 Posts: 6 Location: Brazil
|
Posted: Mon Mar 05, 2007 6:16 pm Post subject:
string concatenation ! |
 |
|
Hi People... I am a new user and i would like to know about more chuck language. So, i read the language specification, but i can see nothing about string concatenations. i am developing a automata synthesis and i need use string concatenation .. Is it possible ? Can you help me ?? Thanks |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Mon Mar 05, 2007 7:35 pm Post subject:
|
 |
|
Hi, Iglima!
Welcome to ChucK! As a friendly reminder; Please be aware that our little ChucK section is a part of a much larger forum on all sorts of electronic music related things and that posting ChucK questions outside of our little area isn't of much use and will probably just confuse people.
Right, now that we got that out of the way, proper string management is on our wishlist so it's still to be implemented. Often we can get by with some trickery -for now-. Why don't you give a rough outline of the thing you'd like to do? _________________ Kassen |
|
Back to top
|
|
 |
kijjaz

Joined: Sep 20, 2004 Posts: 765 Location: bangkok, thailand
Audio files: 4
|
Posted: Tue Mar 06, 2007 2:28 pm Post subject:
|
 |
|
hmm.. i'm hoping to see more string operation & function in chuck very soon.
Iglima: can you implement your model by using integers?
maybe we can test it with integers right now.
i'm waiting the next season of chuck to come out also : )
fight fight Ge~ |
|
Back to top
|
|
 |
lglima

Joined: Mar 05, 2007 Posts: 6 Location: Brazil
|
Posted: Tue Mar 06, 2007 4:51 pm Post subject:
|
 |
|
Yes.. i must implement with integers.. I will wait a new version with string concatenation...
Thanks a lot
Luis Guilherme |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Tue Mar 06, 2007 8:02 pm Post subject:
|
 |
|
I'm not sure we'll see string management in the very next version because Ge said it depends on garbage collection which is taking some time to implement.
In the meantime; you *can* get quite advanced with arrays if you put some thought in it. For example; you could create a class consisting of a array (a very large one) and some functions for operations on it for -say- inserting elements or adding ones at the "end". You'd use a seperate integer to indicate the "end" instead of the .cap the real .cap of the arrray would be made large enough for any conceivable end result. Won't that do for now? _________________ Kassen |
|
Back to top
|
|
 |
lglima

Joined: Mar 05, 2007 Posts: 6 Location: Brazil
|
Posted: Wed Mar 07, 2007 5:27 am Post subject:
With arrays of int |
 |
|
Hello,
the last night, i create one class called IntegerToBinArray. you send a integer as parameter for a Convert(int number) Method that convert a int into array of bin with 8 positions. I used a bitwise and Shift operator for computation. If you will want see the code please send me a message. Thank you,
Luis Guilherme |
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Wed Mar 07, 2007 2:05 pm Post subject:
|
 |
|
Interesting aproach!
If I understand it correctly you now want to use these arrays for Wolfram-style celular automata? _________________ Kassen |
|
Back to top
|
|
 |
lglima

Joined: Mar 05, 2007 Posts: 6 Location: Brazil
|
Posted: Wed Mar 07, 2007 3:43 pm Post subject:
|
 |
|
Yes Kassen, I have implement Cellular automata using Wolfram rules with others programming languages like Matlab and C#. in matlab, i produced a very interesting sound synthesis with Cellular automata. but I did not get resulted in real time. Therefore, i am trying to migrate for the language chuck.
Thanks,
Luis Guilherme (Lglima) |
|
Back to top
|
|
 |
|