itaRavenProject

-functions returning IRs as itaAudios now make sure that the number of samples is even
parent 98b404d8
......@@ -2160,6 +2160,10 @@ classdef itaRavenProject < handle
monauralIRitaAudio(iSrc,iRec).samplingRate = obj.sampleRate;
monauralIRitaAudio(iSrc,iRec).signalType = 'energy';
monauralIRitaAudio(iSrc,iRec).channelNames{1} = obj.receiverNames{iRec};
%Make sure number of samples is even
if mod(monauralIRitaAudio(iSrc,iRec).nSamples,2)==1
monauralIRitaAudio(iSrc,iRec).timeData(end, :) = [];
end
end
end
end
......@@ -2204,6 +2208,10 @@ classdef itaRavenProject < handle
monauralIRitaAudio(iSrc,iRec).samplingRate = obj.sampleRate;
monauralIRitaAudio(iSrc,iRec).signalType = 'energy';
monauralIRitaAudio(iSrc,iRec).channelNames{1} = obj.receiverNames{iRec};
%Make sure number of samples is even
if mod(monauralIRitaAudio(iSrc,iRec).nSamples,2)==1
monauralIRitaAudio(iSrc,iRec).timeData(end, :) = [];
end
end
end
end
......@@ -2222,6 +2230,10 @@ classdef itaRavenProject < handle
monauralIRitaAudio(iSrc,iRec).samplingRate = obj.sampleRate;
monauralIRitaAudio(iSrc,iRec).signalType = 'energy';
monauralIRitaAudio(iSrc,iRec).channelNames{1} = obj.receiverNames{iRec};
%Make sure number of samples is even
if mod(monauralIRitaAudio(iSrc,iRec).nSamples,2)==1
monauralIRitaAudio(iSrc,iRec).timeData(end, :) = [];
end
end
end
end
......@@ -2255,6 +2267,10 @@ classdef itaRavenProject < handle
if isempty(binauralIRitaAudio(iSrc,iRec)); continue; end
binauralIRitaAudio(iSrc,iRec).channelNames{1} = [obj.receiverNames{iRec} '_Left'];
binauralIRitaAudio(iSrc,iRec).channelNames{2} = [obj.receiverNames{iRec} '_Right'];
%Make sure number of samples is even
if mod(binauralIRitaAudio(iSrc,iRec).nSamples,2)==1
binauralIRitaAudio(iSrc,iRec).timeData(end, :) = [];
end
end
end
end
......@@ -2288,6 +2304,10 @@ classdef itaRavenProject < handle
if isempty(binauralIRitaAudio(iSrc,iRec)); continue; end
binauralIRitaAudio(iSrc,iRec).channelNames{1} = [obj.receiverNames{iRec} '_Left'];
binauralIRitaAudio(iSrc,iRec).channelNames{2} = [obj.receiverNames{iRec} '_Right'];
%Make sure number of samples is even
if mod(binauralIRitaAudio(iSrc,iRec).nSamples,2)==1
binauralIRitaAudio(iSrc,iRec).timeData(end, :) = [];
end
end
end
end
......@@ -2321,6 +2341,10 @@ classdef itaRavenProject < handle
if isempty(binauralIRitaAudio(iSrc,iRec)); continue; end
binauralIRitaAudio(iSrc,iRec).channelNames{1} = [obj.receiverNames{iRec} '_Left'];
binauralIRitaAudio(iSrc,iRec).channelNames{2} = [obj.receiverNames{iRec} '_Right'];
%Make sure number of samples is even
if mod(binauralIRitaAudio(iSrc,iRec).nSamples,2)==1
binauralIRitaAudio(iSrc,iRec).timeData(end, :) = [];
end
end
end
end
......@@ -2337,6 +2361,10 @@ classdef itaRavenProject < handle
if isempty(binauralPoissonSequenceitaAudio); return; end
binauralPoissonSequenceitaAudio.channelNames{1} = [obj.receiverNames{end} '_Left'];
binauralPoissonSequenceitaAudio.channelNames{2} = [obj.receiverNames{end} '_Right'];
%Make sure number of samples is even
if mod(binauralPoissonSequenceitaAudio.nSamples,2)==1
binauralPoissonSequenceitaAudio.timeData(end, :) = [];
end
end
%------------------------------------------------------------------
......@@ -2439,6 +2467,10 @@ classdef itaRavenProject < handle
[deg, ord] = ita_sph_linear2degreeorder(linInd);
ambisonicsIRita(iSrc,iRec).channelNames{linInd} = [obj.receiverNames{iRec} '_Degree(' num2str(deg) ')_Order(' num2str(ord) ')'];
end
%Make sure number of samples is even
if mod(ambisonicsIRita(iSrc,iRec).nSamples,2)==1
ambisonicsIRita(iSrc,iRec).timeData(end, :) = [];
end
end
end
end
......@@ -2473,6 +2505,10 @@ classdef itaRavenProject < handle
[deg, ord] = ita_sph_linear2degreeorder(linInd);
ambisonicsIRita(iSrc,iRec).channelNames{linInd} = [obj.receiverNames{iRec} '_Degree(' num2str(deg) ')_Order(' num2str(ord) ')'];
end
%Make sure number of samples is even
if mod(ambisonicsIRita(iSrc,iRec).nSamples,2)==1
ambisonicsIRita(iSrc,iRec).timeData(end, :) = [];
end
end
end
end
......@@ -2507,6 +2543,10 @@ classdef itaRavenProject < handle
[deg, ord] = ita_sph_linear2degreeorder(linInd);
ambisonicsIRita(iSrc,iRec).channelNames{linInd} = [obj.receiverNames{iRec} '_Degree(' num2str(deg) ')_Order(' num2str(ord) ')'];
end
%Make sure number of samples is even
if mod(ambisonicsIRita(iSrc,iRec).nSamples,2)==1
ambisonicsIRita(iSrc,iRec).timeData(end, :) = [];
end
end
end
......@@ -2541,6 +2581,10 @@ classdef itaRavenProject < handle
for linInd = 1 : vbapIRita(iSrc,iRec).nChannels
vbapIRita(iSrc,iRec).channelNames{linInd} = [obj.receiverNames{iRec} '_Speaker_' num2str(linInd)];
end
%Make sure number of samples is even
if mod(vbapIRita(iSrc,iRec).nSamples,2)==1
vbapIRita(iSrc,iRec).timeData(end, :) = [];
end
end
end
end
......@@ -2574,6 +2618,10 @@ classdef itaRavenProject < handle
for linInd = 1 : vbapIRita(iSrc,iRec).nChannels
vbapIRita(iSrc,iRec).channelNames{linInd} = [obj.receiverNames{iRec} '_Speaker_' num2str(linInd)];
end
%Make sure number of samples is even
if mod(vbapIRita(iSrc,iRec).nSamples,2)==1
vbapIRita(iSrc,iRec).timeData(end, :) = [];
end
end
end
end
......@@ -2607,6 +2655,10 @@ classdef itaRavenProject < handle
for linInd = 1 : vbapIRita(iSrc,iRec).nChannels
vbapIRita(iSrc,iRec).channelNames{linInd} = [obj.receiverNames{iRec} '_Speaker_' num2str(linInd)];
end
%Make sure number of samples is even
if mod(vbapIRita(iSrc,iRec).nSamples,2)==1
vbapIRita(iSrc,iRec).timeData(end, :) = [];
end
end
end
......
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