diff --git a/Level_1/SSC.m b/Level_1/SSC.m index 766e706..4a03c4f 100644 --- a/Level_1/SSC.m +++ b/Level_1/SSC.m @@ -29,7 +29,7 @@ function frameType = SSC(~, nextFrameT, prevFrameType) % Determines the type of the next frame % Filters frame - nextFrameT = filter([0.7548, -0.7548], [1, -0.5095], nextFrameT, [], 1); + nextFrameT = filter([0.7548 -0.7548], [1 -0.5095], nextFrameT, [], 1); channelFrameType = {'nan', 'nan'}; diff --git a/Level_1/decoded2.wav b/Level_1/decoded2.wav index 374d997..e0c852d 100644 Binary files a/Level_1/decoded2.wav and b/Level_1/decoded2.wav differ diff --git a/Level_1/filterbank.m b/Level_1/filterbank.m index 3cd3b4e..6e126cd 100644 --- a/Level_1/filterbank.m +++ b/Level_1/filterbank.m @@ -20,19 +20,19 @@ function frameF = filterbank(frameT, frameType, winType) persistent kaiserWindowLong kaiserWindowShort sinWindowLong sinWindowShort; if isempty(kaiserWindowLong) || isempty(kaiserWindowShort) || ... isempty(sinWindowLong) || isempty(sinWindowShort) - kaiserLong = kaiser(1024, 6*pi); + kaiserLong = kaiser(1025, 6*pi); kaiserSumLong = sum(kaiserLong); - kaiserShort = kaiser(128, 4*pi); + kaiserShort = kaiser(129, 4*pi); kaiserSumShort = sum(kaiserShort); - kaiserWindowLong(1:1024) = movsum(kaiserLong, [1024 0]); - kaiserWindowLong(1025:2048) = movsum(flipud(kaiserLong), [0 1024]); + kaiserWindowLong(1:1024) = movsum(kaiserLong(1:1024), [1024 0]); + kaiserWindowLong(1025:2048) = movsum(flipud(kaiserLong(1:1024)), [0 1024]); kaiserWindowLong = sqrt(kaiserWindowLong ./ kaiserSumLong); sinWindowLong = sin(pi * ((0:2047) + 0.5) / 2048); - kaiserWindowShort(1:128) = movsum(kaiserShort, [128 0]); - kaiserWindowShort(129:256) = movsum(flipud(kaiserShort), [0 128]); + kaiserWindowShort(1:128) = movsum(kaiserShort(1:128), [128 0]); + kaiserWindowShort(129:256) = movsum(flipud(kaiserShort(1:128)), [0 128]); kaiserWindowShort = sqrt(kaiserWindowShort ./ kaiserSumShort); sinWindowShort = sin(pi * ((0:255) + 0.5) / 256); diff --git a/Level_1/iFilterbank.m b/Level_1/iFilterbank.m index d8bcc87..7ab0f56 100644 --- a/Level_1/iFilterbank.m +++ b/Level_1/iFilterbank.m @@ -20,19 +20,19 @@ function frameT = iFilterbank(frameF, frameType, winType) persistent kaiserWindowLong kaiserWindowShort sinWindowLong sinWindowShort; if isempty(kaiserWindowLong) || isempty(kaiserWindowShort) || ... isempty(sinWindowLong) || isempty(sinWindowShort) - kaiserLong = kaiser(1024, 6*pi); + kaiserLong = kaiser(1025, 6*pi); kaiserSumLong = sum(kaiserLong); - kaiserShort = kaiser(128, 4*pi); + kaiserShort = kaiser(129, 4*pi); kaiserSumShort = sum(kaiserShort); - kaiserWindowLong(1:1024) = movsum(kaiserLong, [1024 0]); - kaiserWindowLong(1025:2048) = movsum(flipud(kaiserLong), [0 1024]); + kaiserWindowLong(1:1024) = movsum(kaiserLong(1:1024), [1024 0]); + kaiserWindowLong(1025:2048) = movsum(flipud(kaiserLong(1:1024)), [0 1024]); kaiserWindowLong = sqrt(kaiserWindowLong ./ kaiserSumLong); sinWindowLong = sin(pi * ((0:2047) + 0.5) / 2048); - kaiserWindowShort(1:128) = movsum(kaiserShort, [128 0]); - kaiserWindowShort(129:256) = movsum(flipud(kaiserShort), [0 128]); + kaiserWindowShort(1:128) = movsum(kaiserShort(1:128), [128 0]); + kaiserWindowShort(129:256) = movsum(flipud(kaiserShort(1:128)), [0 128]); kaiserWindowShort = sqrt(kaiserWindowShort ./ kaiserSumShort); sinWindowShort = sin(pi * ((0:255) + 0.5) / 256);