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 & HelpOther Libraries › jm-Etude Problems
Page Index Toggle Pages: 1
jm-Etude Problems (Read 1843 times)
jm-Etude Problems
Feb 3rd, 2007, 6:21pm
 
I am creating a sound project with the jm-Etude library. I installed the library into my folder and imported it into processing but it keeps coming up with the error:

"Semantic Error: No applicable overload was found for a constructor with signature "Etude(Temporary_3999_7365.Score)" in type "jmetude.Etude". Perhaps you wanted the overloaded version "Etude(processing.core.PApplet p);" instead?"

When I use this piece of code:

class Score{

 
void be(){
     
Etude e = new Etude(this);
e.createPart("piano");
e.setPartInstrument("piano", e.PIANO);  
     }

 }

Does anyone know why? I would be really grateful for any help.
Re: jm-Etude Problems
Reply #1 - Feb 3rd, 2007, 9:12pm
 
because of the way inner classes are handled, you can't use this in that manner. you'll have to pass the PApplet object to your Score constructor, i.e.

Code:

Score s = new Score(this);

class Score() {

Score(PApplet parent) {
Etude e = new Etude(parent);
... etc
Re: jm-Etude Problems
Reply #2 - Feb 4th, 2007, 5:12pm
 
Thanks for the help! It now works but chucks up the error:

"java.lang.NullPointerException
at processing.core.PApplet.registerNoArgs(PApplet.java:737)"

With the piece of code:

Score m = new Score(this);

class Score{


Score(PApplet parent){

Etude e = new Etude(parent);
e.createPhrase("phrase_1");
float[][] notes = {{e.C5,e.Q}, {e.D5,e.Q}, {e.E5, e.Q}};
e.createPhrase("phrase_2", notes);  


}


void setup(){}

 
 void draw(){}
 
 
}

Any idea why?
Re: jm-Etude Problems
Reply #3 - Feb 4th, 2007, 5:53pm
 
looks like the Etude instance gets lost on the way. give this a try:

class Score {

Etude e;

Score ( PApplet parent ) {

e = new Etude( parent );

...

F
Re: jm-Etude Problems
Reply #4 - Feb 5th, 2007, 12:20pm
 
Thanks for the idea - I modified it all but it still comes up with the same eroor Sad
Re: jm-Etude Problems
Reply #5 - Feb 5th, 2007, 5:34pm
 
Oh I solved it! Thanks for the help.
Re: jm-Etude Problems
Reply #6 - Feb 11th, 2007, 5:43pm
 
I am using colour tracking and jmetude together so that depending on the angle of a line drawn it converts this into sound. But whenever running the program jmetude slows down or even freezes my the video tracking. Is this a common thing? and is it a bad idea to attempt to use this library?
Re: jm-Etude Problems
Reply #7 - Feb 11th, 2007, 6:23pm
 
ALSO the library doesn't recognise:

'e.addPhrasePart("melody", "intro_melody");'

any ideas why? Sad
Page Index Toggle Pages: 1