-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
243 additions
and
282 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
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
39 changes: 39 additions & 0 deletions
39
examples/basics-without-comments/oscP5bundle/oscP5bundle.pde
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,39 @@ | ||
import oscP5.*; | ||
import netP5.*; | ||
|
||
OscP5 osc; | ||
NetAddress addr; | ||
|
||
void setup() { | ||
osc = new OscP5(this, 12000); | ||
addr = new NetAddress("127.0.0.1", 12000); | ||
} | ||
|
||
|
||
void draw() { | ||
} | ||
|
||
void keyPressed() { | ||
switch(key) { | ||
case('1'): | ||
osc.send(addr, "/test", 1, 2, 3); | ||
break; | ||
case('2'): | ||
OscBundle bundle = new OscBundle(); | ||
bundle.add(new OscMessage("/m/1", 1)); | ||
bundle.add(new OscMessage("/m/2", 2)); | ||
osc.send(addr, bundle); | ||
break; | ||
} | ||
} | ||
|
||
void oscEvent(OscBundle theBundle) { | ||
println("received a bundle", theBundle); | ||
for (OscMessage m : theBundle.get()) { | ||
oscEvent(m); | ||
} | ||
} | ||
|
||
void oscEvent(OscMessage theMessage) { | ||
println("received a message", theMessage); | ||
} |
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,39 @@ | ||
import oscP5.*; | ||
import netP5.*; | ||
|
||
OscP5 osc; | ||
NetAddress addr; | ||
|
||
void setup() { | ||
osc = new OscP5(this, 12000); | ||
addr = new NetAddress("127.0.0.1", 12000); | ||
} | ||
|
||
|
||
void draw() { | ||
} | ||
|
||
void keyPressed() { | ||
switch(key) { | ||
case('1'): | ||
osc.send(addr, "/test", 1, 2, 3); | ||
break; | ||
case('2'): | ||
OscBundle bundle = new OscBundle(); | ||
bundle.add(new OscMessage("/m/1", 1)); | ||
bundle.add(new OscMessage("/m/2", 2)); | ||
osc.send(addr, bundle); | ||
break; | ||
} | ||
} | ||
|
||
void oscEvent(OscBundle theBundle) { | ||
println("received a bundle", theBundle); | ||
for (OscMessage m : theBundle.get()) { | ||
oscEvent(m); /* forward each message inside the bundle to oscEvent(OscMessage) */ | ||
} | ||
} | ||
|
||
void oscEvent(OscMessage theMessage) { | ||
println("received a message", theMessage); | ||
} |
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
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
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,4 @@ | ||
cd $HOME/Documents/workspace/oscP5/target/classes | ||
jar cf ../oscP5.jar . | ||
cp ../oscP5.jar $HOME/Documents/Processing3/libraries/oscP5/library | ||
echo "oscP5 compiled on $(date)" |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.