Skip to content

Commit 9be8b5f

Browse files
committed
Merge branch 'master' of https://github.com/sfstoolbox/sfs
2 parents c0e1342 + 0b75e27 commit 9be8b5f

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,40 @@ sound_field_mono_nfchoa([-2 2],[-2 2],0,[0 -1 0],'pw',800,conf);
323323
![Image](doc/img/sound_field_nfchoa_25d.png)
324324

325325

326+
#### Local Wave Field Synthesis
327+
328+
In Near-Field Compensated Higher Order Ambisonics aliasing frequency in a small
329+
array inside the listening area can be increased by limiting the used order. A
330+
similar outcome can be achoieved in Wave Field Synthesis by applying so called
331+
local Wave Field Synthesis. In this case the original loudspeaker array is
332+
driven by Wave Field Synthesis to create a virtual loudspeaker array consisting
333+
of focused sources which can then be used to create the desired sound field in a
334+
small area.
335+
The settings are the same as for Wave Field Synthesis, but a new struct
336+
<code>conf.localsfs</code> has to be filled out, which for example provides the
337+
settings for the desired position and form of the local area with higher
338+
aliasing frequency.
339+
340+
```Matlab
341+
conf = SFS_config_example;
342+
conf.resolution = 1000;
343+
conf.dimension = '2D';
344+
conf.secondary_sources.geometry = 'box';
345+
conf.secondary_sources.number = 4*56;
346+
conf.secondary_sources.size = 2;
347+
conf.localsfs.vss.size = 0.4;
348+
conf.localsfs.vss.center = [0 0 0];
349+
conf.localsfs.vss.geometry = 'circular';
350+
conf.localsfs.vss.number = 56;
351+
% sound_field_mono_localwfs(X,Y,Z,xs,src,f,conf);
352+
sound_field_mono_localwfs([-1 1],[-1 1],0,[1.0 -1.0 0],'pw',7000,conf);
353+
axis([-1.1 1.1 -1.1 1.1]);
354+
%print_png('img/sound_field_localwfs_2d.png');
355+
```
356+
357+
![Image](doc/img/sound_field_localwfs_2d.png)
358+
359+
326360
#### Stereo
327361

328362
The Toolbox includes not only WFS and NFC-HOA, but also some generic sound field

SFS_analysis/freq_response_localwfs.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585

8686
%% ===== Computation ====================================================
8787
% Get the position of the loudspeakers
88-
x0 = secondary_source_positions(conf);
88+
x0_real = secondary_source_positions(conf);
8989
% Generate frequencies (10^0-10^5)
9090
f = logspace(0,5,500)';
9191
% We want only frequencies until f = 20000Hz
@@ -95,7 +95,7 @@
9595
% Get the result for all frequencies
9696
for ii = 1:length(f)
9797
if showprogress, progress_bar(ii,length(f)); end
98-
D = driving_function_mono_localwfs(x0,xs,src,f(ii),conf);
98+
[D, x0] = driving_function_mono_localwfs(x0_real,xs,src,f(ii),conf);
9999
% calculate sound field at the listener position
100100
P = sound_field_mono(X(1),X(2),X(3),x0,greens_function,D,f(ii),conf);
101101
S(ii) = abs(P);

doc/generate_doc_plots.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
conf.localsfs.vss.geometry = 'circular';
152152
conf.localsfs.vss.number = 56;
153153
sound_field_mono_localwfs([-1 1],[-1 1],0,[1.0 -1.0 0],'pw',7000,conf);
154+
axis([-1.1 1.1 -1.1 1.1]);
154155
print_png('img/sound_field_localwfs_2d.png');
155156

156157
% --- spatio-temporal snapshots of the sound field ---

0 commit comments

Comments
 (0)