We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Noob: Making Processing Sketches Talk to Eachother
Page Index Toggle Pages: 1
Noob: Making Processing Sketches Talk to Eachother (Read 384 times)
Noob: Making Processing Sketches Talk to Eachother
Aug 1st, 2008, 5:46pm
 
Hi I would like to run two processing sketches and make them talk to eachother. so that: what i do in one sketch would be recorded in another. ie:
if sketch 1: is a mouse draw sketch
if sketch 1: is a manipulate a chromatic scale sketch
if i draw with a mouse in sketch 1.
in sketch 2 it would change the color.

i would really appreciate any help on this.
thank you!
Re: Noob: Making Processing Sketches Talk to Eacho
Reply #1 - Aug 1st, 2008, 6:04pm
 
I would look in the libraries page.
Network library might be a way, perhaps non trivial, but allowing very distant applications to communicate...
UDP might be another way to go.
If you cannot get started, I might give a try, it might be fun. I would start by searching this forum...
Re: Noob: Making Processing Sketches Talk to Eacho
Reply #2 - Aug 1st, 2008, 6:45pm
 
Both sketches are on my local machine.
i was thinking:
1)Should I export them as .JAR files and then:
a)would I use the "while" conditional to call one sketch with the other, and the sketch that is doing the calling, to also have its own sketch active so that sketch 1 operates inside sketch 2?
b)would i use a 3rd sketch to call both the other sketch? or sync the other two somehow?

sorry if this is obvious, im still pretty new to Processing.
Re: Noob: Making Processing Sketches Talk to Eacho
Reply #3 - Aug 1st, 2008, 8:11pm
 
I think the easiest way to get the two apps communicating is via OSC (it'll work over a network, or locally - just set target IP to 127.0.0.1). The oscP5 library (http://www.sojamo.de/oscP5) is very easy to setup and use... just hava look at the examples (the oscP5sendreceive is a tiny app sending and receiving mouse clicks)...
Page Index Toggle Pages: 1