|
102 | 102 | print_png('secondary_sources_arbitrary_realloudspeakers.png');
|
103 | 103 |
|
104 | 104 | %% ===== Monochromatic sound fields ======================================
|
105 |
| -% === stereo setup === |
106 |
| -conf = SFS_config_example; |
107 |
| -conf.plot.normalisation = 'center'; |
108 |
| -x0 = [-1 2 0 0 -1 0 1;1 2 0 0 -1 0 1]; |
109 |
| -% [P,x,y,z] = sound_field_mono(X,Y,Z,x0,src,D,f,conf) |
110 |
| -sound_field_mono([-2 2],[-1 3],0,x0,'ps',[1 1],800,conf) |
111 |
| -print_png('sound_field_stereo.png'); |
112 |
| - |
113 | 105 | % === WFS 3D ===
|
114 | 106 | conf = SFS_config_example;
|
115 | 107 | conf.dimension = '3D';
|
|
150 | 142 | sound_field_mono_nfchoa([-2 2],[-2 2],0,[0 -1 0],'pw',800,conf);
|
151 | 143 | print_png('sound_field_nfchoa_25d.png');
|
152 | 144 |
|
153 |
| -% 2D local WFS with box shaped array and circular virtual array |
| 145 | +% === 2D local WFS with box shaped array and circular virtual array === |
154 | 146 | conf = SFS_config_example;
|
155 | 147 | conf.resolution = 1000;
|
156 | 148 | conf.dimension = '2D';
|
|
165 | 157 | axis([-1.1 1.1 -1.1 1.1]);
|
166 | 158 | print_png('sound_field_localwfs_2d.png');
|
167 | 159 |
|
168 |
| -% --- spatio-temporal snapshots of the sound field --- |
| 160 | +% === stereo setup === |
| 161 | +conf = SFS_config_example; |
| 162 | +conf.plot.normalisation = 'center'; |
| 163 | +x0 = [-1 2 0 0 -1 0 1;1 2 0 0 -1 0 1]; |
| 164 | +% [P,x,y,z] = sound_field_mono(X,Y,Z,x0,src,D,f,conf) |
| 165 | +sound_field_mono([-2 2],[-1 3],0,x0,'ps',[1 1],800,conf) |
| 166 | +print_png('sound_field_stereo.png'); |
| 167 | + |
| 168 | +%% ===== spatio-temporal snapshots of the sound field ==================== |
169 | 169 | conf = SFS_config_example;
|
170 | 170 | conf.dimension = '2.5D';
|
171 | 171 | conf.plot.useplot = true;
|
172 | 172 | % sound_field_imp_nfchoa(X,Y,Z,xs,src,t,conf)
|
173 | 173 | [p,x,y,z,x0] = sound_field_imp_nfchoa([-2 2],[-2 2],0,[0 2 0],'ps',200,conf);
|
174 | 174 | print_png('sound_field_imp_nfchoa_25d.png');
|
175 | 175 | conf.plot.usedb = true;
|
176 |
| -plot_sound_field(p,x,y,z,x0,conf); |
| 176 | +plot_sound_field(p,[-2 2],[-2 2],0,x0,conf); |
177 | 177 | print_png('sound_field_imp_nfchoa_25d_dB.png');
|
178 | 178 |
|
179 | 179 |
|
180 |
| -% --- custom grids --- |
| 180 | +%% ===== custom grids ==================================================== |
181 | 181 | conf = SFS_config_example;
|
182 | 182 | conf.dimension = '3D';
|
183 | 183 | conf.secondary_sources.number = 225;
|
|
197 | 197 | print_png('sound_field_imp_nfchoa_25d_dB_custom_grid.png');
|
198 | 198 |
|
199 | 199 |
|
200 |
| -% --- impulse response of the system --- |
| 200 | +%% ===== impulse response of the system ================================== |
201 | 201 | conf = SFS_config_example;
|
202 | 202 | conf.ir.usehcomp = 0;
|
203 | 203 | conf.wfs.usehpre = 0;
|
|
0 commit comments