Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Isadora: Feature Requests:
lanBox, serial, OSC, audio

 

 


jhoepffner
User

Oct 14, 2007, 7:06 AM

Post #1 of 16 (3615 views)
Shortcut
lanBox, serial, OSC, audio Can't Post

Mark,
I come another time for my request concerning serial. A better implementation, able to send a group of character, to concatanate it before sending, and also receive serial with bytes and number, not only recognise a chain. Same thing for OSC with the possibility to send and receive not only number but also text (without add a tag), and also properly edit the OSC tag.
Concerning lanbox, I am intersted to send order for cue calling for a specific layer. I do that through max/msp (via OSC) for the moment but it is a little bit heavy.

I turn around the new audio possibility with coreAudio, but I am still searching the way to use audio entries. We need a mode of use.

Than you

Jacques


Mark Coniglio
TroikaTronix / Moderator

Oct 24, 2007, 2:31 AM

Post #2 of 16 (3494 views)
Shortcut
Re: [jhoepffner] lanBox, serial, OSC, audio [In reply to] Can't Post

I almost have an improved Send Serial actor completed. It will be released soon. But I am not sure what you mean about the Serial Input.. what exactly won't it do? It's quite flexible.

Regarding OSC, I have plans to work on the sending and receiving of strings. What do you mean "property edit the OSC tag?"

Finally regarding the LanBox, I think to do what you are requesting requires a TCP/IP connection to the LanBox. This is a bit of a big step, because Isadora has only UDP implementation, not UDP. But what about talking to the LanBox with a serial input/output. This should allow you to do the same things, though perhaps it is just a little less convenient with serial.

Best Wishes,
mark

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Mark Coniglio / TroikaTronix
Creator of Isadora


jhoepffner
User

Oct 24, 2007, 6:14 AM

Post #3 of 16 (3486 views)
Shortcut
Re: [Mark Coniglio] lanBox, serial, OSC, audio [In reply to] Can't Post

Mark,
Thank you for your answer.
Serial input : the problem is you can see if a serial received message matchs a predifenid message. So if you want to receive the 1023 possible values for a sensor coming from arduino, you need 1023 serial input watcher to read it… (I know I can do best with using binaries values, still needing 10 actors). It would be great to have a numerical output from the actor, like I do in Max with "select 10 13 / zl group 4 /itoa /fromsymbol". Yes it's flexible but not very easy to use.

OSC : good news for string, when I say "property edit th OSC tag" is the same problem in many input, that you have to rewrtite all the input, whan you use many osc tag with just one word or one number changing, it can be boring. I ask for the possibility to place the cursor inside the number/text, and to use copy/paste. useful for OSC tag but also ip number and all recursive and long input.

LanBox : I am not sure it use TCP/IP, because the max patch I made use only the UDP possibilities of max, perhaps a collaboratio with lanbox would open the way. The last lanbox (lcx), don't have serial connexion.

Last week, during the workshop in Mons, many was very impressed by the isadora/lanbox possibilities, a way to explore.

Best wishes,
Jacques


jhoepffner
User

Oct 24, 2007, 7:15 AM

Post #4 of 16 (3480 views)
Shortcut
Re: [jhoepffner] lanBox, serial, OSC, audio [In reply to] Can't Post

Mark,

I am just exploring serial input and there is perhaps more thinks to do with it … I inform you about the result.

Jacques


jhoepffner
User

Oct 25, 2007, 5:36 AM

Post #5 of 16 (3464 views)
Shortcut
Re: [jhoepffner] lanBox, serial, OSC, audio [In reply to] Can't Post

Mark,
I work all night to figure how to use serial actors in Isadora. I am searching a solution because I will give a second Isadora workshop next week in Mons and another one concerning specifically Isadora and Arduino the following week. I want to avoid the use of Max/Msp for beginner.

Unfortunately, rereading a cipriani message, I se that it is not possible to receive integer with not fixed length, but perhaps you will have a solution.

1 in Arduino, I use a program to read 2 analog ins and send the value by serial, with a letter tag or each value (0 to 1023):

int Sensor0 = 0; // first analog sensor
int Sensor1 = 0; // second analog sensor
int Sensor2 = 0; // digital sensor
int inByte = 0; // incoming serial byte

void setup()
{
Serial.begin(9600);
}

