This repository was archived by the owner on Nov 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +82
-0
lines changed
Expand file tree Collapse file tree 3 files changed +82
-0
lines changed Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff line change 1+ # ` iipyper ` Max/MSP examples
2+
3+ Documentation:
4+ - https://cycling74.com/articles/cnmat-odot-tools-for-osc-and-beyond
5+
6+ ## Examples
7+ - ` OpenSoundControl ` : example corresponding to the help file for CNMAT's OpenSoundControl object
8+ - ` udp ` : example corresponding to the Max help files for ` updsend ` and ` udpreceive `
9+ - ` notepredictor `
10+ + how does the `return` result in `osc.send`?
11+ + why do the SC examples not load a model?
Original file line number Diff line number Diff line change 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 the `updsend` and `updreceive` Max objects.
10+ In the Max help file, make sure the `updreceive` object's port is set to 7401.
11+ """
12+
13+ from iipyper import OSC , run , repeat
14+
15+ def main (port = 7400 ):
16+
17+ osc = OSC (port = port )
18+ osc .create_client ("max" , port = 7401 )
19+
20+ count = 0
21+
22+ @osc .args ("/*" )
23+ def _ (address , * args ):
24+ """
25+ Handle OSC messages from Max
26+ """
27+ print (f"{ address } { args } " )
28+
29+ @repeat (1 )
30+ def _ ():
31+ nonlocal count
32+ osc ("max" , "/test" , count )
33+ count = count + 1
34+
35+ if __name__ == '__main__' :
36+ run (main )
You can’t perform that action at this time.
0 commit comments