-
Notifications
You must be signed in to change notification settings - Fork 39
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
Combination of dummy_irs() and resampling of Matlab #132
Comments
Maybe the delay line should be responsible if it needs zero-padding? |
Yes, if the signal needs to be delayed in order to achieve optimal interpolation, this should be done in the delay line. https://github.com/sfstoolbox/sfs-matlab/blob/master/SFS_general/delayline.m#L102 seems to be the right place for that. |
As we discussed, if this is done properly, this means figuring out first how Matlab's |
I encountered a problem when using dummy_irs() and Matlab's
resample()
function together.resample()
does not work properly when the to be resampled vector does not contain some zeros at the start and end. This happens since we moved the impulse to the first sample in commit 4b50bd7.An example where this matters: Simulating the impulse response of a linear WFS array with
ir_wfs()
leads to ripples in the frequency response below the aliasing frequency (in this case about 850 Hz). Settingconf.delayline.resampling = 'none'
shows the expected behaviour.My suggestion would be to move the position of the dirac in
dummy_irs()
to e.g. sample 101 (from my experience theresample()
problem is not noticable for this value) and then the additional delay can be substracted by settingconf.ir.hrirpredelay = 100
if this is important to the user for time alignment of stimuli. This procedure would be in accordance with the handling of predelays in HRTF/BRIRs.The text was updated successfully, but these errors were encountered: