Skip to content
This repository was archived by the owner on Nov 23, 2023. It is now read-only.

Commit 1b24869

Browse files
committed
Max object help file examples
1 parent 758d954 commit 1b24869

File tree

3 files changed

+71
-852
lines changed

3 files changed

+71
-852
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""
2+
Authors:
3+
Victor Shepardson
4+
Jack Armitage
5+
Intelligent Instruments Lab 2022
6+
"""
7+
8+
"""
9+
This example corresponds to the help file for CNMAT's OpenSoundControl Max object.
10+
"""
11+
12+
from iipyper import OSC, run, repeat
13+
14+
def main(port=7005):
15+
16+
osc = OSC(port=port)
17+
osc.create_client("max", port=5432)
18+
19+
count = 0
20+
21+
@osc.args("/*")
22+
def _(address, *args):
23+
"""
24+
Handle OSC messages from Max
25+
"""
26+
print(f"{address} {args}")
27+
28+
@repeat(1)
29+
def _():
30+
nonlocal count
31+
osc("max", "/test", count)
32+
count = count + 1
33+
34+
if __name__=='__main__':
35+
run(main)

0 commit comments

Comments
 (0)