Error — Missing operator, semicolon, or ‘}’ near ‘setup’?

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);
  }
}

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();
}

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() {

  

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);
  }
}

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 …

Cheers
— mnse

@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);
     }
}

Hi @vrtx,

commented based on you code

Cheers
— mnse

3 Likes

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!!! :star_struck: