📄 deemp.f,v
字号:
head 1.3;access;symbols;locks; strict;comment @* @;1.3date 96.03.20.15.54.37; author jaf; state Exp;branches;next 1.2;1.2date 96.03.14.22.11.13; author jaf; state Exp;branches;next 1.1;1.1date 96.02.07.14.44.53; author jaf; state Exp;branches;next ;desc@@1.3log@Added comments about which indices of array arguments are read orwritten.Added entry INITDEEMP to reinitialize the local state variables, ifdesired.@text@******************************************************************** DEEMP Version 48** $Log: deemp.f,v $* Revision 1.2 1996/03/14 22:11:13 jaf* Comments added explaining which of the local variables of this* subroutine need to be saved from one invocation to the next, and which* do not.** Revision 1.1 1996/02/07 14:44:53 jaf* Initial revision********************************************************************** De-Emphasize output speech with 1 / ( 1 - .75z**-1 )* cascaded with 200 Hz high pass filter* ( 1 - 1.9998z**-1 + z**-2 ) / ( 1 - 1.75z**-1 + .78z**-2 )* * WARNING! The coefficients above may be out of date with the code* below. Either that, or some kind of transformation was performed* on the coefficients above to create the code below.** Input:* N - Number of samples* Input/Output:* X - Speech* Indices 1 through N are read before being written.* * This subroutine maintains local state from one call to the next. If* you want to switch to using a new audio stream for this filter, or* reinitialize its state for any other reason, call the ENTRY* INITDEEMP.* SUBROUTINE DEEMP( X, N )* Arguments INTEGER N REAL X(N)* Local variables that need not be saved INTEGER K REAL DEI0* Local state* All of the locals saved below were not given explicit initial* values in the original code. I think 0 is a safe choice. REAL DEI1, DEI2, DEO1, DEO2, DEO3 SAVE DEI1, DEI2, DEO1, DEO2, DEO3 DATA DEI1/0./, DEI2/0./, DEO1/0./, DEO2/0./, DEO3/0./ DO K = 1,N DEI0 = X(K) X(K) = X(K) - 1.9998*DEI1 + DEI2 1 + 2.5*DEO1 - 2.0925*DEO2 + .585*DEO3 DEI2 = DEI1 DEI1 = DEI0 DEO3 = DEO2 DEO2 = DEO1 DEO1 = X(K) END DO RETURN ENTRY INITDEEMP () DEI1 = 0. DEI2 = 0. DEO1 = 0. DEO2 = 0. DEO3 = 0. RETURN END@1.2log@Comments added explaining which of the local variables of thissubroutine need to be saved from one invocation to the next, and whichdo not.@text@d6 5d22 2a23 1* below.d27 1a27 1* In/Output:d29 6d43 1a43 1* Local variablesd46 6a51 1 REAL DEI0, DEI1, DEI2, DEO1, DEO2, DEO3d53 1a53 2* NO SAVE NECESSARY K* NO SAVE NECESSARY DEI0a54 1 DATA DEI1/0./, DEI2/0./, DEO1/0./, DEO2/0./, DEO3/0./d57 1a57 4* WARNING!* * All of the locals saved above should be given explicit initial* values. I think 0. is a good choice.d71 12@1.1log@Initial revision@text@d5 4a8 1* $Log$d15 3d25 4a28 1 INTEGER N, Kd30 4d35 11@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -