Hi everyone,
I was wondering if there is a possibility to make an application in whatever form (.app, java, etc) or a code written in proc1.5 (for a reason) using the following libraries:
fullscreen
themididbus
picking (that's why the 1.5 version - others don't support it)
TUIO
and puredataP5 (pdp5) with reading the pure data patches of course.
Does anybody know what happened to the class Vector (dynamic list) of processing 1.5. to the latest version processing 2.08b?
Has it changed name?
Was it abolished?
What is there instead of it, using similar methods?
I know it's a common error about depth and only 32 pushMatrx - popMatrix pairs allowed and the answer is this skript:
Matrix stack - processing wiki BUT i get the following errors.
Basically it is a very very very big piece of code to show it, so i am gonna describe the basic problem.
I have my code running with no problem using pushMatrix - popMatrix. I try to extend it by adding ope more pair of push/pop translating and rotating 25rects() all together.
Exception "cannot use more than 32 pushMatrix() appears.
I copy the code given by the upper link, as it is.
What happens is that it looks like it cancels a piece of many many many sets of [pushMatrix() - translate() - rotate() - shape() -popMatrix()] and by canceling i mean the the push/pop orders are as they where never written and all the translation rotations are in a row...
I also tested the upper piece of code to the oldest - working - version of my code. What happens there is that it seams not even reading the "shape()" code as described above...
What is happening?
How does really the "cheat" of the link work?
Hi folks! I 've just completed a small version of a reactable - like tangible interface synthesizer, using processing and its libraries (libpd, TUIO, midiBus etc.).
It is fully expandable and comes in two versions: circular (like reactable) and linear, or anyway you want it...
You can see more videos and photos and get information, as well as download it from
my blog or watch videos on
youtube.
Soon, there will be further intsractions on the blog of how it works and how can be expanded, as well as fixes.
Also, if anyone has multitouch inerface table and fiducial reading established, please try it if you can and leave me comments of how it works cause i haven't fixed the table yet. This is a presentation working with simulator.
Any questions leave comments at the blog or
e-mail me...
What is the difference between PureDataP5 & pureData libraries?
They seemed to be the same library but they include different classes although sharing the same methods but if you have one blocks the other for duplicated library.
By manually i mean that i want to be able to change the zone's position, size, rotate it and combinations in order to make it as i want (ex. a rhomb) but not with tuio - gestures but from other controllers (ex. the keyboard, a mouse, a joystick).
you see i want to be able to make a multitouch table and use tuio-fiducials to change place to the zones and use them as control buttons and only.
This is a piece of code that uses Minim's way of forming a waveform but using bead library.
The truth is that i lack experience of programming and am new at processing so i made it by changing continously the data till it work as i wanted it. I don't know exactly how buffers and bead works yet and in the end how really the waveform is formed so any suggestions for improvements are for the best, and please correct anything you want and feedback..
The patch uses 2 points ( p1 & p2 ) and receives sound data from the AudioContext's buffer, so it probably can draw any waveform.
import beads.*;
AudioContext ac;
void setup() {
size(300,300);
ac = new AudioContext();
Envelope freqEnv = new Envelope(ac, 500);
WavePlayer wp = new WavePlayer(ac, freqEnv, Buffer.SINE);
freqEnv.addSegment(1000, 1000);
Gain g = new Gain(ac, 1, 0.1);
g.addInput(wp);
ac.out.addInput(g);
ac.start();
}
void draw() {
int[] p1 = {height/2,width/2}; // Set 1st point p1.
int[] p2 = {mouseX,mouseY}; // Set 2nd point p2.
int amp = 500; // Set the amplitube of the wave, in pixels.
// Factors for the placement of the waveform ("polar" placement):
float fi = atan2(p2[1]-p1[1],p2[0]-p1[0]); // fi sets the rotation angle.
int yp = (int) sqrt(pow((p2[0]-p1[0]),2)+pow((p2[1]-p1[1]),2)); // yp sets the lenght.
// Set the colors
background(0);
stroke(255);
// Set points so can see the points...
ellipse(p1[0],p1[1],10,10);
ellipse(p2[0],p2[1],10,10);
// Apply the transformation
translate(p1[0],p1[1]);
rotate(fi);
for(int i = 0 ; i < yp; i++) { // In case it "throws exception out of bounds for sth" for this line, set yp-1 instead of yp.
int buffIndex = i * ac.getBufferSize() / width;
int buffIndex2= (i+1) * ac.getBufferSize() / width;
int vOffset = (int)((1+ ac.out.getValue(0, buffIndex)) * amp);
int vOffset2 = (int)((1+ ac.out.getValue(0, buffIndex2)) * amp);
line(i,vOffset-amp,i+1,vOffset2-amp);
// or point(i,vOffset-amp);
/* Just for fun, try play by changing the prices at fact1 and fact2, see what happens.
It is clear from the documentation that
translate() and
rotate() can be applied to controlP5 controllers.
Has anyone fingered out how can this be achieved?
I mean lets say that i want to make a slider or a knob that is always next to the mouse and control its values either another slider or from keyboard. (Basically i want to set position with tuio objects and use the mouse to enter the controller's values but anyway).
Where do i write the creation arguments and how do i move it in the window (...what do i write in
setup() and what in
draw()...)?
So far by creating it in
setup() and translate the (ControlP5)
controlP5.draw(); in
draw() it makes me two sliders the one is at a fixed position in screen and sets values to both sliders, and the second where it should be "translated()" but you cannot set values to it. So it is wrong.
I ve been having problems working both with tuioClient (TUIO.*) and tuioZones.
Actually tuioZones is not compiled at all. Does this have to do with the fact that both read from the same port?
This is the message i get:
### [2012/10/16 20:22:49] PROCESS @ OscP5 stopped.
### [2012/10/16 20:22:49] PROCESS @ UdpClient.openSocket udp socket initialized.
### [2012/10/16 20:22:50] ERROR @ UdpServer.start() IOException, couldnt create new DatagramSocket @ port 3333 java.net.BindException: Address already in use
### [2012/10/16 20:22:50] INFO @ OscP5 is running. you (195.251.170.31) are listening @ port 3333
I have installed the puredata lib (PDP5) for processing, according to the directions, but when i try to run the included example in java mode i get this error message:
Exception in thread "Animation Thread" org.puredata.core.NativeLoader$NativeLibraryLoadError: Couldn't find libpdnative.jnilib for this platform mac/x86
at org.puredata.core.NativeLoader.loadLibraryFromJar(NativeLoader.java:111)
at org.puredata.core.NativeLoader.loadLibrary(NativeLoader.java:99)
at org.puredata.core.PdBase.<clinit>(PdBase.java:74)
at org.puredata.processing.PureData.<init>(Unknown Source)
at HelloPd.setup(HelloPd.java:36)
at processing.core.PApplet.handleDraw(PApplet.java:2103)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:680)
while at the code is highlighted the line:
pd = new PureData(this, 44100, 0, 2);
Does anyone can help me with this?
I run Processing 2.0b3 in a macbook 2.1 with os x 10.6.8