Skip to content

Commit

Permalink
lichen-community-systemsgh-5: Adds SuperCollider example and unhides …
Browse files Browse the repository at this point in the history
…the examples directory.
  • Loading branch information
colinbdclark committed Jun 19, 2017
1 parent 66ec9f5 commit 68ca662
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/node_modules/
/examples/
/dist/
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
/examples/
3 changes: 3 additions & 0 deletions examples/supercollider/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SuperCollider Example

This directory contains a example of an simple OSC listener function for SuperCollider, which listens to all incoming OSC messages and log them to the console.
10 changes: 10 additions & 0 deletions examples/supercollider/osc-listen.sc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(
~listener = {|msg, time, replyAddr, recvPort|
if (msg[0] != "/status.reply", {
// Log all received messages to the console.
("PhET event received on port" + recvPort + "from " + replyAddr.ip + ":" + replyAddr.port + ":" + msg).postln;
});
};

thisProcess.addOSCRecvFunc(~listener);
)

0 comments on commit 68ca662

Please sign in to comment.