-
PURR
Really weird, now everything work only with the old IP: 192.168.137.1 except the accelerometer who doesn't work with any IP
-
PURR
Ok I'm near of the solution, it was definitly an IP problem. After read some documentation, I need to use the IPv4 and not the number at the end of my command interpreter.
But that's weird cause it was working with everything else yesterday with this ip adress. -
PURR
Hello there!
I just discover this amazing post do you think is it possible to use automatonism (complex modular patch) into a software like cubase, ableton,...
here a link if you don't know automatonism:
https://www.google.com/search?q=automatonism+pure+data&rlz=1C1CHBF_frFR877FR878&sxsrf=ALeKk03I5Heb6vRL5j_vzsLLKNwzMXjpxw:1599125466083&source=lnms&sa=X&ved=0ahUKEwjEr-3K1szrAhXwyIUKHRikCNsQ_AUICigA&biw=1522&bih=706&dpr=1.25 -
PURR
Hi!
I have a new problem,
Everthing is working but not when I want to use the accelerometer of the phone, that's really weird.
Processing is receiving but not PDProcessing code:
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorManager;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;import oscP5.;
import netP5.;import controlP5.*;
ControlP5 controlP5;OscP5 oscP5;
NetAddress myRemoteLocation;Context context;
SensorManager manager;
Sensor sensor;
AccelerometerListener listener;
float ax, ay, az;void setup() {
fullScreen();frameRate(25);
// create a new instance of oscP5.
// 12000 is the port number you are listening for incoming osc messages.
oscP5 = new OscP5(this, 12000);
myRemoteLocation = new NetAddress("192.168.137.1", 12011);
controlP5 = new ControlP5(this);context = getActivity();
manager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
sensor = manager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
listener = new AccelerometerListener();
manager.registerListener(listener, sensor, SensorManager.SENSOR_DELAY_GAME);textFont(createFont("SansSerif", 30 * displayDensity));
}void draw() {
background(0);
text("X: " + ax + "\nY: " + ay + "\nZ: " + az, 0, 0, width, height);
}class AccelerometerListener implements SensorEventListener {
public void onSensorChanged(SensorEvent event) {
ax = event.values[0];
ay = event.values[1];
az = event.values[2];
print(ax);
print(ay);
print(az);
}
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}}
void mousePressed() {
/* in the following different ways of creating osc messages are shown by example */
//OscMessage myMessage = new OscMessage(int(knobValue));
//myMessage.add();
OscMessage myMessage = new OscMessage("/test");
myMessage.add(ax);
myMessage.add(ay);
myMessage.add(az);/* send the message */
oscP5.send(myMessage, myRemoteLocation);
}PD code:
[import mr peach] -----> [udpreceive 127.0.0.1 12000]--------->[unpackOSC]------->[routeOSC /test]---->[number]I've already try like that too :
[import mr peach] -----> [udpreceive 127.0.0.1 12000]--------->[unpackOSC]------->[routeOSC /test]----> [unpack f f f]-------->[number]Thanks in advance
-
-
PURR
It's working now thanks a lot, I spent hours and hours on this problem !
-
PURR
Hi there,
I have problem about communication between Android processing and Pure data. When I run my code in processing, I see on the back of my screen that the phone send information to my computer but definitly not to pure data. That surprise me because the code is working in java but not in android.
I’ve already check the permission for android in my computer, the both are connect on the same wifi and I use to communicate with PD oscp5 for processing and mrpeach to receive in PDHere the code :
import oscP5.;
import netP5.;import controlP5.*;
ControlP5 controlP5;
Knob myDial;
Slider mySlider;OscP5 oscP5;
NetAddress myRemoteLocation;int knobValue = 100;
void setup() {
size(400,400);
smooth();
frameRate(25);
// create a new instance of oscP5.
// 12000 is the port number you are listening for incoming osc messages.
oscP5 = new OscP5(this, 12000);
myRemoteLocation = new NetAddress(“127.0.0.1”, 12000);
controlP5 = new ControlP5(this);
myDial = controlP5.addKnob(“knobValue”)
.setPosition(100, 100)
.setSize(200, 200);
}void draw() {
background(0);
fill(255, 0, 0);
;
println(knobValue);
}
void mousePressed() {
/* in the following different ways of creating osc messages are shown by example /
//OscMessage myMessage = new OscMessage(int(knobValue));
//myMessage.add();
OscMessage myMessage = new OscMessage("/test");
myMessage.add(knobValue);
/ send the message */
oscP5.send(myMessage, myRemoteLocation);
}the routing in pd :
[import mr peach] -----> [udpreceive 127.0.0.1 12000]--------->[unpackOSC]------->[routeOSC /test]---->[number]
if someone can help me that would be great,
Thanks in advance