Commit 1cc4de52 authored by Michael Kohnen's avatar Michael Kohnen

Documentation for spatial audio functions

parent 11306ee7
function [ binOut ] = ita_binauralMixdown( lsSignals, varargin )
%ITA_3DA_BINAURALMIXDOWN Produces a 2-Channel binaural stream out of
%loudspeaker signal(s) and coordinates (given as optional coordinates or
%better: encoded in the itaAudio channel coordinates
%better: encoded in the itaAudio channel coordinates)
% Detailed explanation goes here
opts.HRTF='D:\DATA\sciebo\MKOScripts\HRTFs\2015_ITA-Kunstkopf_HRIR_2ch_D186_1x1_256_v17.daff';
opts.LSPos=itaCoordinates;
opts.HRTF = 'D:\DATA\sciebo\MKOScripts\HRTFs\2015_ITA-Kunstkopf_HRIR_2ch_D186_1x1_256_v17.daff'; % Path to the used HRTF
opts.LSPos = itaCoordinates; % itaCoordinates of the loudspeaker positions
if nargin>1
opts=ita_parse_arguments(opts,varargin);
......
......@@ -12,24 +12,27 @@ function [ varargout ] = ita_hoa_a2bFormat(varargin)
%
% Channel assignment outgoing: W, X, Y, Z
%
if nargin == 4
FLU=varargin{1};
FRD=varargin{2};
BLD=varargin{3};
BRU=varargin{4};
elseif nargin == 1
opts.typeIn=1; % type 2 is for DPA-4 Mics, then channel assignment: FLD, FRU, BLU, BRD
if ( ~isa(varargin{2},'itaAudio') )
assert( varargin{1}.nChannels == 4 )
varargin{1}=merge(varargin{1}(:));
FLU=varargin{1}.ch(1);
FRD=varargin{1}.ch(2);
BLD=varargin{1}.ch(3);
BRU=varargin{1}.ch(4);
assert( varargin{1}.nChannels == 4 )
opts=ita_parse_arguments(opts,varargin{2:end});
elseif ( isa(varargin{1},'itaAudio') && isa(varargin{2},'itaAudio') && isa(varargin{3},'itaAudio') && isa(varargin{4},'itaAudio'))
FLU=varargin{1};
FRD=varargin{2};
BLD=varargin{3};
BRU=varargin{4};
opts=ita_parse_arguments(opts,varargin{5:end});
else
error('Need 4 channel input or 4 inputs');
error('Need 4 channel input or at least 4 itaAudio inputs');
end
type=1; % type 2 is for DPA-4 Mics
switch type
case 1
W = FLU + FRD + BLD + BRU;
......
function [ OutputSignals ] = ita_3da_decodeAmbisonics( Bformat, LoudspeakerPos, varargin )
%ITA_DECODEAMBISONICS Summary of this function goes here
%ITA_DECODEAMBISONICS Decodes a BFormat Signal in ANC with SN3D
%normalization
% Detailed explanation goes here
% BFormat<nmax,LS>
......
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