danomatika / ofxPd

(maintained) a Pure Data addon for OpenFrameworks using libpd
Other
202 stars 45 forks source link

Fixed your issues #1

Closed mazbox closed 13 years ago

mazbox commented 13 years ago

Hey Dan

I've been working on an ofxPd for a while, but just haven't made it public. I fixed the issue of the file not being found (it's something to do with not including the right header files - I had to put #define HAVE_UNISTD_H or something in some of the Pd files.

I also added a few features which you'll see in the header...

/// send messages to pd void sendFloat(string messageName, float value); void sendBang(string messageName);
void sendMidiNote(int channel, int noteNum, int velocity); void sendMidiControlChange(int channel, int ctlNum, int value); void sendMidiBend(int channel, int value); void sendMidiProgramChange(int channel, int program); void sendMidiPolyTouch(int channel, int noteNum, int value); void sendMidiAfterTouch(int channel, int value);

Also, I'm gonna send you my version of ofxPd, maybe we can give the methods better names - i.e. all of the methods start with pdXxxx. Do we need that?

In terms of the callbacks, maybe it would be better to have a separate listener class - i.e. you call addListener() on the ofxPd object, and provide a subclass of ofxPdListener.

What say you?

cheers

Marek

danomatika commented 13 years ago

Ok, I brought in and updated your changes:

the pdXXX prefixes stay for now until an listener/event system can be added.