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 › Eclipse + Processing + tactu5
Page Index Toggle Pages: 1
Eclipse + Processing + tactu5 (Read 1346 times)
Eclipse + Processing + tactu5
Nov 15th, 2009, 6:13am
 
Anyone here have any experiences with the tactu5 library using Processing in Eclipse?

I am trying to port the example from the tactu5 web page (abstract-codex.net/tactu5/class_tactu5.html) to an Eclipse-able version and I keep getting an "ALLERT noteReciver(Note) method is not set!" error.

Here is my Eclipse java code:


import processing.core.*;
import tactu5.*;
import tactu5.Tactu5SimpleSequencer;

public class TactuTest extends PApplet {

     // creating an instance of Tactu5
     Tactu5 tactu5;
     
     // creating an aggregator instance
     Aggregator aggregator;

     public void setup() {
           Tactu5Utilities tactu5utilities = new Tactu5Utilities();
       
           // define various frequencies
           float freqA = 440.000f;
           float freqC = tactu5utilities.noteToFreq ( T5Notes.C, 4 );
           float freqE = tactu5utilities.noteToFreq ( T5Notes.E, 4 );
           float freqG = tactu5utilities.noteToFreq ( T5Notes.G, 3 );
           
           // declaring some notes      
           Note noteA = new Note(freqA,200,1,1,100,false);
           Note noteC = new Note(freqC,200,1,1,100,false);
           Note noteE = new Note(freqE,200,1,1,100,false);
           Note noteG = new Note(freqG,200,1,1,100,false);
           
           // declaring a sequence      
           Sequence sequence = new Sequence();
           
           // add notes to sequence to create an arpeggio      
           sequence.addNote(noteA);
           sequence.addNote(noteC);
           sequence.addNote(noteE);
           sequence.addNote(noteG);
           
           aggregator = new Aggregator();
           
           //add the sequence to aggregator            
           aggregator.addSequence(sequence);
           
           // initializing and feed internal sequencer, boolean value inidicate if it will loop
               
           tactu5 = new Tactu5(this,aggregator.getScore(),true);
             
           // start sequencer
           tactu5.start();  
     }
       
     public void draw() {    
         // do something    
     }
     
     public void noteReciver(Note n){
       // send data to a synth
           System.out.println(n.getFrequency());
           System.out.println(n.getDuration());
           System.out.println(n.getSustain());
           System.out.println(n.getPan());  
     }
     
     public void stop() {
       
           // eliminate Tactu5 sequencer
           tactu5.closeSequencer();
           super.stop();
       
     }
}


I have made several other Eclipse/Processing projects, and have had no problems. The problem here seems to be that the tactu5 object cannot find the noteReceiver callback function. If I comment out these two lines the code compiles without errors:

           tactu5 = new Tactu5(this,aggregator.getScore(),true);
             
           // start sequencer
           tactu5.start();  



Has anyone experienced this problem in Eclipse? Perhaps problems with Processing library callback functions in Eclipse in general?

Thanks in advance Smiley
Re: Eclipse + Processing + tactu5
Reply #1 - Nov 16th, 2009, 6:25am
 
Quote:
the tactu5 object cannot find the noteReceiver callback function

Perhaps because you called it noteReciver...
Re: Eclipse + Processing + tactu5
Reply #2 - Nov 21st, 2009, 9:08am
 
Ha, the method is actually called noteReciver (spelling mistake on the developers part). The problem was something else, but it doesn't matter anyway now, as I've found out that I can't use Tactu5 for what I was intending. Thanks for the reply anyway Smiley
Page Index Toggle Pages: 1