Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
402e2a03
Commit
402e2a03
authored
Dec 06, 2017
by
Michael Kohnen
Browse files
Simple binaural mixdown for ambisonics signals
parent
ad3f6de7
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/SpatialAudio/ita_3da_binauralMixdown.m
0 → 100644
View file @
402e2a03
function
[
binOut
]
=
ita_3da_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
% Detailed explanation goes here
opts
.
HRTF
=
'D:\DATA\sciebo\MKOScripts\HRTFs\2015_ITA-Kunstkopf_HRIR_2ch_D186_1x1_256_v17.daff'
;
opts
.
LSPos
=
itaCoordinates
;
if
nargin
>
1
opts
=
ita_parse_arguments
(
opts
,
varargin
);
end
if
~
(
isa
(
lsSignals
,
'itaAudio'
)
&&
(
lsSignals
.
nChannels
>
0
))
error
(
'First input must be itaAudio with at least one channel'
)
end
if
opts
.
LSPos
.
nPoints
<
1
opts
.
LSPos
=
lsSignals
.
channelCoordinates
;
if
opts
.
LSPos
.
nPoints
<
1
error
(
'We need some channel coordinates!'
);
end
end
hrtfSet
=
itaHRTF
(
'DAFF'
,
opts
.
HRTF
);
binOut
=
itaAudio
;
for
k
=
1
:
lsSignals
.
nChannels
hrtf
=
hrtfSet
.
findnearestHRTF
(
opts
.
LSPos
.
n
(
k
));
convolved
=
ita_convolve
(
lsSignals
.
ch
(
k
),
hrtf
);
if
k
==
1
binOut
=
convolved
;
else
binOut
=
binOut
+
convolved
end
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment