From 911a15a75a7905d1cbe92cded006986948f689aa Mon Sep 17 00:00:00 2001 From: ascpixi <44982772+ascpixi@users.noreply.github.com> Date: Mon, 23 Dec 2024 01:23:22 +0100 Subject: [PATCH] fix(docs): fix LaTeX rendering in README --- readme.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/readme.md b/readme.md index f96b7e7..823b746 100644 --- a/readme.md +++ b/readme.md @@ -8,43 +8,43 @@ In an HFTNN forward transform, the following steps are performed: 1. Given a discrete signal $x[n]$, the signal is partitioned into non-overlapping, windowed segments of length $N$. Each segment is denoted as $x_{\text{chunk}}[k]$, where $k$ is the segment index. - $$ - x_{\text{chunk}}[k] = x[n], \quad \text{for } n = kN \text{ to } (k+1)N - 1 - $$ +$$ +x_{\text{chunk}}[k] = x[n], \quad \text{for } n = kN \text{ to } (k+1)N - 1 +$$ 2. The Fourier transform of each segment $x_{\text{chunk}}[k]$ is denoted as $X_{\text{chunk}}[k]$. - $$ - X_{\text{chunk}}[k] = \mathcal{F}\left(x_{\text{chunk}}[k]\right) - $$ +$$ +X_{\text{chunk}}[k] = \mathcal{F}\left(x_{\text{chunk}}[k]\right) +$$ 3. For each Fourier transform bin, harmonics are selected within a specified range of octaves, including neighboring bins. Let $\text{HFT}$ be the resulting array. - $$ - \text{HFT}[j] = \left[\text{magnitude}, \text{phase}\right] - $$ +$$ +\text{HFT}[j] = \left[\text{magnitude}, \text{phase}\right] +$$ Here, $j$ represents the index iterating over the selected harmonics and neighboring bins. 4. The frequency corresponding to each harmonic is calculated using the function $\text{freq}(j)$. The corresponding FFT bin index is denoted as $\text{binIdx}(j)$. - $$ - \text{freq}(j) = \text{intervalToFreq}\left(j, \text{fundamental}, \text{frequenciesInOctave}\right) - $$ +$$ +\text{freq}(j) = \text{intervalToFreq}\left(j, \text{fundamental}, \text{frequenciesInOctave}\right) +$$ - $$ - \text{binIdx}(j) = \text{freqToFftBin}\left(\text{freq}(j), \text{sampleRate}, \text{signalLength}\right) - $$ +$$ +\text{binIdx}(j) = \text{freqToFftBin}\left(\text{freq}(j), \text{sampleRate}, \text{signalLength}\right) +$$ 5. To handle edge cases where the computed bin index $\text{binIdx}$ and neighboring indices $\text{idx}$ may exceed array bounds, a conditional statement is used. - $$ - \text{HFT}[j] = - \begin{cases} - [0, 0], & \text{if } \text{idx} < 0 \text{ or } \text{idx} \geq \text{bins.length} \\ - [\text{magnitude}, \text{phase}], & \text{otherwise} - \end{cases} - $$ +$$ +\text{HFT}[j] = +\begin{cases} +[0, 0], & \text{if } \text{idx} < 0 \text{ or } \text{idx} \geq \text{bins.length} \\ +[\text{magnitude}, \text{phase}], & \text{otherwise} +\end{cases} +$$ A similar algorithm is employed for the inverse temporal transform.