Closed vancymoon closed 7 years ago
Hi,
as I deduce from your error message (line 116 in driving_function_imp_nfchoa_ps
) you are trying to simulate 3D NFC-HOA, so I guess you set conf.dimension = '3D'
.
The error occurs as we have only implemented the 2.5D variant of a point source for NFC-HOA in 2.5D in the time domain. Unfortunately, 2D and 3D are not yet implemented in the time domain, so you cannot create binaural simulations for those setups and NFC-HOA, but only for a 2.5D setup (which means using a circular loudspeaker array consisting of point sources).
@fietew: are we able to implement the 3D variant or will it be complicated?
Yes the coefficients are basically the same as for the 2.5D variant, see http://sfstoolbox.org/en/latest/#sec-driving-functions-nfchoa-sdm-point-source. We can reuse the radial filters from https://github.com/sfstoolbox/sfs-matlab/blob/master/SFS_time_domain/driving_function_imp_nfchoa.m#L90 and just change the summation + incorporating the spherical harmonics.
Here's another user who would like to use 3D NFC HOA :-D
Good news, 3D NFC-HOA in the time domain is now implemented (in the master branch).
Which means ir_nfchoa()
should now also work for 3D setups. Note, that you need a proper 3D HRTF data set in order to do it. You could use HRIR_FULL2DEG.sofa or FABIAN_HRIR_measured_HATO_0.sofa for this purpose.
All you have to do is then
conf = SFS_config;
conf.dimension = '3D';
hrirs = SOFAload('FABIAN_HRIR_measured_HATO_0.sofa');
ir = ir_nfchoa([0 0 0],0,[3 3 -3],'ps',hrirs,conf);
If you would like to use exactly the same loudspeaker setup as measured by the HRTFs, you could use
conf.secondary_sources.x0 = hrirs;
Otherwise you have to decide for a grid, which can be equally_spaced_points
or gauss
:
>> conf.secondary_sources.grid
ans =
equally_spaced_points
Included in new 2.4.0 release.
When I try to use the
ir_nfchoa
functionErrors occur:
How can I solve this problem?