dr.octopus
YaBB Newbies
Offline
Posts: 3
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