-
Notifications
You must be signed in to change notification settings - Fork 7
/
itp.processing2max.maxpat
200 lines (185 loc) · 4.66 KB
/
itp.processing2max.maxpat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
{
"patcher" : {
"fileversion" : 1,
"rect" : [ 29.0, 69.0, 442.0, 607.0 ],
"bglocked" : 0,
"defrect" : [ 29.0, 69.0, 442.0, 607.0 ],
"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
"openinpresentation" : 0,
"default_fontsize" : 13.0,
"default_fontface" : 0,
"default_fontname" : "Arial",
"gridonopen" : 0,
"gridsize" : [ 13.0, 13.0 ],
"gridsnaponopen" : 0,
"toolbarvisible" : 1,
"boxanimatetime" : 200,
"imprint" : 0,
"enablehscroll" : 1,
"enablevscroll" : 1,
"devicewidth" : 0.0,
"boxes" : [ {
"box" : {
"maxclass" : "comment",
"text" : "2011 / matt ganucheau / gancheau.com",
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial",
"patching_rect" : [ 232.0, 588.0, 207.0, 19.0 ],
"id" : "obj-20",
"fontsize" : 11.0
}
}
, {
"box" : {
"maxclass" : "comment",
"text" : "note: this requires the processing OscP5 library",
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial",
"patching_rect" : [ 166.0, 62.0, 261.0, 20.0 ],
"id" : "obj-11",
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "comment",
"text" : "recieve messages from processing via OSC",
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial",
"patching_rect" : [ 185.0, 46.0, 244.0, 20.0 ],
"id" : "obj-7",
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "comment",
"text" : "itp.processing2max",
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial",
"patching_rect" : [ 263.0, 19.0, 166.0, 27.0 ],
"id" : "obj-4",
"fontsize" : 18.0
}
}
, {
"box" : {
"maxclass" : "comment",
"text" : "processing code",
"numinlets" : 1,
"numoutlets" : 0,
"fontname" : "Arial",
"patching_rect" : [ 104.0, 547.0, 98.0, 20.0 ],
"id" : "obj-2",
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "textedit",
"text" : "import oscP5.*;\nimport netP5.*;\n\nOscP5 oscP5;\nNetAddress myRemoteLocation;\n\nvoid setup() {\n size(400,400);\n oscP5 = new OscP5(this,12000);\n myRemoteLocation = new NetAddress(\"127.0.0.1\",12000);\n}\n\nvoid draw() {\n background(0); \n oscSends();\n}\n\nvoid oscSends() {\n\n OscMessage xMessage = new OscMessage(\"mouseX\");\n xMessage.add(mouseX); \n oscP5.send(xMessage, myRemoteLocation); \n\n OscMessage yMessage = new OscMessage(\"mouseY\");\n yMessage.add(mouseY); \n oscP5.send(yMessage, myRemoteLocation);\n \n}\n",
"linecount" : 31,
"numinlets" : 1,
"numoutlets" : 4,
"outlettype" : [ "", "int", "", "" ],
"fontname" : "Arial",
"patching_rect" : [ 16.0, 102.0, 269.0, 441.0 ],
"id" : "obj-12",
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "number",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "int", "bang" ],
"fontname" : "Arial",
"patching_rect" : [ 352.0, 156.0, 48.0, 20.0 ],
"id" : "obj-69",
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "number",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "int", "bang" ],
"fontname" : "Arial",
"patching_rect" : [ 295.0, 156.0, 48.0, 20.0 ],
"id" : "obj-67",
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "route mouseX mouseY",
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"fontname" : "Arial",
"patching_rect" : [ 295.0, 129.0, 133.0, 20.0 ],
"id" : "obj-6",
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "newobj",
"text" : "udpreceive 12000",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"fontname" : "Arial",
"patching_rect" : [ 295.0, 104.0, 106.0, 20.0 ],
"id" : "obj-1",
"fontsize" : 12.0
}
}
, {
"box" : {
"maxclass" : "panel",
"numinlets" : 1,
"bgcolor" : [ 0.313726, 0.207843, 0.47451, 1.0 ],
"grad1" : [ 1.0, 1.0, 1.0, 1.0 ],
"background" : 1,
"numoutlets" : 0,
"patching_rect" : [ 0.0, 0.0, 442.0, 14.0 ],
"id" : "obj-33",
"rounded" : 0
}
}
],
"lines" : [ {
"patchline" : {
"source" : [ "obj-1", 0 ],
"destination" : [ "obj-6", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-6", 0 ],
"destination" : [ "obj-67", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
, {
"patchline" : {
"source" : [ "obj-6", 1 ],
"destination" : [ "obj-69", 0 ],
"hidden" : 0,
"midpoints" : [ ]
}
}
]
}
}