Skip to content

Commit

Permalink
add white space
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyolicoris committed Mar 29, 2024
1 parent 033c85d commit 0958f60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,23 @@ def compexp_gain(
$$
x_{\rm rms}[n] = \alpha_{\rm rms} x^2[n] + (1 - \alpha_{\rm rms}) x_{\rm rms}[n-1]
$$

$$
x_{\rm log}[n] = 20 \log_{10} x_{\rm rms}[n]
$$

$$
g_{\rm log}[n] = \min\left(0, \left(1 - \frac{1}{CR}\right)\left(CT - x_{\rm log}[n]\right), \left(1 - \frac{1}{ER}\right)\left(ET - x_{\rm log}[n]\right)\right)
$$

$$
g[n] = 10^{g_{\rm log}[n] / 20}
\hat{g}[n] = \begin{rcases} \begin{dcases}
\alpha_{\rm at} g[n] + (1 - \alpha_{\rm at}) \hat{g}[n-1] & \text{if } g[n] < g[n-1]
\alpha_{\rm rt} g[n] + (1 - \alpha_{\rm rt}) \hat{g}[n-1] & \text{otherwise}
\end{dcases}\end{rcases}
$$

$$
y[n] = \hat{g}[n] x[n]
$$

0 comments on commit 0958f60

Please sign in to comment.