Important message! Free Software under attack! See News

Denormals

The Problem

When floating point values dip below a certain threshhold, they become very expensive for the CPU to process (up to 100x slower). This is referred to as a denormal number. All audio processing in Non and in LADSPA plugins is performed on floating point sample values which are subject to this issue. Many LADSPA plugins can generate denormal values internally.

The way these plugins are usually built for various Linux distributions leaves this problem open.

You'll know you have an issue with denormals when Non Mixer's CPU usage spikes when fed silence or when using certain plugins with certain settings causes the CPU usage to increase far more than expected.

The Remedy

The LADSPA plugins you intend to use must be compiled with the appropriate CPU tuning options to use SSE2 for all floating point math. This can be done for most CPUs by adding the following options to the GCC command line (probably via the CFLAGS environment variable)

-msse2 -mfpmath=sse -ffast-math

Non Mixer will set the FTZ and DAZ CPU flags, which eliminate the problem of denormals for all code compiled with -msse2 -mfpmath=sse. These flags do nothing for code which was not compiled properly (i.e. most distro provided plugin packages).

Note that the -ffast-math option can cause errors in some code, but it is generally safe to use on DSP plugins. Many plugins rely on libraries like libfftw3, therefore it can also be worthwhile to compile these libraries with the appropriate optimizations.

It's worthwhile to see if your Linux distribution includes a facility for recomiling packages. On Debian, apt-build performs this function.

Also, file a bug report for the plugin package with your distribution!

(locked)

This work is licensed under a Creative Commons License