first, read these article.
Sandy Bridge CPU has much power, I could run straight FIR for 3 way crossover.
I'm using Core i7-2630QM.
3 way or more channel divider (0-960, 960-3200, 3200-), by 2048 Taps FIR filter at 44.1kHz
just requires up-to-date CPU.
System Requirement for AVX VST
SSE version: VST_SSEFIR
11/13/2011 Modified frequency control
(1) Source code: attached, VST_SSEFIR.cpp.txt
I can not post full source code because of Steinberg. Please get VisualStudio 2010 C++ express / Steinberg VST SDK to build.
(2) VST DLL, attached. 32bit, SSE2 required, maybe any SandyBridge over 2GHz will work.
you can see straight FIR convolution around line 550.
Straight FIR Calculation
I'm unrolling inner loop.
I specified /arch:SSE2. the code was compiled like below,
SSE2 enabled, xmm is 128bit registers.
I remember that 2 or 3 years ago, straight FIR filter was impossible task for CPU.
AVX version: VST_AVXFIR
This version was compiled by Visual Studio 2010 Professional C++, with "/arch:AVX" option.
! This VST will crush if your CPU / OS does not support AVX !
This VST takes 2 parameters, Frequency Low Cut / High Cut. for LPF, leave FreqLo = 0, HPF, FreqHi = 44100.
See detail of AVX programming in the code.
ymm : 256bit register, contains 8 of float.
vmulps: multiply 8 floats x 8 floats = 8 floats at one time.
vaddps: add 8 floats + 8 floats = 8 floats at one time.
The reason why the code is complicated:
(1) AVX requires 32 bytes aligned memory access.
(2) FIR calculation is one by one stepping.
So I prepared "Offset" input stream, type 0 to type 7, then calculating.
Now one track is using 0.9% of CPU power.
I also tried OpenMP, but it was too slow. Starting new thread takes much overhead for short cycle VST processing.
Delay processing: VST_KoonDelay
This is very simple delay processor. It just process delay on the buffer, never changes signal.
When parameter "Samples" = 7, this routine will delay the signal for 7 PCM samples = 340m/sec * 7 / 44100 = 53.9mm.
AVX FIR based EQ : VST_AVXFIREQ
This is 32 band Simple EQ. You don't have to worry about phase modification.
AVX FIR Based DRC : VST_AVXFIRDRC
This parameter is just a dummy, change this parameter to re-load Frequency-gain file.
You can specify Response Gain in dB, for each FIR frequency. Place this file at C:\VST\FreqRes_Input.txt.
FIR filter can process around 20dB/step.
(1) running 4 way crossover on PC
Fan Less PC. Core i3-2120T, Scythe Ninja3 cooler, picoPSU 150 XT, MSI H61 ITX
(2) exaU2I USB to I2S x4 interface, and 4 way full digital amplifier
(3) 3 way speaker (LINN Komponent 104) + modified BIC DV84 (network removed) as woofer
don't have audio interface?
(a) to try PC Channel Divider (crossover), you only need 7.1 analog out audio interface.
(b) If you have HDMI audio output and AV amplifier, you can try HDMI digital connection.
Configure your AV amp to accept 7.1 channel from HDMI.
Wrap HDMI audio by ASIO4ALL, and try to configure VST host.
(I don't have HDMI output and AV amplifier now, so I can not show how to.)
and you can use Front, Surround, Surround back output for Low, Mid, High output.
! Try carefully !
use single full-range speaker to listen each channel, to confirm Low / Mid / High output is configured correctly.
How to compile the source code
you need Steinberg's VST SDK (2.4), VisualStudio 2010 Professional C++, and some knowledge.
1st, try to build sample VST by yourself. then replace source code to attached, and adjust project setting.
I'm using C:\VST folder to place these VST. for safety I recommend you will place them on same folder C:\VST as me.