aboutsummaryrefslogtreecommitdiff
path: root/vbap-help.pd
blob: 18aa9d5508343458dc826477ab0daec8c02d802e (plain)
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
#N canvas 260 22 824 533 10;
#X floatatom 149 218 5 0 0 2 - - -;
#X floatatom 187 237 5 0 0 2 - - -;
#X msg 115 163 bang;
#X obj 102 396 route 0 1 2 3;
#X floatatom 102 445 10 0 0 0 - - -;
#X floatatom 181 445 10 0 0 0 - - -;
#X floatatom 260 445 10 0 0 0 - - -;
#X floatatom 339 445 10 0 0 0 - - -;
#X text 441 159 In two dimensions \, only specify the azimuth. (for
example "define_loudspeakers 2 -45 45 0 180";
#X text 53 21 VBAP and define_loudspeakers;
#X text 442 281 The spread-parameter can be used to prevent a situation
where sound is coming from one speaker only \, which would make speaker
positions "visible". The range is 0 to 100;
#X floatatom 199 369 0 0 0 3 actual_azimuth - -;
#X floatatom 211 335 0 0 0 3 actual_elevation - -;
#X floatatom 221 314 7 0 0 1 actual_spreading - -;
#X text 443 202 2 For vbap \, give azimuth and elevation for the desired
location. Bang the first inlet and vbap will output gain-factors for
each speaker and the actual location produced. This can be different
from the desired one depending where your speakers are.;
#X msg 25 115 define_loudspeakers 2 -45 45 -135 135;
#X text 24 64 loudspeaker position definition can also be sent directly
to a vbap object. This changes the setup information only in a single
vbap object.;
#X text 443 332 For an example of how to use vbap with [matrix~] from
zexy-library \, see vbap-demo.pd.;
#X text 441 59 1 Use the define_loudspeakers object or message to list
the speaker positions. The example here defines loudspeakers in three
dimensions (the first parameter). For each speaker \, define its azimuth
and elevation. Here we have speakers front left and right with no elevation
(-45 0 45 0) and front and back with 45 degrees of elevation (0 45
180 45). Send the data to vbap.;
#X msg 51 135 define_loudspeakers 3 -45 45 -135 135 32 5 94 34 34 11
;
#X obj 152 202 hsl 100 13 0 360 0 0 empty empty azimuth 10 7 0 10 -262144
-1 -1 0 1;
#X obj 190 220 hsl 100 13 0 360 0 0 empty empty elevation 10 7 0 10
-262144 -1 -1 0 1;
#X floatatom 227 257 5 0 0 2 - - -;
#X obj 230 240 hsl 100 13 0 100 0 0 empty empty spread 10 7 0 10 -262144
-1 -1 0 1;
#X text 149 163 to output updated values;
#X obj 102 287 vbap 90 0 30;
#X text 450 417 You can also use [vbap] to control Cyclone's [matrix~]
;
#X obj 543 440 cyclone/matrix~ 1 4 1;
#X obj 83 185 metro 100;
#X obj 83 163 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#N canvas 283 22 628 620 simple 0;
#X floatatom 159 198 5 0 0 2 - - -;
#X floatatom 112 425 10 0 0 0 - - -;
#X floatatom 181 425 10 0 0 0 - - -;
#X floatatom 209 349 0 0 0 3 actual_azimuth - -;
#X floatatom 221 315 0 0 0 3 actual_elevation - -;
#X floatatom 231 294 7 0 0 1 actual_spreading - -;
#X obj 162 182 hsl 100 13 -180 180 0 1 empty empty azimuth 10 7 0 10
-262144 -1 -1 1500 1;
#X floatatom 237 237 5 0 0 2 - - -;
#X obj 240 220 hsl 100 13 0 100 0 1 empty empty spread 10 7 0 10 -262144
-1 -1 700 1;
#X text 130 134 to output updated values;
#X obj 112 155 metro 100;
#X obj 112 133 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 197 200 (ignore elevation in 2D \, that's for 3D);
#X obj 63 524 *~;
#X obj 92 525 *~;
#X msg 454 145 dsp 1;
#X obj 454 169 send pd;
#X floatatom 250 425 10 0 0 0 - - -;
#X floatatom 319 425 10 0 0 0 - - -;
#X obj 123 524 *~;
#X obj 152 525 *~;
#X msg 17 48 define_loudspeakers 2 -135 -45 0 45 135;
#X text 263 37 Define 2D speaker arrangement with speakers at -135
\, -45 \, 0 \, 45 and 135 degree positions (0 degrees is the center
front). This is a classic 5.1 setup.;
#X floatatom 389 425 10 0 0 0 - - -;
#X obj 72 558 dac~ 1 2 3 4 5;
#X obj 182 525 *~;
#X obj 112 267 vbap 0 0 30;
#X obj 112 376 route 0 1 2 3 4;
#X obj 13 396 *~ 0.2;
#X obj 13 374 noise~;
#X connect 0 0 26 1;
#X connect 1 0 13 1;
#X connect 2 0 14 1;
#X connect 6 0 0 0;
#X connect 7 0 26 3;
#X connect 8 0 7 0;
#X connect 10 0 26 0;
#X connect 11 0 10 0;
#X connect 13 0 24 0;
#X connect 14 0 24 1;
#X connect 15 0 16 0;
#X connect 17 0 19 1;
#X connect 18 0 20 1;
#X connect 19 0 24 2;
#X connect 20 0 24 3;
#X connect 21 0 26 0;
#X connect 23 0 25 1;
#X connect 25 0 24 4;
#X connect 26 0 27 0;
#X connect 26 1 3 0;
#X connect 26 2 4 0;
#X connect 26 3 5 0;
#X connect 27 0 1 0;
#X connect 27 1 2 0;
#X connect 27 2 17 0;
#X connect 27 3 18 0;
#X connect 27 4 23 0;
#X connect 28 0 13 0;
#X connect 28 0 14 0;
#X connect 28 0 19 0;
#X connect 28 0 20 0;
#X connect 28 0 25 0;
#X connect 29 0 28 0;
#X restore 539 378 pd simple 5.1 example;
#X text 337 238 (0-100);
#X text 297 217 (0-360);
#X text 257 199 (0-360);
#X text 21 490 Vector Base Amplitude Panning;
#X text 241 489 (C) 1998-2003 \, 2006 Ville Pulkki;
#X connect 0 0 25 1;
#X connect 1 0 25 2;
#X connect 2 0 25 0;
#X connect 3 0 4 0;
#X connect 3 1 5 0;
#X connect 3 2 6 0;
#X connect 3 3 7 0;
#X connect 15 0 25 0;
#X connect 19 0 25 0;
#X connect 20 0 0 0;
#X connect 21 0 1 0;
#X connect 22 0 25 3;
#X connect 23 0 22 0;
#X connect 25 0 3 0;
#X connect 25 1 11 0;
#X connect 25 2 12 0;
#X connect 25 3 13 0;
#X connect 28 0 25 0;
#X connect 29 0 28 0;