Closed davircarvalho closed 2 years ago
Hi, thanks for your contribution!!! Sorry that it took me so long to continue with SOFA, I plan to integrate everything during the next days:
Br, Miho
Hi Davi, I tried to run your demos "as they are" and it seems that your ITD demo has some issues with resampling (Win10, Matlab R2021b). Can you reproduce the errors on your machine?
>>demo_SOFAgetITD
Index in position 1 exceeds array bounds. Index must not exceed 4098.
Error in signal.internal.resample.uniformResample (line 126)
yTmp2 = yTmp(indV,:);
Error in resample (line 198)
signal.internal.resample.uniformResample(xIn, isDimValSet, Dim, dimIn, numericArgs{:});
Error in SOFAgetITD>resample_this (line 141)
IR(k, l, :) = resample(X(k,l,:), p, q, lpFilt);
Error in SOFAgetITD>sofaResample (line 111)
IR = resample_this(Obj.Data.IR, Fs_sofa, Fs);
Error in SOFAgetITD (line 44)
Obj_upsample = sofaResample(Obj, fs_up);
Error in demo_SOFAgetITD (line 20)
[itd_time, Obj_time] = SOFAgetITD(Obj, 'time', 'thr', 20);
Hi Miho, thanks for the heads up, I managed to reproduce the error, the internal resample
function has changed in Matlab R2021b, but I was still in R2021a that's why I didn't catch it before, but it's fixed now (it was just a simple squeeze() missing) 😄
Hi Davi, the migration should be done; thanks a lot for the contribution!! And thanks for fixing the resample issue so quickly. If you want you can have a look at the master branch. If you are happy we can close the pull request.
I'm glad to contribute, thanks Miho!
Interaural Time Difference (ITD):
SOFAgetITD()
,SOFAplotHRTF()
.ITD estimate for the SimpleFreeFieldHRIR conventions:
Obj.Data.Delay
.ITD visualization:
'ITDhorizontal'
for the functionSOFAplotHRTF()
, which generates a polar plot of the ITD at the horizontal plane;Low-frequency extension (LFE)
SOFAlfe()
.LFE for the SimpleFreeFieldHRIR conventions:
Demos
demo_SOFAgetITD()
anddemo_SOFAlfe
. --Show the use and output visualization obtained with the added/modified functions mentioned above.