vrtx
November 24, 2022, 9:18am
1
i’ve being days trying to solve this error…
Erro - Missing operator, semicolon, or ‘}’ near ‘setup’?
.Any help, please?!
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
import ddf.minim.signals.*;
import ddf.minim.spi.*;
import ddf.minim.ugens.*;
import peasy.*;
float a = 8;
PeasyCam cam;
Minim minim;
AudioPlayer player;
player. play;
void setup() {
size(800, 800, P3D);
smooth(8);
cam = new PeasyCam(this, 180);
cam = setMinimumDistance(50);
cam = setMaximumDistance(500);
minim = new Minim(this);
player = minin.loadFile("bethaPD.mp3");
}
void draw() {
background(0);
rotateY(.5);
rotateZ(.5);
for (int i = 0; i < player.bufferSize () - 1; i++) {
rotateX(50+player.right, get(i)/100);
pushMatrix();
fill(#F20F0F, 100);
popMatrix();
strokeWeight(1 + player, right, get(i));
stroke(0);
box(10, 10, 55 + player, right, get(i)*200);
box(55 + player.right, get(i)*50, 10, 10);
box(10, 55, + player.right.get(i)*50, 10);
}
}
quark
November 24, 2022, 9:26am
2
vrtx:
player. play;
This line should be inside setup after you have initialised player e.g.
void setup() {
size(800, 800, P3D);
smooth(8);
cam = new PeasyCam(this, 180);
cam = setMinimumDistance(50);
cam = setMaximumDistance(500);
minim = new Minim(this);
player = minin.loadFile("bethaPD.mp3");
player. play();
}
vrtx
November 24, 2022, 10:49am
3
Hi there, @quark ; tks for help…
I did the changes but stiil the same:
setup and draw with red underline:
“Erro - Missing operator, semicolon, or ‘}’ near ‘setup’?”
void setup() {
size(800, 800, P3D);
smooth(8);
cam = new PeasyCam(this, 180);
cam = setMinimumDistance(50);
cam = setMaximumDistance(500);
minim = new Minim(this);
player = minin .loadFile("bethaPD.mp3");
player.play();
}
void draw() {
quark
November 24, 2022, 10:54am
4
The changes I made worked for me although I got other errors because I don’t have minim or peasy installed. Here is your code with my changes.
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.effects.*;
import ddf.minim.signals.*;
import ddf.minim.spi.*;
import ddf.minim.ugens.*;
import peasy.*;
float a = 8;
PeasyCam cam;
Minim minim;
AudioPlayer player;
void setup() {
size(800, 800, P3D);
smooth(8);
cam = new PeasyCam(this, 180);
cam = setMinimumDistance(50);
cam = setMaximumDistance(500);
minim = new Minim(this);
player = minin.loadFile("bethaPD.mp3");
player.play();
}
void draw() {
background(0);
rotateY(.5);
rotateZ(.5);
for (int i = 0; i < player.bufferSize () - 1; i++) {
rotateX(50+player.right, get(i)/100);
pushMatrix();
fill(#F20F0F, 100);
popMatrix();
strokeWeight(1 + player, right, get(i));
stroke(0);
box(10, 10, 55 + player, right, get(i)*200);
box(55 + player.right, get(i)*50, 10, 10);
box(10, 55, + player.right.get(i)*50, 10);
}
}
mnse
November 24, 2022, 11:14am
5
Hi @vrtx ,
Aa a first I would recommend to study the documentation for both …
PeasyCam:
Minim:
https://code.compartmental.net/minim/
… and afterwards check if your code is applied that way the documentation says…
Things to check for …
vrtx:
strokeWeight(1 + player, right, get(i));
//...
rotateX(50+player.right, get(i)/100);`
//...
box(10, 10, 55 + player, right, get(i)*200);
box(55 + player.right, get(i)*50, 10, 10);
Cheers
— mnse
vrtx
November 24, 2022, 12:24pm
6
@mnse tks… I did so… i read and thats the same as i’ve done. I did tryed change thing from a place to another, the symblos… Nothing… Keep with the same error…
“Erro - Missing operator, semicolon, or ‘}’ near ‘setup’?”
Red underline setup and draw.
When i just write “Minim minim” and “AudioPlayer player”… Things get worse…
import processing.sound.*;
import ddf.minim.*;
import peasy.*;
float a = 8;
PeasyCam cam;
Minim minim;
AudioPlayer player;
void setup() {
size(800, 800, P3D);
smooth(8);
cam = new PeasyCam(this, 180);
cam . setMinimumDistance(50);
cam . setMaximumDistance(500);
minim = new Minim(this);
player = minin .loadFile("bethaPD.mp3");
player. play();
}
void draw() {
background(0);
rotateY(-.5);
rotateZ(-.5);
for (int i = 0; i < player.bufferSize () - 1; i++) {
rotateX(50+player.right, get(i)/100);
pushMatrix();
fill(#F20F0F,100);
popMatrix();
strokeWeight(1 + player, right, get(i));
stroke(0);
box(10, 10, 55 + player, right, get(i)*200);
stroke(#570FF5);
box(55 + player.right, get(i)*50, 10, 10);
//stroke(#4C1CB7);
box(10, 55, + player.right.get(i)*50, 10);
}
}
mnse
November 24, 2022, 1:08pm
7
Hi @vrtx ,
commented based on you code
vrtx:
import processing.sound.*;
import ddf.minim.*;
import peasy.*;
float a = 8;
PeasyCam cam;
Minim minim;
AudioPlayer player;
void setup() {
size(800, 800, P3D);
smooth(8);
cam = new PeasyCam(this, 180);
cam . setMinimumDistance(50);
cam . setMaximumDistance(500);
minim = new Minim(this);
// this is not minin but rather minim
player = minin .loadFile("bethaPD.mp3");
player. play();
}
void draw() {
background(0);
rotateY(-.5);
rotateZ(-.5);
for (int i = 0; i < player.bufferSize () - 1; i++) {
// this should be no comma, rather a dot
rotateX(50+player.right, get(i)/100);
pushMatrix();
fill(#F20F0F, 100);
popMatrix();
// this should be no comma, rather a dot
strokeWeight(1 + player, right, get(i));
stroke(0);
// this should be no comma, rather a dot
box(10, 10, 55 + player, right, get(i)*200);
stroke(#570FF5);
// this should be no comma, rather a dot
box(55 + player.right, get(i)*50, 10, 10);
//stroke(#4C1CB7);
// too much parameter
box(10, 55, + player.right.get(i)*50, 10);
}
}
Cheers
— mnse
3 Likes
vrtx
November 24, 2022, 5:30pm
8
beatyfull!!! wow!!! LUV U…
I don’t really know how to thank you for it.
36hrs to find out, 4 days changing code to get in this. Also the sound i built in Pure Data.
I will finish it and send it here as a video, with both codes, audio and processing…
Thanks a LOT!!!