Skip to content

Commit

Permalink
Merge pull request #5 from ideo/max-updates
Browse files Browse the repository at this point in the history
minor cleanup and update examples for max working with new protocol
  • Loading branch information
dougbradbury committed May 21, 2014
2 parents f8b01ef + 66510c5 commit ed62437
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class LemmaExample {
public static void main(String[] args) throws Exception {
LemmaExample example = new LemmaExample();
//Create and configure lemma
Lemma lemma= new Lemma(example, "my-lemma", 1030, 6083);
Lemma lemma= new Lemma(example, "mylemma", "");
//listen for event snd define callback
lemma.hear("myEvent",new EventHandler() {
@Override
Expand Down
8 changes: 2 additions & 6 deletions max-external/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Edit the file and find the line:
Uncomment the line and set it to the lib directory where you unzipped this file.
For Example:

max.dynamic.jar.dir [max lemma installation]/lib ;
max.dynamic.jar.dir [max lemma installation]/lib

Note: you need to restart Max after making changes to this file.

Expand All @@ -49,21 +49,17 @@ Enter "mxj lemma.library.max.MaxLemma"

**Defaults:**

* noam udp broadcast port: **1030**
* tcp port lemme will listen for events on: **7788**
* lemma name used during registration and message sending: **max-lemma**
* list of events lemma listens for: **\<empty list>**

Defaults can be overridden by passing to the max objects as attributes.

* @BROADCAST_PORT <integer>
* @LISTEN_PORT <integer>
* @LEMMA_NAME <String/Symbol>
* @HEARS [<list of Strings / Symbols>]

**Example:**

mxj lemma.library.max.MaxLemma @LISTEN_PORT 7799 @LEMMA_NAME my-max-app @HEARS messageOne messageTwo
mxj lemma.library.max.MaxLemma @LEMMA_NAME myMaxApp @HEARS messageOne messageTwo

Send a "begin" message to inlet(0) to connect to noam and start listening.

Expand Down
2 changes: 1 addition & 1 deletion max-external/examples/maxlemmatest.maxpat
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"patching_rect" : [ 47.0, 295.0, 585.0, 33.0 ],
"text" : "mxj lemma.library.max.MaxLemma @BROADCAST_PORT 1030 @LISTEN_PORT 7799 @LEMMA_NAME my-max-app @HEARS messageOne messageTwo"
"text" : "mxj lemma.library.max.MaxLemma @LEMMA_NAME myMaxApp @HEARS messageOne messageTwo"
}

}
Expand Down
2 changes: 0 additions & 2 deletions max-external/src/main/java/lemma/library/max/MaxLemma.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ public class MaxLemma extends MaxObject implements EventHandler{

public MaxLemma() {
declareAttribute("HEARS");
declareAttribute("BROADCAST_PORT");
declareAttribute("LISTEN_PORT");
declareAttribute("LEMMA_NAME");
}

Expand Down

0 comments on commit ed62437

Please sign in to comment.