void loop()
{
Serial.print("a");
Sensor0 = analogRead(0);
Serial.println(Sensor0);
delay(10);
Serial.print("b");
Sensor1 = analogRead(1);
Serial.println(Sensor1);
delay(10);
}

In Max, I can separate each send with carriage return (sel 10 13), make a 5 number list (zl group 5), separate the different tag (route 97 98 99 100 101 102 103 104), make a 4 number list (zl group 4), and with (itoa) and fromsymbol, I have a number with value from 0 to 1023. After I have to separate value before and after 127 (/ 127) and (%127), send it with 2 ControlChange to Isadora, in Isadora i do the inverse operation and I have the value.

Any suggestion for a easier operation, without max?

I have a similar problem to send values from Isadora to a stepper motor, good when I use Max, not usable directly.

I join you the 3 patch (Isadora, Max and Arduino) in the two way, can you take a look?

If we can solve that, many persons are interested, for performances and installations.

Thanks a lot,

Jacques
Attachments: EnvoiIsadora.zip (7.29 KB)


nick
User

Oct 26, 2007, 2:45 AM

Post #6 of 16 (3450 views)
Shortcut
Re: [jhoepffner] lanBox, serial, OSC, audio [In reply to] Can't Post

Will it make any difference if you pack the numbers in arduino so that you send 0001 rather than 1 (you could do a quick test program in arduino that sends a variety of values to see if its a goer - eg send 0001, 0034, 0456, 1027 to see if it works, and then figure out how to creat those in arduino form the sensor readings if it does.

HTH
Cheers

Nick


jhoepffner
User

Oct 26, 2007, 8:16 AM

Post #7 of 16 (3446 views)
Shortcut
Re: [nick] lanBox, serial, OSC, audio [In reply to] Can't Post

What do you think by "packing"? sending unity, tens, hundreds and thaunsend and make the calculation in Isadora, that dont work.
I just tried to send a single letter (a or b) and using "choice:string=[[a-z]]" inside Serial In Watcher - Text, but Isadora crashes.

I am desparate about serial in Isadora, for the moment and I am wrinting a simple processing app transfering Arduino into Isadora and vice-versa.

If someone could post some Isadora and Arduino patch, able to receive 8 digitalRead in Isadora and send informations for steppers from Isadora to Arduino (- 10000 to +1000 integer), I would be very interested to see it!

Thanks, jhoepffner


nick
User

Oct 26, 2007, 8:40 AM

Post #8 of 16 (3444 views)
Shortcut
Re: [jhoepffner] lanBox, serial, OSC, audio [In reply to] Can't Post

I thought your problem was that you were not sending an int of a fixed length in terms of the number of characters, so by padding the number with zeros you could make them all the same number of characters (osc uses a similar technique internally).

I haven't looked at the serial decoding bit of the isadora actor at all so far. Sorry
Cheers

Nick


nick
User

Oct 26, 2007, 9:01 AM

Post #9 of 16 (3443 views)
Shortcut
Re: [nick] lanBox, serial, OSC, audio [In reply to] Can't Post

Hi

I had a quick look and i think what you need to do is combine all the sensor values into on long string and send that as a single message to isadora.

If you send the sensor values as one long stream, you then tell isadora where in that stream each of the values is.

So in arduino if you serial.print each value as a 2 digit hex number it should take up the same number of bits for each value, followed by a serial.println at the end of all the values to show thats where the new values start you will get a long burst of serial info containing each of the numbers in a specific portion - you then put in the serial watcher where in the stream each one appears (b = 31 - 16, a = 15 - 0)

The serial actor will then create the outputs for each of the defined letters and will split up the serial info into those chunks and send them out of the relevent outlet.

Haven't got time to test if this works right now - and the numbers i used above are not necessarily the correct ones for your case - you need to look at the values you are sending and see how many bits are need to define them.

HTH
Cheers

Nick


jhoepffner
User

Oct 26, 2007, 10:34 AM

Post #10 of 16 (3437 views)
Shortcut
Re: [nick] lanBox, serial, OSC, audio [In reply to] Can't Post

I make a new try here arduino simple program:

long Sensor0 = 0; // first analog sensor

void setup()
{
Serial.begin(9600);
}

void loop()
{
Sensor0 = analogRead(0);
Serial.println(Sensor0,HEX);
delay(10);
}


trying with all kind of combination in binary and text serial, like this:
value : integer = 3 hex
the output is moving but completely out of real mesure.

I want to see a real arduino program and serial in watcher working with suitable result, where?

thank you


nick
User

Oct 26, 2007, 10:52 AM

Post #11 of 16 (3435 views)
Shortcut
Re: [jhoepffner] lanBox, serial, OSC, audio [In reply to] Can't Post

sorry, try BIN, not HEX

HTH
Cheers

Nick


nick
User

Oct 26, 2007, 11:11 AM

Post #12 of 16 (3433 views)
Shortcut
Re: [nick] lanBox, serial, OSC, audio [In reply to] Can't Post

I've just had a quick try and I can't work out a way to get it to work, sorry.
Cheers

Nick


nick
User

Oct 27, 2007, 2:51 PM

Post #13 of 16 (3406 views)
Shortcut
Re: [nick] lanBox, serial, OSC, audio [In reply to] Can't Post

Ok I've got one that works.

Using a text match actor set the eom char to 10

and the pattern matching string to an example from the example from the documentation

hue:int=2x "," sat:int=2x "," val:int=2x

which will match a string of 3 2 char hex values seperated by commas

To construct these in arduino this works:


int SensorA = 0;
int SensorB = 0;
int SensorC = 255;

void setup()
{
Serial.begin(9600);
}

void loop()
{
if (SensorA < 0x10) Serial.print (0,HEX); //if the number would be just one hex char print a zero first to make it two characters
Serial.print(SensorA, HEX);
Serial.print(",");
SensorA++;

if (SensorB < 0x10) Serial.print (0,HEX);
Serial.print(SensorB, HEX);
Serial.print(",");
SensorB++;
SensorB++;


if (SensorC < 0x10) Serial.print (0,HEX);
Serial.print(SensorC, HEX);
Serial.print(",");
SensorC--;

Serial.println();
delay(1000);

}

SensorA starts at zero and counts up, B starts at zero and counts up in twos, C starts at 255 and counts down.
Cheers

Nick


nick
User

Oct 27, 2007, 3:12 PM

Post #14 of 16 (3405 views)
Shortcut
Re: [nick] lanBox, serial, OSC, audio [In reply to] Can't Post

So to get it to work in the way you were trying (with text characters to identify each number and working with values up to 1023)

change the string in the text actor to


"h" h:int=3x "v" v:int3x "s" s:int=3x

its now looking for 3 character hex values, each one with a letter in front.

So in your arduino code now put


int SensorA = 0;
int SensorB = 0;
int SensorC = 1023; //note bigger number here - you can now go up to OxFFF

void setup()
{
Serial.begin(9600);
}

void loop()
{
Serial.print("h"); //print identifying character
if (SensorA < 0x100) Serial.print (0,HEX); //checks twice whether it needs to insert a zero first
if (SensorA < 0x10) Serial.print (0,HEX);
Serial.print(SensorA, HEX);

SensorA++;

Serial.print("v");
if (SensorB < 0x100) Serial.print (0,HEX);
if (SensorB < 0x10) Serial.print (0,HEX);
Serial.print(SensorB, HEX);

SensorB++;
SensorB++;


Serial.print("s");
if (SensorC < 0x100) Serial.print (0,HEX);
if (SensorC < 0x10) Serial.print (0,HEX);
Serial.print(SensorC, HEX);

SensorC--;

Serial.println();
delay(1000);
}
Cheers

Nick


jhoepffner
User

Oct 28, 2007, 2:09 AM

Post #15 of 16 (3396 views)
Shortcut
Re: [nick] lanBox, serial, OSC, audio [In reply to] Can't Post

Nick,

I try quickly your proposition, it work but very slowly, if I reduce the delay in Arduino to less than 500, the results are not acurate.
I am going tomorow in Belgium to give a workshop about Isadora and Arduino, so I need a responsive and sure communication and, for the moment, I continue to use Max/Msp for goBetween (accurate and fast with only 50 ms delay). When I come back or perhaps there, I will try more deeply your proposition.

Thank you


nick
User

Oct 28, 2007, 2:30 AM

Post #16 of 16 (3395 views)
Shortcut
Re: [jhoepffner] lanBox, serial, OSC, audio [In reply to] Can't Post

the delay was just so I could see whether the right values were getting through - I didn't try removing it.

You could try increasing the serial speed and see if that helps at all.
Cheers

Nick

 
 
 


Search for (options) copyright © TroikaTronix 2007