We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › processing minim eclipse
Page Index Toggle Pages: 1
processing minim eclipse (Read 2289 times)
processing minim eclipse
Dec 8th, 2009, 10:58pm
 
hi,

i was just playing around with using processing with eclipse, i had a sketch made already, i'm using minim. i placed the line minim= new Minim(this); in the public void setup(){} but  i get an error message saying .

"The type ddf.minim.spi.MinimServiceProvider cannot be resolved. It is
      indirectly referenced from required .class files"

can anyone help me figure out how to fix this?
Re: processing minim eclipse
Reply #1 - Dec 9th, 2009, 1:44am
 
Did you added the minim library in your classpath?
Re: processing minim eclipse
Reply #2 - Dec 11th, 2009, 6:29am
 
this is my code i'm not sure what the classpath is.


import processing.core.*;
import ddf.minim.*;





public class new_project extends PApplet
{
     
     Minim minim;
     
     AudioSample Start;
     AudioSample Blue;
     AudioSample Red;

     int x=0;
     int y=0;

     int starx=30;
     int stary=30;

     int x2=0;
     int y2=0;

     int star2x=350;
     int star2y=350;


     float stars[];
     float starsx[];

     boolean collision=false;
     
     
     
     public void setup()
     {
     
       size(400,400);
       background(0,0,0);
       frameRate(30);
       
       minim=new Minim(this); //inderectly referenced?
       
       Blue=minim.loadSample("Blue.mp3",2048);
       Red=minim.loadSample("Red.mp3",2048);
       Start=minim.loadSample("start.mp3",2048);
       
     
     }

     public void draw()
     {
     
       /*  for(int c=2;c<=400;c=c+2)
       {
         for(int i=20;i<=400;i=i+40)
         {
           
            fill(255,255,255);
            ellipse(i+2,c,5,5);
         }
       }*/
       background(0,0,0);
       fill(255,0,0);
       rect(star2x,star2y,20,20);
       fill(0,0,255);
       rect(starx,stary,20,20);

       
       
       if(star2x==starx && star2y==stary)
       {
        // collision=true;
         
        star2x=350;
        starx=30;
        star2y=350;
        stary=30;
       
       
       }
       
       if(collision==true)
       {
         background(0,0,0);
         fill(255,0,255);
         ellipse(star2x,star2y,x,y);
         
     
      //x2++;
      //y2++;
     
       x++;
       y++;

       
       if(x>100)
       {
         x=0;
       }
       
       if(y>100)
       {
         y=0;
       }
       
       collision=false;
     
       
       }
       
       
       if(starx>400)
       {
         starx=10;
       }
       if(stary>400)
       {
         stary=10;
       }
       if(starx<0)
       {
         starx=400;
       }
       if(stary<0)
       {
         stary=400;
       }
       
       
       ///player 2 if outstide walls
       
       
       if(x2>20)
       {
         x2=-1;
       }
       
       if(y2>20)
       {
         y2=-1;
       }
       
       if(star2x>400)
       {
         star2x=10;
       }
       if(star2y>400)
       {
         star2y=10;
       }
       if(star2x<0)
       {
         star2x=400;
       }
       if(star2y<0)
       {
         star2y=400;
       }
       
       ////////////////////////////////player 1 movement
       if(keyPressed)
       {
         if(key=='w')
         {
           stary=stary-10;
         
         }
         if(key=='s')
         {
           stary=stary+10;
           
         }
         if(key=='a')
         {
           starx=starx-10;
           
         }
         if(key=='d')
         {
           starx=starx+10;
           
         }
         
         ///////player 2 buttons
          if(key=='o')
         {
           star2y=star2y-10;
         
         }
         if(key=='l')
         {
           star2y=star2y+10;
           
         }
         if(key=='k')
         {
           star2x=star2x-10;
           
         }
         if(key==';')
         {
           star2x=star2x+10;
         
         }
         
       }
       
       
     
     }

     

}
Re: processing minim eclipse
Reply #3 - Dec 11th, 2009, 8:21am
 
The classpath is set in the project's properties.
I suggest you read up a bit on Eclipse usage, probably starting by Processing in Eclipse article if you haven't read it yet.
Re: processing minim eclipse
Reply #4 - Jan 21st, 2010, 12:31am
 
technofrosty: you've got to include all of the jar files in the minim library folder, not just minim.jar

good luck!
Page Index Toggle Pages: 1