-
Notifications
You must be signed in to change notification settings - Fork 7
/
hoa.library.hpp
260 lines (224 loc) · 10.7 KB
/
hoa.library.hpp
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
/*
// Copyright (c) 2012-2015 Pierre Guillot, Eliott Paris & Thomas Le Meur CICM, Universite Paris 8.
// For information on usage and redistribution, and for a DISCLAIMER OF ALL
// WARRANTIES, see the file, "LICENSE.txt," in this distribution.
*/
#ifndef DEF_HOA_PD
#define DEF_HOA_PD
extern "C"
{
#include "ThirdParty/CicmWrapper/Sources/cicm_wrapper.h"
}
#define HOA_MAX_PLANEWAVES 128
#define HOA_MAXBLKSIZE 8192
#define HOA_UI_BORDERTHICKNESS 1
#define HOA_UI_CORNERSIZE 8
#define HOA_CONTRAST_LIGHTER 0.06f
#define HOA_CONTRAST_DARKER 0.14f
#define HOA_DISPLAY_NPOINTS 180
typedef struct _hoa_in
{
t_eobj f_obj;
int f_extra;
} t_hoa_in;
typedef struct _hoa_out
{
t_eobj f_obj;
t_outlet *f_outlet;
int f_extra;
} t_hoa_out;
typedef struct _hoa_in_tilde
{
t_edspobj f_obj;
t_sample* f_signal;
int f_extra;
} t_hoa_in_tilde;
typedef struct _hoa_out_tilde
{
t_edspobj f_obj;
t_sample* f_signal;
int f_extra;
} t_hoa_out_tilde;
typedef struct _hoa_thisprocess
{
t_eobj j_box;
char f_nit;
t_outlet* f_out_hoa_args;
t_outlet* f_out_hoa_mode;
t_outlet* f_out_args;
t_outlet* f_out_attrs;
t_outlet* f_out_mute;
t_atom f_hoa_args[3];
t_atom f_hoa_mode[2];
t_atom* f_args;
int f_argc;
int f_n_attrs;
t_symbol** f_attr_name;
t_atom* f_attr_vals[64];
int f_attr_size[64];
double f_time;
} t_hoa_thisprocess;
extern "C" void Hoa_setup(void);
extern "C" void hoa_setup(void);
extern "C" void setup_hoa0x2econnect(void);
extern "C" void setup_hoa0x2edac_tilde(void);
extern "C" void setup_hoa0x2ein(void);
extern "C" void setup_hoa0x2ein_tilde(void);
extern "C" void setup_hoa0x2eout(void);
extern "C" void setup_hoa0x2eout_tilde(void);
extern "C" void setup_hoa0x2epi(void);
extern "C" void setup_hoa0x2epi_tilde(void);
extern "C" void setup_hoa0x2eprocess_tilde(void);
extern "C" void setup_hoa0x2ethisprocess_tilde(void);
extern "C" void setup_hoa0x2emap(void);
extern "C" void setup_hoa0x2e2d0x2ewider_tilde(void);
extern "C" void setup_hoa0x2e2d0x2escope_tilde(void);
extern "C" void setup_hoa0x2e2d0x2espace(void);
extern "C" void setup_hoa0x2e2d0x2erotate_tilde(void);
extern "C" void setup_hoa0x2e2d0x2erecomposer_tilde(void);
extern "C" void setup_hoa0x2e2d0x2eprojector_tilde(void);
extern "C" void setup_hoa0x2e2d0x2eoptim_tilde(void);
extern "C" void setup_hoa0x2e2d0x2emeter_tilde(void);
extern "C" void setup_hoa0x2e2d0x2emap_tilde(void);
extern "C" void setup_hoa0x2e2d0x2eencoder_tilde(void);
extern "C" void setup_hoa0x2e2d0x2edecoder_tilde(void);
extern "C" void setup_hoa0x2e2d0x2eexchanger_tilde(void);
extern "C" void setup_hoa0x2e3d0x2ewider_tilde(void);
extern "C" void setup_hoa0x2e3d0x2edecoder_tilde(void);
extern "C" void setup_hoa0x2e3d0x2eencoder_tilde(void);
extern "C" void setup_hoa0x2e3d0x2eoptim_tilde(void);
extern "C" void setup_hoa0x2e3d0x2ewider_tilde(void);
extern "C" void setup_hoa0x2e3d0x2emap_tilde(void);
extern "C" void setup_hoa0x2e3d0x2emeter_tilde(void);
extern "C" void setup_hoa0x2e3d0x2escope_tilde(void);
extern "C" void setup_hoa0x2e3d0x2eexchanger_tilde(void);
static t_symbol* hoa_sym_none = gensym("none");
static t_symbol* hoa_sym_energy = gensym("energy");
static t_symbol* hoa_sym_velocity = gensym("velocity");
static t_symbol* hoa_sym_both = gensym("both");
static t_symbol* hoa_sym_clockwise = gensym("clockwise");
static t_symbol* hoa_sym_anticlock = gensym("anti-clockwise");
static t_symbol* hoa_sym_vector_layer = gensym("vectors_layer");
static t_symbol* hoa_sym_leds_layer = gensym("leds_layers");
static t_symbol* hoa_sym_top = gensym("top");
static t_symbol* hoa_sym_bottom = gensym("bottom");
static t_symbol* hoa_sym_toponbottom = gensym("top/bottom");
static t_symbol* hoa_sym_topnextbottom = gensym("top-bottom");
static t_symbol* hoa_sym_basic = gensym("basic");
static t_symbol* hoa_sym_maxRe = gensym("maxRe");
static t_symbol* hoa_sym_inPhase = gensym("inPhase");
static t_symbol* hoa_sym_fixe = gensym("fixe");
static t_symbol* hoa_sym_fisheye = gensym("fisheye");
static t_symbol* hoa_sym_free = gensym("free");
static t_symbol* hoa_sym_all = gensym("all");
static t_symbol* hoa_sym_canvas = gensym("canvas");
static t_symbol* hoa_sym_2d = gensym("2d");
static t_symbol* hoa_sym_3d = gensym("3d");
static t_symbol* hoa_sym_harmonics = gensym("harmonics");
static t_symbol* hoa_sym_planewaves = gensym("planewaves");
static t_symbol* hoa_sym_hoa_thisprocess = gensym("hoa.thisprocess~");
static t_symbol* hoa_sym_hoa_process = gensym("hoa.process~");
static t_symbol* hoa_sym_hoa_2d_process = gensym("hoa.2d.process~");
static t_symbol* hoa_sym_hoa_3d_process = gensym("hoa.3d.process~");
static t_symbol* hoa_sym_hoa_in = gensym("hoa.in");
static t_symbol* hoa_sym_hoa_in_tilde = gensym("hoa.in~");
static t_symbol* hoa_sym_hoa_out = gensym("hoa.out");
static t_symbol* hoa_sym_hoa_out_tilde = gensym("hoa.out~");
static t_symbol* hoa_sym_obj = gensym("obj");
static t_symbol* hoa_sym_order = gensym("order");
static t_symbol* hoa_sym_offset = gensym("offset");
static t_symbol* hoa_sym_nhcolor = gensym("nhcolor");
static t_symbol* hoa_sym_phcolor = gensym("phcolor");
// notify
static t_symbol* hoa_sym_null = gensym("(null)");
static t_symbol* hoa_sym_nothing = gensym("");
static t_symbol* hoa_sym_notify = gensym("notify");
static t_symbol* hoa_sym_modified = gensym("modified");
static t_symbol* hoa_sym_attr_modified = gensym("attr_modified");
// Methods
static t_symbol* hoa_sym_set = gensym("set");
static t_symbol* hoa_sym_bang = gensym("bang");
static t_symbol* hoa_sym_float = gensym("float");
static t_symbol* hoa_sym_int = gensym("int");
static t_symbol* hoa_sym_list = gensym("list");
static t_symbol* hoa_sym_anything = gensym("anything");
static t_symbol* hoa_sym_dynlet_begin = gensym("dynlet_begin");
static t_symbol* hoa_sym_dynlet_end = gensym("dynlet_end");
static t_symbol* hoa_sym_start = gensym("start");
static t_symbol* hoa_sym_stop = gensym("stop");
// Trigo
static t_symbol* hoa_sym_cartesian = gensym("cartesian");
static t_symbol* hoa_sym_car = gensym("car");
static t_symbol* hoa_sym_polar = gensym("polar");
static t_symbol* hoa_sym_pol = gensym("pol");
static t_symbol* hoa_sym_mute = gensym("mute");
static t_symbol* hoa_sym_abscissa = gensym("abscissa");
static t_symbol* hoa_sym_ordinate = gensym("ordinate");
static t_symbol* hoa_sym_height = gensym("height");
static t_symbol* hoa_sym_radius = gensym("radius");
static t_symbol* hoa_sym_azimuth = gensym("azimuth");
static t_symbol* hoa_sym_elevation = gensym("elevation");
static t_symbol* hoa_sym_angle = gensym("angle");
static t_symbol* hoa_sym_angles = gensym("angles");
static t_symbol* hoa_sym_directivities = gensym("directivities");
// Paint
static t_symbol* hoa_sym_rect = gensym("rect");
static t_symbol* hoa_sym_bgcolor = gensym("bgcolor");
static t_symbol* hoa_sym_size = gensym("size");
static t_symbol* hoa_sym_bdcolor = gensym("bdcolor");
// Map
static t_symbol* hoa_sym_source = gensym("source");
static t_symbol* hoa_sym_group = gensym("group");
static t_symbol* hoa_sym_slot = gensym("slot");
static t_symbol* hoa_sym_remove = gensym("remove");
static t_symbol* hoa_sym_description = gensym("description");
static t_symbol* hoa_sym_color = gensym("color");
// recomposer
static t_symbol* hoa_sym_channels = gensym("channels");
// Layers
static t_symbol* hoa_sym_background_layer = gensym("background_layer");
static t_symbol* hoa_sym_sources_layer = gensym("sources_layer");
static t_symbol* hoa_sym_groups_layer = gensym("groups_layer");
static t_symbol* hoa_sym_rect_selection_layer = gensym("rect_selection_layer");
static t_symbol* hoa_sym_harmonics_layer = gensym("harmonics_layer");
static t_symbol* hoa_sym_space_layer = gensym("space_layer");
static t_symbol* hoa_sym_points_layer = gensym("points_layer");
static t_symbol* hoa_sym_channels_layer = gensym("channels_layer");
static t_symbol* hoa_sym_text_layer = gensym("text_layer");
static t_symbol* hoa_sym_fisheye_layer = gensym("fisheye_layer");
static t_symbol* hoa_sym_rectselection_layer = gensym("rectselection_layer");
static t_symbol* hoa_sym_relpolar = gensym("relpolar");
static t_symbol* hoa_sym_relativepolar = gensym("relativepolar");
static t_symbol* hoa_sym_relradius = gensym("relradius");
static t_symbol* hoa_sym_relazimuth = gensym("relazimuth");
static t_symbol* hoa_sym_relelevation = gensym("relelevation");
static t_symbol* hoa_sym_relativeradius = gensym("relativeradius");
static t_symbol* hoa_sym_relangle = gensym("relangle");
static t_symbol* hoa_sym_relativeangle = gensym("relativeangle");
// Preset
static t_symbol* hoa_sym_store = gensym("store");
static t_symbol* hoa_sym_storeagain = gensym("storeagain");
static t_symbol* hoa_sym_storeempty = gensym("storeempty");
static t_symbol* hoa_sym_storeend = gensym("storeend");
static t_symbol* hoa_sym_storenext = gensym("storenext");
static t_symbol* hoa_sym_insert = gensym("insert");
static t_symbol* hoa_sym_delete = gensym("delete");
static t_symbol* hoa_sym_copy = gensym("copy");
static t_symbol* hoa_sym_renumber = gensym("renumber");
static t_symbol* hoa_sym_clear = gensym("clear");
static t_symbol* hoa_sym_recall = gensym("recall");
static t_symbol* hoa_sym_read = gensym("read");
static t_symbol* hoa_sym_write = gensym("write");
static t_symbol* hoa_sym_storesource = gensym("storesource");
static t_symbol* hoa_sym_storegroup = gensym("storegroup");
static t_symbol* hoa_sym_record = gensym("record");
static t_symbol* hoa_sym_limit = gensym("limit");
static t_symbol* hoa_sym_erase = gensym("erase");
static t_symbol* hoa_sym_erasepart = gensym("erasepart");
static t_symbol* hoa_sym_endeditbox = gensym("endeditbox");
static t_symbol* hoa_sym_text = gensym("text");
static t_symbol* hoa_sym_getname = gensym("getname");
static t_symbol* hoa_sym_zoom = gensym("zoom");
static t_symbol* hoa_sym_number = gensym("number");
static t_symbol* hoa_sym_index = gensym("index");
#endif