-
Notifications
You must be signed in to change notification settings - Fork 1
/
ps3-midi.pd
162 lines (162 loc) · 4.8 KB
/
ps3-midi.pd
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
#N canvas 652 122 1055 602 10;
#X obj 408 124 tgl 20 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
2;
#X obj 480 401 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 397 173 hid 0;
#X obj 231 460 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 267 483 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 235 515 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 198 488 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 803 337 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 803 372 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X msg 436 125 open 0x054c 0x0268;
#X obj 397 100 t b b b;
#X msg 397 149 poll 5;
#X obj 397 248 route btn_6 btn_8 abs_hat1x abs_hat0x abs_hat0y abs_hat1y
btn_13 btn_10 btn_14 btn_11 btn_0 btn_4 btn_1 btn_3 btn_7 btn_9;
#X text 508 406 SELECT;
#X obj 397 197 route key abs;
#X obj 786 326 vsl 10 50 127 0 0 1 empty empty empty 0 -9 0 10 -262144
-1 -1 4900 1;
#X obj 434 221 route abs_z abs_x abs_y abs_rx abs_ry abs_rz;
#X obj 397 43 bng 50 250 50 0 empty empty empty 17 7 0 10 -261234 -1
-1;
#X obj 603 145 unpack;
#X obj 603 173 ctlout;
#X obj 656 91 hradio 15 1 0 16 empty empty midi_channel 0 -8 0 12 -204786
-1 -1 0;
#X obj 656 110 + 1;
#X obj 276 374 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 259 328 vsl 10 50 127 0 0 1 empty empty empty 0 -9 0 10 -262144
-1 -1 4900 1;
#X obj 276 339 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 607 400 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X text 636 401 START;
#X obj 404 533 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 420 517 hsl 50 10 0 127 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 442 496 vsl 10 50 0 127 0 1 empty empty empty 0 -9 0 10 -262144
-1 -1 2431 1;
#X text 458 500 LEFT STICK;
#X obj 614 532 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 630 516 hsl 50 10 0 127 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 652 495 vsl 10 50 0 127 0 1 empty empty empty 0 -9 0 10 -262144
-1 -1 2431 1;
#X text 668 499 RIGHT STICK;
#X obj 840 452 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 876 475 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 844 507 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 807 480 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0
1;
#X obj 684 475 stickInv 13;
#X obj 259 291 throttle 16;
#X obj 603 119 r data;
#X text 484 16 this patch emits midi CC messages based on input from
a PS3 controller;
#X text 32 26 make sure controller is connected via bluetooth \, then
click here to load --------------------------------------------->;
#X text 20 236 CC numbers for every button \, stick \, and throttle
on the PS3 can be changed by editing the numbers in the objects below
;
#X floatatom 656 134 5 0 0 0 - - -, f 5;
#X obj 310 356 button 15;
#X obj 627 466 stick 12;
#X obj 276 316 button 17;
#X obj 480 376 button 21;
#X obj 607 376 button 22;
#X obj 379 493 button 11;
#X obj 169 459 button 1;
#X obj 231 434 button 2;
#X obj 271 515 button 3;
#X obj 267 459 button 4;
#X obj 778 451 button 5;
#X obj 840 426 button 6;
#X obj 876 451 button 7;
#X obj 881 507 button 8;
#X obj 589 492 button 14;
#X obj 837 354 button 18;
#X obj 803 314 button 19;
#X obj 786 290 throttle 20;
#X obj 417 467 stick 9;
#X obj 474 476 stickInv 10;
#X text 33 96 for automatic loading \, connect a loadbang instead of
the manual red bang (default behavior is due to pd crashing on load
if the PS3 controller is not connected);
#X obj 798 73 loadbang;
#X connect 0 0 2 0;
#X connect 2 0 14 0;
#X connect 9 0 2 0;
#X connect 10 0 11 0;
#X connect 10 1 0 0;
#X connect 10 2 9 0;
#X connect 11 0 2 0;
#X connect 12 0 46 0;
#X connect 12 1 48 0;
#X connect 12 2 52 0;
#X connect 12 3 53 0;
#X connect 12 4 54 0;
#X connect 12 5 55 0;
#X connect 12 6 51 0;
#X connect 12 7 49 0;
#X connect 12 8 60 0;
#X connect 12 9 50 0;
#X connect 12 10 59 0;
#X connect 12 11 56 0;
#X connect 12 12 58 0;
#X connect 12 13 57 0;
#X connect 12 14 61 0;
#X connect 12 15 62 0;
#X connect 14 0 12 0;
#X connect 14 1 16 0;
#X connect 16 0 40 0;
#X connect 16 1 64 0;
#X connect 16 2 65 0;
#X connect 16 3 47 0;
#X connect 16 4 39 0;
#X connect 16 5 63 0;
#X connect 17 0 10 0;
#X connect 18 0 19 1;
#X connect 18 1 19 0;
#X connect 20 0 21 0;
#X connect 21 0 45 0;
#X connect 39 0 33 0;
#X connect 40 0 23 0;
#X connect 41 0 18 0;
#X connect 45 0 19 2;
#X connect 46 0 22 0;
#X connect 47 0 32 0;
#X connect 48 0 24 0;
#X connect 49 0 1 0;
#X connect 50 0 25 0;
#X connect 51 0 27 0;
#X connect 52 0 6 0;
#X connect 53 0 3 0;
#X connect 54 0 5 0;
#X connect 55 0 4 0;
#X connect 56 0 38 0;
#X connect 57 0 35 0;
#X connect 58 0 36 0;
#X connect 59 0 37 0;
#X connect 60 0 31 0;
#X connect 61 0 8 0;
#X connect 62 0 7 0;
#X connect 63 0 15 0;
#X connect 64 0 28 0;
#X connect 65 0 29 0;
#X connect 67 0 20 0;