Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Representation of sound fields and driving functions as circular and spherical harmonics #63

Open
wants to merge 90 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
bbce410
scattering: initial commit
Mar 27, 2014
17c3696
scattering: rename some files
Mar 27, 2014
58a90cd
scattering: fix some minor bugs and add comments
Mar 28, 2014
e9f70a9
scattering: further comments and simplify sound field simulation
Mar 31, 2014
f8b2486
scattering: add some comments and minor changes
Apr 8, 2014
d26418b
scattering: multiple sphere scattering
Mar 27, 2014
c17e284
scattering: add multiple scattering for cylindrical coordinates
Apr 10, 2014
b5e6b63
add regular cylindrical expansion for a line source
Jul 7, 2014
32bc655
Merge branch 'master' into multiplescattering
Apr 13, 2015
202fd20
huge bugfixing and renaming of spherical expansion part
Apr 16, 2015
e7a707c
allow vectors as inputs of index and access function
Apr 16, 2015
fe26afb
improve documentation of spherical translation function
Apr 16, 2015
a1d0253
adapt indexing of scattering function
Apr 16, 2015
ef73339
rework wfs driving function for spherical expansion
Apr 16, 2015
2b505bf
fix some bugs in sphexp_access
Apr 16, 2015
6229fc5
first working version of wfs + spherical expansion
Apr 16, 2015
b9cb9d7
2.5D nfchoa for spherical expansion of soundfield
Apr 24, 2015
c9d90e2
optional computation of tesseral reexpansion coefficients
Apr 24, 2015
14c794f
remove error handling to speed up computation
Apr 24, 2015
a491a4c
check for z-coord of translation vector to speed up computation
Apr 24, 2015
0dd8a06
modal bandlimitation of spherical expansion coefficients
Apr 24, 2015
59d1c86
fix bug due to rebase
Apr 28, 2015
d9f6a69
split test scripts
Apr 28, 2015
cde6b2d
fix bug related to conjugate symmetry relations of spherical harmonics
Apr 28, 2015
9ab4b6d
get order of spherical expansion from size of coefficient array
Apr 30, 2015
236b590
2.5D HOA with variable reference radius (very experimental)
Apr 30, 2015
a1745d1
add plots for testing 2.5HOA with different reference radii
May 13, 2015
f7ed16c
add normalization of driving function in order to get correct sound p…
May 19, 2015
1ae3851
fix bug
May 19, 2015
3f78407
fix obsolete input argument in documentation of nfchoa_sphexp driving…
May 20, 2015
f1dc272
Merge branch 'non_regular_grid' into scatteringtest
May 22, 2015
44ae845
add nfchoa driving in harmonics domain for sphexp
May 22, 2015
eac52a6
some renaming and moving of files
May 22, 2015
509716c
move sphbasis function
May 22, 2015
7e37fbc
calculate sound field out of sht of driving function
May 22, 2015
864bb57
again some renaming
May 22, 2015
f78a98e
add Nse to input parameters instead of conf.
May 22, 2015
aa14d72
bug fixing and restructuring of test scripts
May 22, 2015
8618a9a
add some paths to startup scripts
May 22, 2015
9d5355e
normalize sound field at plot
May 22, 2015
4a298de
spherical expansion of line sources
May 22, 2015
e5dd15a
3-dimensional nfchoa driving function in SHT-domain
May 22, 2015
07e796c
fix bug related to different sizes of X,Y,Z
May 26, 2015
b2d713e
extend frequency parameter to vector
Jun 15, 2015
6e4b28b
add help for checking if argument is squared integer
Jun 15, 2015
b969f12
add conversion function for circular to spherical expansion
Jun 15, 2015
c031dc8
fix bug
Jun 15, 2015
65836e1
add functions to compute truncation order after Kennedy
Jun 16, 2015
49c8480
Merge branch 'master' into scatteringtest
Jun 16, 2015
6004baf
re-structure circular expansion and nfchoa/wfs stuff related to it
Jun 16, 2015
8dd8900
rename soundfield sound for circular expansions
Jun 16, 2015
4a760fc
some modifications on circular translation coefficients
Jun 17, 2015
6e1b29f
add possibility to truncate spectra non-symmetrically
Jun 19, 2015
16fb17d
Merge branch 'master' into scatteringtest
Jun 24, 2015
fb43382
bug fixing and documentation
Jul 20, 2015
dd6356e
compute translation coefficients for various frequencies
Jul 22, 2015
4de0352
remove 2D ccase from nfchoa_sht_sphexp
Jul 30, 2015
931c5a3
add sht of nfchoa driving function for point source
Jul 30, 2015
5206de9
add functions computing shts of nfchoa driving functions for specific…
Jul 30, 2015
7dc5ba0
polish doc for sphexp functions
Aug 10, 2015
4900195
polish doc of sht functions
Aug 10, 2015
6d40adb
polish doc for circexp functions
Aug 10, 2015
14a129f
Merge branch 'master' into scatteringtest
Nov 4, 2015
c640603
adjust functions to new plotting routines
Nov 4, 2015
c8eaaa8
fix comments
Nov 26, 2015
d3c9b05
fix normalization for 2.5D NFC-HOA driving function for spherically e…
Dec 2, 2015
8eebb94
Merge branch 'master' into scatteringtest
Feb 9, 2016
e3a945a
fix some dimension issues
Feb 9, 2016
96d0586
review code for circexp
Feb 10, 2016
3b4ee16
review code for sphexp
Feb 10, 2016
5bfc15b
review driving functions
Feb 12, 2016
8714bd7
fix bug related to interpretation of xyz grids
Feb 17, 2016
90d5026
support vectors for temporal frequency in nfchoa_sphexp driving function
Feb 18, 2016
8f24883
Merge branch 'master' into harmonics
Feb 19, 2016
f14513a
fix SFS_config call
Feb 19, 2016
e263680
Merge branch 'master' into harmonics
Jun 23, 2016
36a557d
fix bug in circular translation coefficients
Jun 23, 2016
c9bf933
simplify circular translation further
Jun 23, 2016
a56e6d2
rename some variables in test script for spherical expansions
Jun 23, 2016
5e762fb
add 2.5D driving functions for wfs and validation routine
Jun 29, 2016
f3c9cd5
add LWFS with virtual scatterer to validation function
Jun 29, 2016
d42c91d
add NFCHOA for circexp and shpexp to validation function
Jun 30, 2016
ef90fcc
Merge branch 'master' into harmonics
Jun 30, 2016
ccb56b6
some minor fixes for validation script
Jun 30, 2016
438a58b
remove doubled code by re-using harmonics transform of driving functions
Jul 1, 2016
9adc1fb
make modus argument optional
Jul 1, 2016
d026963
fix startup script
Jul 1, 2016
f35cb60
compute soundfield from circular harmonics driving function
Jul 1, 2016
9d158a8
Update style in circexp
Dec 15, 2016
d6c8886
Update style in sphexp
Dec 15, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions SFS_general/besselh_derived.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
function out = besselh_derived(nu,k,z)
% BESSELH_DERIVED derivative of cylindrical hankel function of k kind of order nu, and argument z
%
% Usage: out = besselh_derived(nu,k,z)
%
% Input parameters:
% nu - order of bessel function
% z - argument of bessel function
%
% Output parameters:
% out - value of bessel function at point z
%
% BESSELH_DERIVED(nu,z) derivation of cylindrical hankel function of
% order nu, k kind, and argument z
%
% References:
% (4.1-51) in Ziomek (1995) - "Fundamentals of acoustic field theory
% and space-time signal processing"
%
% see also: besselh

