Commit dd656b87 authored by Michael Kohnen's avatar Michael Kohnen

added distance loss to hoa decoding, added headphone test fixture to ita device list ITA

parent 3abb151b
......@@ -452,6 +452,11 @@ device(end+1,:) = { 'ITA-KK KE4 Child right','0.0098573 V/Pa','ke4',0};
device(end+1,:) = { 'Neumann-KK left','1 V/Pa','schoeps',1};
device(end+1,:) = { 'Neumann-KK right','1 V/Pa','schoeps',1};
% values are taken from calibration sheets by DKD (Deutscher
% Kalibrierdienst)
device(end+1,:) = { 'GRAS Headphone Testfixture Left','0.01211 V/Pa','RA0401',1};
device(end+1,:) = { 'GRAS Headphone Testfixture Right','0.0124 V/Pa','RA0401',1};
device(end+1,:) = { 'HEAD HMS III with ear simulator - IEC 711','0.01165 V/Pa','none',0};
device(end+1,:) = { 'Hoertnix BTE right front_hwch01','0.0159 V/Pa','none',1};
......
function [ OutputSignals ] = ita_3da_decode( Bformat, LoudspeakerPos, varargin )
function [ OutputSignals ] = ita_hoa_decode( Bformat, LoudspeakerPos, varargin )
%ITA_DECODEAMBISONICS Decodes a BFormat Signal in ANC with SN3D
%normalization
% Detailed explanation goes here
......@@ -6,8 +6,8 @@ function [ OutputSignals ] = ita_3da_decode( Bformat, LoudspeakerPos, varargin )
% BFormat<nmax,LS>
opts.decoding='remax'; % Decoding strategy (remax,inphase,plane)
% opts.decoding='none';
% opts.decoding='none';
opts.distanceloss=true;
opts = ita_parse_arguments(opts,varargin);
% Initializing further parameters
......@@ -68,7 +68,7 @@ if isa(Bformat,'itaAudio')
end
else
for k=1:numel(weights)
Bformat(:,k)=weights(k).*Bformat(:,k);
Bformat(:,k)=weights(k).*Bformat(:,k);
end
end
......@@ -81,7 +81,11 @@ if isa(Bformat,'itaAudio')
for l=1:nmax
temp(l)=Bformat.ch(l)*Yinv(l,k);
end
OutputSignals(k)=sum(temp);
if opts.distanceloss
OutputSignals(k)=sum(temp)*LoudspeakerPos.r(k);
else
OutputSignals(k)=sum(temp);
end
end
OutputSignals=ita_merge(OutputSignals(:));
OutputSignals.channelCoordinates=LoudspeakerPos;
......
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