- added compressor

git-svn-id: http://moon:8086/svn/matlab/trunk@127 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
2020-07-23 11:06:48 +00:00
parent 73c53f30cb
commit 0631c89f10
5 changed files with 191 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
function [lev_out_dB, gain_out_dB] = cmp_gain(R, lev_knee_dB, lev_in_dB)
k = lev_in_dB > lev_knee_dB;
lev_out_dB = (1-k).*lev_in_dB + k.*(lev_knee_dB + R*(lev_in_dB - lev_knee_dB));
gain_out_dB = - (lev_in_dB - lev_out_dB);
endfunction