%*****************************************************************************
% Copyright (c) 2010-2014 Quality & Usability Lab, together with *
% Assessment of IP-based Applications *
% Telekom Innovation Laboratories, TU Berlin *
% Ernst-Reuter-Platz 7, 10587 Berlin, Germany *
% *
% Copyright (c) 2013-2014 Institut fuer Nachrichtentechnik *
% Universitaet Rostock *
% Richard-Wagner-Strasse 31, 18119 Rostock *
% *
% This file is part of the Sound Field Synthesis-Toolbox (SFS). *
% *
% The SFS is free software: you can redistribute it and/or modify it under *
% the terms of the GNU General Public License as published by the Free *
% Software Foundation, either version 3 of the License, or (at your option) *
% any later version. *
% *
% The SFS is distributed in the hope that it will be useful, but WITHOUT ANY *
% WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
% FOR A PARTICULAR PURPOSE. *
% See the GNU General Public License for more details. *
% *
% You should have received a copy of the GNU General Public License along *
% with this program. If not, see <http://www.gnu.org/licenses/>. *
% *
% The SFS is a toolbox for Matlab/Octave to simulate and investigate sound *
% field synthesis methods like wave field synthesis or higher order *
% ambisonics. *
% *
% http://github.com/sfstoolbox/sfs [email protected] *
%*****************************************************************************


%% ===== Checking input parameters =======================================
nargmin = 3;
nargmax = 3;
narginchk(nargmin,nargmax);
isargscalar(nu)
isargscalar(k)
isargnumeric(z)


%% ===== Computation =====================================================
out = 0.5*(besselh(nu-1,k,z) - besselh(nu+1,k,z));
62 changes: 62 additions & 0 deletions SFS_general/besselj_derived.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
function out = besselj_derived(nu,z)
% BESSELJ_DERIVED derivative of cylindrical bessel function of order nu, and argument z
%
% Usage: out = besselh_derived(nu,z)
%
% Input parameters:
% nu - order of bessel function
% z - argument of bessel function
%
% Output parameters:
% out - value of bessel function at point z
%
% BESSELJ_DERIVED(nu,z) derivation of cylindrical bessel function of
% order nu, and argument z
%
% References:
% (4.1-51) in Ziomek (1995) - "Fundamentals of acoustic field theory
% and space-time signal processing"
%
% see also: besselj

%*****************************************************************************
% Copyright (c) 2010-2014 Quality & Usability Lab, together with *
% Assessment of IP-based Applications *
% Telekom Innovation Laboratories, TU Berlin *
% Ernst-Reuter-Platz 7, 10587 Berlin, Germany *
% *
% Copyright (c) 2013-2014 Institut fuer Nachrichtentechnik *
% Universitaet Rostock *
% Richard-Wagner-Strasse 31, 18119 Rostock *
% *
% This file is part of the Sound Field Synthesis-Toolbox (SFS). *
% *
% The SFS is free software: you can redistribute it and/or modify it under *
% the terms of the GNU General Public License as published by the Free *
% Software Foundation, either version 3 of the License, or (at your option) *
% any later version. *
% *
% The SFS is distributed in the hope that it will be useful, but WITHOUT ANY *
% WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
% FOR A PARTICULAR PURPOSE. *
% See the GNU General Public License for more details. *
% *
% You should have received a copy of the GNU General Public License along *
% with this program. If not, see <http://www.gnu.org/licenses/>. *
% *
% The SFS is a toolbox for Matlab/Octave to simulate and investigate sound *
% field synthesis methods like wave field synthesis or higher order *
% ambisonics. *
% *
% http://github.com/sfstoolbox/sfs [email protected] *
%*****************************************************************************

%% ===== Checking input parameters =======================================
nargmin = 2;
nargmax = 2;
narginchk(nargmin,nargmax);
isargscalar(nu)
isargnumeric(z)

%% ===== Computation =====================================================
out = 0.5*(besselj(nu-1,z) - besselj(nu+1,z));
65 changes: 65 additions & 0 deletions SFS_general/sphbesselh_derived.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
function out = sphbesselh_derived(nu,k,z)
% SPHBESSELH_DERIVED derivative of spherical hankel function of k kind of order nu, and argument z
%
% Usage: out = sphbesselh_derived(nu,k,z)
%
% Input parameters:
% nu - order of bessel function
% z - argument of bessel function
%
% Output parameters:
% out - value of bessel function at point z
%
% SPHBESSELH_DERIVED(nu,z) derivation of spherical hankel function of
% order nu, k kind, and argument z
%
% References:
% (4.1-51) in Ziomek (1995) - "Fundamentals of acoustic field theory
% and space-time signal processing"
%
% see also: sphbesselh

%*****************************************************************************
% Copyright (c) 2010-2014 Quality & Usability Lab, together with *
% Assessment of IP-based Applications *
% Telekom Innovation Laboratories, TU Berlin *
% Ernst-Reuter-Platz 7, 10587 Berlin, Germany *
% *
% Copyright (c) 2013-2014 Institut fuer Nachrichtentechnik *
% Universitaet Rostock *
% Richard-Wagner-Strasse 31, 18119 Rostock *
% *
% This file is part of the Sound Field Synthesis-Toolbox (SFS). *
% *
% The SFS is free software: you can redistribute it and/or modify it under *
% the terms of the GNU General Public License as published by the Free *
% Software Foundation, either version 3 of the License, or (at your option) *
% any later version. *
% *
% The SFS is distributed in the hope that it will be useful, but WITHOUT ANY *
% WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
% FOR A PARTICULAR PURPOSE. *
% See the GNU General Public License for more details. *
% *
% You should have received a copy of the GNU General Public License along *
% with this program. If not, see <http://www.gnu.org/licenses/>. *
% *
% The SFS is a toolbox for Matlab/Octave to simulate and investigate sound *
% field synthesis methods like wave field synthesis or higher order *
% ambisonics. *
% *
% http://github.com/sfstoolbox/sfs [email protected] *
%*****************************************************************************


%% ===== Checking input parameters =======================================
nargmin = 3;
nargmax = 3;
narginchk(nargmin,nargmax);
isargscalar(nu)
isargscalar(k)
isargnumeric(z)


%% ===== Computation =====================================================
out = 1/(2*nu+1) * (nu*sphbesselh(nu-1,k,z) - (nu+1)*sphbesselh(nu+1,k,z));
64 changes: 64 additions & 0 deletions SFS_general/sphbesselj_derived.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
function out = sphbesselj_derived(nu,z)
% SPHBESSELJ_DERIVED derivative of spherical bessel function of first kind of order nu, and argument z
%
% Usage: out = sphbesselj_derived(nu,z)
%
% Input parameters:
% nu - order of bessel function
% z - argument of bessel function
%
% Output parameters:
% out - value of bessel function at point z
%
% SPHBESSELJ_DERIVED(nu,z) derivation of spherical bessel function of
% order nu, first type, and argument z
%
% References:
% (4.1-51) in Ziomek (1995) - "Fundamentals of acoustic field theory
% and space-time signal processing"
%
% see also: sphbesselj

%*****************************************************************************
% Copyright (c) 2010-2014 Quality & Usability Lab, together with *
% Assessment of IP-based Applications *
% Telekom Innovation Laboratories, TU Berlin *
% Ernst-Reuter-Platz 7, 10587 Berlin, Germany *
% *
% Copyright (c) 2013-2014 Institut fuer Nachrichtentechnik *
% Universitaet Rostock *
% Richard-Wagner-Strasse 31, 18119 Rostock *
% *
% This file is part of the Sound Field Synthesis-Toolbox (SFS). *
% *
% The SFS is free software: you can redistribute it and/or modify it under *
% the terms of the GNU General Public License as published by the Free *
% Software Foundation, either version 3 of the License, or (at your option) *
% any later version. *
% *
% The SFS is distributed in the hope that it will be useful, but WITHOUT ANY *
% WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
% FOR A PARTICULAR PURPOSE. *
% See the GNU General Public License for more details. *
% *
% You should have received a copy of the GNU General Public License along *
% with this program. If not, see <http://www.gnu.org/licenses/>. *
% *
% The SFS is a toolbox for Matlab/Octave to simulate and investigate sound *
% field synthesis methods like wave field synthesis or higher order *
% ambisonics. *
% *
% http://github.com/sfstoolbox/sfs [email protected] *
%*****************************************************************************


%% ===== Checking input parameters =======================================
nargmin = 2;
nargmax = 2;
narginchk(nargmin,nargmax);
isargscalar(nu)
isargnumeric(z)


%% ===== Computation =====================================================
out = 1/(2*nu+1) * (nu*sphbesselj(nu-1,z) - (nu+1)*sphbesselj(nu+1,z));
64 changes: 64 additions & 0 deletions SFS_general/sphbessely_derived.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
function out = sphbessely_derived(nu,z)
% SPHBESSELY_DERIVED derivative of spherical bessel function of second kind of order nu, and argument z
%
% Usage: out = sphbessely_derived(nu,z)
%
% Input parameters:
% nu - order of bessel function
% z - argument of bessel function
%
% Output parameters:
% out - value of bessel function at point z
%
% SPHBESSELY_DERIVED(nu,z) derivation of spherical bessel function of
% order nu, second type, and argument z
%
% References:
% (4.1-51) in Ziomek (1995) - "Fundamentals of acoustic field theory
% and space-time signal processing"
%
% see also: sphbesselj

%*****************************************************************************
% Copyright (c) 2010-2014 Quality & Usability Lab, together with *
% Assessment of IP-based Applications *
% Telekom Innovation Laboratories, TU Berlin *
% Ernst-Reuter-Platz 7, 10587 Berlin, Germany *
% *
% Copyright (c) 2013-2014 Institut fuer Nachrichtentechnik *
% Universitaet Rostock *
% Richard-Wagner-Strasse 31, 18119 Rostock *
% *
% This file is part of the Sound Field Synthesis-Toolbox (SFS). *
% *
% The SFS is free software: you can redistribute it and/or modify it under *
% the terms of the GNU General Public License as published by the Free *
% Software Foundation, either version 3 of the License, or (at your option) *
% any later version. *
% *
% The SFS is distributed in the hope that it will be useful, but WITHOUT ANY *
% WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
% FOR A PARTICULAR PURPOSE. *
% See the GNU General Public License for more details. *
% *
% You should have received a copy of the GNU General Public License along *
% with this program. If not, see <http://www.gnu.org/licenses/>. *
% *
% The SFS is a toolbox for Matlab/Octave to simulate and investigate sound *
% field synthesis methods like wave field synthesis or higher order *
% ambisonics. *
% *
% http://github.com/sfstoolbox/sfs [email protected] *
%*****************************************************************************


%% ===== Checking input parameters =======================================
nargmin = 2;
nargmax = 2;
narginchk(nargmin,nargmax);
isargscalar(nu)
isargnumeric(z)


%% ===== Computation =====================================================
out = 1/(2*nu+1) * (nu*sphbessely(nu-1,z) - (nu+1)*sphbessely(nu+1,z));
Loading