Added two Filters that enhance and dampen around a target range

Filter format matches readme. Can handle dual channel audio
This commit is contained in:
TurtleEmperorx 2021-12-09 18:26:28 -08:00
parent cef36db11f
commit 95a079e224
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
function output_x = AnuragDampenTarget(x, Fs,TARGET, AreaPercentage) function output_x = AnuragDampenTarget(x, Fs,LOW, MID, HIGH)
%Dampen a range of frequencies a percentage around the target frequency %Dampen a range of frequencies a percentage around the target frequency
%Also maintain the other frequencies so that the target is muted %Also maintain the other frequencies so that the target is muted
%percentage is expressed as a number between 0 and 1. %percentage is expressed as a number between 0 and 1.
@ -8,6 +8,8 @@ function output_x = AnuragDampenTarget(x, Fs,TARGET, AreaPercentage)
% Anurag Jadhav: function creator % Anurag Jadhav: function creator
% Detailed explanation goes here % Detailed explanation goes here
TARGET = MID;
AreaPercentage = 0.15;
[dim,len] = size(x); %get length of the input [dim,len] = size(x); %get length of the input
F = Fs * ((-len/2) : ((len/2) - 1)) / len; F = Fs * ((-len/2) : ((len/2) - 1)) / len;
lenf = length(F); lenf = length(F);

View File

@ -1,4 +1,4 @@
function output_x = AnuragEnchanceTarget(x, Fs,TARGET, AreaPercentage) function output_x = AnuragEnchanceTarget(x, Fs,LOW, MID, HIGH)
%Amplify a range of frequencies a percentage around the target frequency %Amplify a range of frequencies a percentage around the target frequency
%Also damnpen the other frequencies so that the target is easier to hear %Also damnpen the other frequencies so that the target is easier to hear
%percentage is expressed as a number between 0 and 1. %percentage is expressed as a number between 0 and 1.
@ -8,6 +8,8 @@ function output_x = AnuragEnchanceTarget(x, Fs,TARGET, AreaPercentage)
% Anurag Jadhav: function creator % Anurag Jadhav: function creator
% Detailed explanation goes here % Detailed explanation goes here
TARGET = MID;
AreaPercentage = 0.15;
[dim,len] = size(x); %get length of the input [dim,len] = size(x); %get length of the input
F = Fs * ((-len/2) : ((len/2) - 1)) / len; F = Fs * ((-len/2) : ((len/2) - 1)) / len;
lenf = length(F); lenf = length(F);