We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I am having trouble getting Max and Processing to communicate
I have been working with a tutorial I found on the cycling 74 forums that outlines the process
this is the tutorial http://www.conceptualinertia.net/aoakenfo/sketch-1
When I copy-paste the finished example, everything works smoothly. But there is a little bit too much going on with the processing side of the code for me to know exactly where I should pull from to create the building blocks of my own Max~Processing OSC communication project.
So naturally, I am trying to start from square one, with the first portion of the example, where the goal is to simply send the message ’42’ via the /foo prepend. For some reason it’s not working for me.
The console reads:
This is my source code, sorry for the funky formatting, it doesn't maintain the original spacing when I copy paste into the forum
import oscP5.*; import netP5.*;
OscP5 oscP5; NetAddress myRemoteLocation;
void setup() { size(400,400); frameRate(25);
initOsc();
oscP5 = new OscP5(this,8080); myRemoteLocation = new NetAddress("127.0.0.1",8080); }
void initOsc(){ oscP5 = new OscP5(this, 8080); myRemoteLocation = new NetAddress("127.0.0.1", 8080); oscP5.plug(this, "foo", "/foo"); }
public void foo(int value){ println("int received! =" + value); }
along with the v simple max patch
I have tried restarting, changing the ip, changing the port, all to which returns the same results. I have also looked at the send receive example in the oscP5 but to no avail. Comparing my source code with the finished example source code and nothing jumps out. I know that OSC communication works with my setup because both the finished example from ASH and the oscP5sendreceive example work.
What the dingus is happening?
Thanks for any and all help!!!
Answers
Hi, I would try 2 things: add
draw() {}
to your sketch so that processing keeps running after setup() and doesn't quit immediately, and removeoscP5 = ...
afterinitOsc()
since you dont want to initialize oscP5 twice.thanks dude!!