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
4ebf02cd
Commit
4ebf02cd
authored
Jan 23, 2018
by
Michael Kohnen
Browse files
further renaming, added warnings for older version, new functions
parent
95af82fe
Changes
2
Show whitespace changes
Inline
Side-by-side
applications/SpatialAudio/ita_ctc_channelSeparation.m
0 → 100644
View file @
4ebf02cd
function
[
varargout
]
=
ita_ctc_channelSeparation
(
HRTF_real
,
CTCFilter
,
varargin
)
%ITA_CTC_CHANNELSEPARATION Returns and plots channelseparation for ctc
%systems
% HRTF_real represent the real HRTFs that will occure in the CTC system,
% either as multi-instance itaAudio or coded in channels
% HRTF.ch(1) = HRTF_LS1_Left;
% HRTF.ch(2) = HRTF_LS1_Right;
% HRTF.ch(3) = HRTF_LS2_Left;
% HRTF.ch(4) = HRTF_LS2_Right;
% HRTF.ch(5) = HRTF_LS3_Left;
%
%
end
applications/SpatialAudio/ita_ctc_loudspeaker_signals.m
0 → 100644
View file @
4ebf02cd
function
LSSignals
=
ita_ctc_loudspeaker_signals
(
CTCFilter
,
binauralInput
)
%ITA_CTC_LOUDSPEAKER_SIGNALS Combines binaural input and ctc filter to
%calculate the loudspeaker signals
%
% CTCFilter a multi-instance of itaAudio [ CTC-1L CTC-1R; CTC-2L CTC-2R; ...]
% binauralInput has to be itaAudio with 2 channels
%
%
% Example: loudspeakerSignals=ita_ctc_loudspeaker_signals(CTCFilters_Calculated, BinauralSignalInput)
%% Initialization
if
nargin
<
2
error
(
'CTC:InputArguments'
,
'This function requires two input arguments.'
)
end
binauralInput
=
ita_merge
(
binauralInput
(:));
if
~
isa
(
binauralInput
,
'itaAudio'
)
||
~
isa
(
CTCFilter
,
'itaAudio'
)
error
(
'CTC:InputArguments'
,
'The input variable must be itaAudio objects.'
)
end
% Frequency vectors for the binaural input
if
binauralInput
.
nChannels
~=
2
error
(
'CTC:InputArguments'
,
'The binaural signal must contain two channels.'
)
else
inL
=
binauralInput
.
ch
(
1
);
inR
=
binauralInput
.
ch
(
2
);
end
% Frequency vectors for the CTC filters.
% e.g.: CTC_LR -> transfer function for the filter from the left signal to
% the right loudspeaker.
if
size
(
CTCFilter
,
2
)
~=
2
error
(
'CTC:InputArguments'
,
'The CTC filter must contain two rows.'
)
end
%% CTC filtering
LSSignals
=
itaAudio
(
size
(
CTCFilter
,
1
),
1
);
for
k
=
1
:
size
(
CTCFilter
,
1
)
LSSignals
(
k
)
=
ita_convolve
(
inL
,
CTCFilter
(
k
,
1
))
+
ita_convolve
(
inR
,
CTCFilter
(
k
,
2
));
end
%% Return in time domain as multichannel audio
LSSignals
=
ita_merge
(
LSSignals
(:))
'
;
end
Write
Preview
Markdown
is supported
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