LMMS / lmms

Cross-platform music production software
https://lmms.io
GNU General Public License v2.0
8.06k stars 1k forks source link

Multiband EQ - Distorted Sound #1885

Closed musikBear closed 9 years ago

tresf commented 9 years ago

Steps to reproduce:

  1. Open a new project
  2. Open the default Triple Oscillator instrument
  3. Add effect to instrument via FX tab,Add Effect
  4. In the browse window find LADSPA: Multiband EQ
  5. Preview the Triple Oscillator by pressing a note
  6. Sound is distorted.

image


Original inadequate bug report: (per @musikbear)

from forum a user reported that ladspa multiband eq is 'defect' It indeed does create serious distortion, and is of no use at all. Considering the number of other eq's in factory-pack, and how well lmms uses advanged vst-eq's, it could simply be omitted -imo

tresf commented 9 years ago

I've milestoned this for 1.2 because as @musikbear states, the plugin is otherwise worthless. I'm curious if @curlymorphic has some ideas as to the cause of this distortion, since he has some experience in the EQ plugin area... :)

geedubess commented 9 years ago

I wouldn't say that this plugin is 'worthless', but it's not optimal. It would be many fewer cycles / lines of code to perform convolution in the time domain vs (DFT + multiplication in the frequency domain + IFT), but it should get the job done, and that seems to be the criteria here. (:

diizy commented 9 years ago

Why not use FFT? We have libs for that...

geedubess commented 9 years ago

It is indeed using an FFT lib - fftw3. On a signal like this, you're technically performing a Discrete Fourier Transform - that's just part of the terminology (most of the time when you do a FFT it's a DFT). I'm not super familiar with signal processing on the beefy x86 arch, so maybe FFT/IFFT is how it's usually done - you can implement a FIR or IIR filter with much less cpu cost if you're trying to optimize it (say, for a DSP that's running many filters, or a lower-powered processor) - you can basically do it all in the time domain without the costly FFT/IFFT steps. I swear, it seemed like magic when I first learned it. (;But anyways, I may be steering it off topic. I'm curious to see if my changes satisfy the distortion that was seen (as precisely what sort of unwanted distortion was observed wasn't especially clear, but I did see gain being applied even with all knobs at unity).

diizy commented 9 years ago

Well depending on the size of the impulse used, convolution done via FFT/IFFT can actually be faster than doing the equivalent convolution in the time domain.

Since (I assume) we here have multiple cacaded filters, and the frequency response of each filter only has to be calculated when the parameters are changed, I'd assume that FFT is actually the faster option here.

musikBear commented 9 years ago

looks like both c*preampIII & IV has similar problem -not fully that distorted, but a serious crackle in win32 (1.1.3)

tresf commented 9 years ago

Closed via #1897, added to release notes.