forked from libpd/libpd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separating MIDI channel messages from raw MIDI bytes
- Loading branch information
1 parent
a9f7bf7
commit 5020b4d
Showing
2 changed files
with
71 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/** | ||
* | ||
* For information on usage and redistribution, and for a DISCLAIMER OF ALL | ||
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. | ||
* | ||
*/ | ||
|
||
package org.puredata.core; | ||
|
||
/** | ||
* | ||
* Interface for receiving MIDI channel messages from Pd. | ||
* | ||
* @author Peter Brinkmann ([email protected]) | ||
*/ | ||
public interface PdMidiListener { | ||
|
||
/** | ||
* receives a note on event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param pitch | ||
* @param velocity | ||
*/ | ||
void receiveNoteOn(int channel, int pitch, int velocity); | ||
|
||
/** | ||
* receives a control change event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param controller | ||
* @param value | ||
*/ | ||
void receiveControlChange(int channel, int controller, int value); | ||
|
||
/** | ||
* receives a program event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param value | ||
*/ | ||
void receiveProgramChange(int channel, int value); | ||
|
||
/** | ||
* receives a pitch bend event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param value centered at 0; no 8192 offset | ||
*/ | ||
void receivePitchBend(int channel, int value); | ||
|
||
/** | ||
* receives an aftertouch event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param value | ||
*/ | ||
void receiveAftertouch(int channel, int value); | ||
|
||
/** | ||
* receives a polyphonic aftertouch event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param pitch | ||
* @param value | ||
*/ | ||
void receivePolyAftertouch(int channel, int pitch, int value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,63 +9,13 @@ | |
|
||
/** | ||
* | ||
* PdReceiver is an interface for receiving MIDI events from pd, to be used with setMidiReceiver in {@link PdBase}. | ||
* Interface for receiving MIDI channel messages as well as raw MIDI bytes from Pd, | ||
* to be used with setMidiReceiver in {@link PdBase}. | ||
* | ||
* @author Peter Brinkmann ([email protected]) | ||
* | ||
*/ | ||
public interface PdMidiReceiver { | ||
|
||
/** | ||
* receives a note on event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param pitch | ||
* @param velocity | ||
*/ | ||
void receiveNoteOn(int channel, int pitch, int velocity); | ||
|
||
/** | ||
* receives a control change event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param controller | ||
* @param value | ||
*/ | ||
void receiveControlChange(int channel, int controller, int value); | ||
|
||
/** | ||
* receives a program event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param value | ||
*/ | ||
void receiveProgramChange(int channel, int value); | ||
|
||
/** | ||
* receives a pitch bend event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param value centered at 0; no 8192 offset | ||
*/ | ||
void receivePitchBend(int channel, int value); | ||
|
||
/** | ||
* receives an aftertouch event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param value | ||
*/ | ||
void receiveAftertouch(int channel, int value); | ||
|
||
/** | ||
* receives a polyphonic aftertouch event from pd | ||
* | ||
* @param channel starting at 0 | ||
* @param pitch | ||
* @param value | ||
*/ | ||
void receivePolyAftertouch(int channel, int pitch, int value); | ||
public interface PdMidiReceiver extends PdMidiListener { | ||
|
||
/** | ||
* receives one raw MIDI byte from pd | ||
|