We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi all, I'm trying to make the SuperCollider client for Processing work. I have SC 3.7.2 and Processing 3.1.1. I tried to run an example sketch from Daniel John Jones website. The processing part seems to work alright i.e. I get a window displaying a bouncing line but no sound and ...
SuperCollider says :
"FAILURE IN SERVER /n_set Node 2000 not found"
Processing says :
### [2016/8/13 11:8:5] PROCESS @ OscP5 stopped.
### [2016/8/13 11:8:5] PROCESS @ UdpClient.openSocket udp socket initialized.
### [2016/8/13 11:8:6] PROCESS @ UdpServer.start() new Unicast DatagramSocket created @ port 57150
### [2016/8/13 11:8:6] PROCESS @ UdpServer.run() UdpServer is running @ 57150
### [2016/8/13 11:8:6] INFO @ OscP5 is running. you (192.168.1.21) are listening @ port 57150
oscEvent: /b_info
oscEvent: /done
oscEvent: /done
oscEvent: /fail
oscEvent: /fail
oscEvent: /fail
oscEvent: /fail...
... and so on.
Does anyone of you have an idea of what's happening ?
Thanks.
Raphaël
PS : here's the sketch by the way :)
import supercollider.*;
import oscP5.*;
float bx = width / 2,
by = height / 2,
vx = 0,
vy = 0;
Buffer buffer;
Synth synth;
int [] samples;
void setup()
{
size(1024, 512);
frameRate(25);
smooth();
samples = new int[width];
buffer = new Buffer(width, 1);
buffer.alloc(this, "allocated");
vx = random(-10, 10);
vy = random(-10, 10);
}
void allocated (Buffer buffer)
{
buffer.zero();
synth = new Synth("playbuf_1");
synth.set("loop", 1);
synth.set("bufnum", buffer.index);
synth.create();
}
void exit()
{
synth.free();
buffer.free();
super.exit();
}
void draw()
{
background(0);
fill(255);
noStroke();
bx += vx;
by += vy;
if (bx > width - 1)
{
bx = width - 1;
vx = 0 - vx;
}
if (bx < 0)
{
bx = 0;
vx = 0 - vx;
}
if (by > height - 1)
{
by = height - 1;
vy = 0 - vy;
}
if (by < 0)
{
by = 0;
vy = 0 - vy;
}
if (mousePressed)
{
vx += (mouseX - bx) * 0.001;
vy += (mouseY - by) * 0.001;
}
buffer.fill((int) bx, (int) abs(vx + 1), (2.0 * by / height) - 1.0);
for (int i = 0; (i < abs(vx + 1)) && (bx + i < width - 1); i++)
{
samples[(int) bx + i] = (int) by;
}
for (int i = 0; i < samples.length; i++)
{
stroke(150);
point(i, samples[i]);
}
if (synth != null)
{
synth.set("pan", (float) bx / width - 0.5);
synth.set("rate", (float) 0.1 + 0.2 * sqrt(sq(vx) + sq(vy)));
}
ellipse(bx, by, 3, 3);
}
Answers
have been playing with this, getting the same error, but i figured out what was wrong.
the
synth = new Synth("playbuf_1");
part is referencing a synth definition called playbuf_1. this is defined in the other PDE tab of the example. BUT it's just a comment, it does nothingyou have to cut the code out of the synthdef tab, paste it into the scide and use the Language > Evaluate File to define it. after that the sketch should work.
there are apparently ways of getting the synth data into the sc server using code ("/data" message?) but i've not worked that out yet.
(using Linux, scide, jack and all)
Thanks koogs, this is great ! I should try again soon !
the other thing to look for is the message that DOESN'T say this. it would say something about playbuf_1 being undefined. that was the hint as to what was happening, but it got lost in the hundreds of the above errors.