Skip to content

Commit

Permalink
Fix FFT dynamic range insufficient
Browse files Browse the repository at this point in the history
Fix it by moving gain from analysis to synthesis
  • Loading branch information
james34602 committed Jun 24, 2022
1 parent b8dede7 commit 50e8986
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion Plugin/Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 172,6 @@ void LiveProgrammableDSP::processBlock(AudioBuffer<float>& buffer, MidiBuffer&)
{
// number of samples per buffer
const int n = buffer.getNumSamples();
const int pcmChannels = 6;
// input channels
const float *inputs[6] = { buffer.getReadPointer(0), buffer.getReadPointer(1), buffer.getReadPointer(2), buffer.getReadPointer(3), buffer.getReadPointer(4), buffer.getReadPointer(5) };
// output channels
Expand Down
4 changes: 1 addition & 3 deletions nseel-compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 589,7 @@ void STFT_DynInit(int32_t *indexFw, float *analysisWnd)
getAsymmetricWindow(analysisWnd, synthesisWnd, indexFw[0], ovpSmps, indexFw[5] / (float)32767);
// Pre-shift window function
for (i = 0; i < indexFw[0] - indexFw[2]; i )
synthesisWnd[i] = synthesisWnd[i indexFw[2]];
for (i = 0; i < indexFw[0]; i )
analysisWnd[i] *= (1.0f / indexFw[0]) * 0.5f;
synthesisWnd[i] = synthesisWnd[i indexFw[2]] * (1.0f / indexFw[0]) * 0.5f;
}
int32_t STFTCartesian(float *indexer, float *analysisWnd, float *ptr)
{
Expand Down

0 comments on commit 50e8986

Please sign in to comment.