Skip to content

Commit

Permalink
Updated sample patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
nettoyeurny committed Nov 12, 2016
1 parent bddf60c commit d31289d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pdp5/examples/HelloPd/HelloPd.pde
Expand Up @@ -11,6 +11,8 @@ import org.puredata.processing.PureData;
PureData pd;

void setup() {
fullScreen();
ellipseMode(CENTER);
pd = new PureData(this, 44100, 0, 2);
pd.openPatch("test.pd");
// pd.subscribe("foo"); // Uncomment if you want to receive messages sent to the receive symbol "foo" in Pd.
Expand All @@ -19,9 +21,6 @@ void setup() {

void draw() {
background(0);
fill(200, 0, 0);
stroke(255, 0, 0);
ellipseMode(CENTER);
ellipse(mouseX, mouseY, 20, 20);
pd.sendFloat("pitch", (float)mouseX / (float)width); // Send float message to symbol "pitch" in Pd.
pd.sendFloat("volume", (float)mouseY / (float)height);
Expand Down Expand Up @@ -50,4 +49,4 @@ void receiveFloat(String source, float x) {
void receiveSymbol(String source, String sym) {
// Handle symbol sym sent to symbol source in Pd
}
*/
*/

0 comments on commit d31289d

Please sign in to comment.