Aufgrund einer Wartung wird GitLab am 04.06. zwischen 8:00 und 10:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 04.06. between 8:00 and 10:00 am.

Commit e54d2870 authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

added diffuse field hrtf calculation

parent b5a4a117
......@@ -1124,6 +1124,8 @@ classdef itaHRTF < itaAudio
end
% JRI: isn't this the same as itaHRTF.interp?
function thisS = smooth_spatial(this, varargin)
% function this = smooth_spatial(varargin)
%
......@@ -1233,6 +1235,26 @@ classdef itaHRTF < itaAudio
end
% calculate diffuse field HRTF from data
% taken from
% Equalization methods in binaural technology
% Veronique Larcher et al
function returnData = getDiffuseFieldHRTF(this)
coords = this.getEar('L').channelCoordinates;
[~,weights] = coords.spherical_voronoi;
returnData = itaAudio;
tmp(:,1) = sum(bsxfun(@times,abs(this.getEar('L').freqData).^2,weights.'),2)./(4*pi);
tmp(:,2) = sum(bsxfun(@times,abs(this.getEar('R').freqData).^2,weights.'),2)./(4*pi);
returnData.freqData = tmp;
returnData.signalType = 'power';
returnData.channelNames = {'Left Ear','Right Ear'};
returnData.comment = 'Diffuse Field HRTF';
end
%% Plot
function plot_ITD(varargin)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment