Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

FIR4ALL & LMS4ALL

DSP related issues, mathematics, processing and techniques

FIR4ALL & LMS4ALL

Postby steph_tsf » Wed Mar 04, 2020 12:24 am

As you probably noticed, Dear Flowstoners, the ASIO4ALL "expert mode" is a wonderful tool, that's ideally mating with SAR (Synchronous Audio Router). The ASIOCONFIG utility confirms this. Such robust & flexible ASIO environment has become our workhorse, speaking of a plain normal Win7 32 bit PC. Thanks to its "expert" mode and its centralized approach, ASIO4ALL delivers more flexibility and reliability, than the typical mix of bloated ASIO drivers, you may have endured in the past. For benefitting from ASIO4ALL, if suffices to install the WDM drivers. Do NOT install any supplied ASIO driver, thus. After all WDM drivers duly got installed (motherboard soundcard, USB soundcard, etc), it suffices to install ASIO4ALL. During the install, ASIO4ALL is scanning all the soundcards, and remembering how many audio input channels, and how many audio output channels they feature. It remains your responsibility to go into the Windows Control Panel (Windows Device Manager), for activating, de-activating, or de-installing one or another soundcard. It is that simple.

I will now describe SAR, the "Synchronous Audio Router" that's providing a simple however top-performing hinge between the Windows World, and ASIO.

In the Win7 "Sound" control panel, the "Play" tab will embed a new device named "SAR cable", duly appearing next to your motherboard audio DAC or USB soundcard. It suffices to tell Win7 that the "SAR cable" that got created by SAR, must become the new "default" "Play" audio device. This way, the whole stereo audio Win7 is producing (Foobar, Youtube, Media Player Classic), gets automatically routed to ASIO, actually to the "SAR cable". This way, thanks to the ASIO4ALL "expert mode", all the stereo audio Win7 PC is producing, can enter the Flowstone "ASIO in" primitive, duly embedding the two "SAR cable" pins. Flowstone can then process such stereo audio, the way you want. It is that simple.

I will now describe the way the ASIO4ALL "expert mode" interacts with Flowstone, and the ASIO-converted soundcards.

In case you are relying on a Behringer UMC404HD USB soundcard, you can output four analog audio channels. The ASIO4ALL "expert" mode allows the Flowstone "ASIO out" primitive to embed the four "UMC404HD" output channels. This way, Flowstone can work as two-way speakers stereo crossover, buried into your Win7 PC. It suffices to compile the .fsm as .exe, and tell Win7 to run such .exe at startup.

In case you are relying on a Sound Blaster X-Fi Surround 5.1 Pro USB soundcard, you can output six analog audio channels. The ASIO4ALL "expert" mode allows the Flowstone "ASIO out" primitive to embed the six "X-Fi" output channels. This way, Flowstone can work as three-way speakers stereo crossover, buried into your Win7 PC. It suffices to compile the .fsm as .exe, and tell Win7 to run such .exe at startup. Fortunately, the volume control knob application that's installed by the Win7 Sound Blaster X-Fi Surround 5.1 Pro WDM driver package, is still there when exploiting the soundcard under ASIO4ALL. This way, one can dim the output volume using the remote control, which is bringing the following, tremendous advantage. Instead of asking Flowstone to dim the audio by multiplying the audio by some factor, smaller than one (this ruins the signal/noise ratio at low volume settings), you tell the DAC that's in the soundcard, to apply some high quality hardware-relating audio attenuation. This way, you are not ruining the signal/noise ratio at low volume settings.

Thanks to the ASIO4ALL "expert mode", one can add audio pins to the Flowstone "ASIO in" primitive. The above sound cards feature analog audio inputs. Through the ASIO4ALL "expert mode", one can ASIO-activate and select the USB soundcard analog inputs. The Flowstone "ASIO in" primitive will automatically redraw, embedding the supplementary analog audio pins. This allows the Flowstone .fsm to also embed a stereo VU-meter, spectrum analyzer, or dual channel FFT transfer function analyzer. The dual channel FFT transfer function analyzer can display in real time, and continuously, the gain and the phase of the loudspeaker you are designing. I am relying on 8,192 points windowed FFTs, getting continuously updated every second. In case there are four analog audio input channels (Behringer UMC404HD USB soundcard), one can simultaneously measure the gain and phase a) on-axis, b) 30 degree left and c) 30 degree above. The first analog input channel is of course exploited as reference channel, materializing the required analog loopback that's featuring the zero relative latency. The three other analog input channels serve for real time computing FFT2/FFT1, FFT3/FFT1, and FFT4/FFT1. Graphically programming this on Flowstone, is easy as ABC. The 120 dB multichannel FFT analyzer that was costing the price of a car in the early nineties (Kay Elemetrics DSP Sonagraph DSP5500), is now costing the price of a Flowstone licence. Nowadays, thanks to Flowtone, everybody can enjoy the pleasure of building it, and using it. There is absolutely no need to dig into third-party software like x86 realtime audio libraries, callbacks schemes, etc. It gets all done graphically. I mean, graphically programming.

In such context, I am foreseeing the advent of two small pieces of software, complementing ASIO4ALL and Flowstone.

*** FIR4ALL ***
This is a ASIO-aware stereo FIR filter, the size of the ASIO buffer. The 32-bit IEEE 754 FIR coefficients get stored into a separate, static, file. The FIR4ALL filter shows as a extra ASIO channel, coupled someway to some other ASIO channel.

*** LMS4ALL ***
This is a ASIO-aware Widrow-Hoff LMS Machinery, the size of the ASIO buffer. Its computation is in function of three audio streams : the "plant" input stream, the "plant" output stream, and some "error" stream. The result of the LMS computation is the "estimate" audio stream. In simple applications, the "error" audio stream can be implicit, consisting in the instantaneous difference between the "plant output" audio stream, and the "estimate" audio stream. In more general applications, the "error" stream must be delivered by Flowstone, instead of being implicit. The LMS machinery must be configured by a small file, containing a few 32-bit IEEE 754 values. The LMS machinery must be complemented by a static FIR filter coefficient file, same format as used by FIR4ALL, serving as optional LMS initialization. The LMS machinery can get asked to continuously generate a stereo ASIO channel, that's continuously and "on the fly" outputting the "adapting" FIR coefficients, without disturbing the LMS convergence. The left channel being the coefficients list, and the right channel being the incremented index, all in 32-bit IEEE 754 format.

*** Implementation details ***
FIR4ALL and LMS4ALL could get implemented, basing on one or another audio callback API, say PortAudio in case PortAudio supports the few x86 SSE2 instructions that are required for applying the same 32-bit IEEE 754 FIR coefficients list on four audio streams, simultaneously.
You may start looking at this : http://portaudio.com/docs/v19-doxydocs/compile_windows_asio_msvc.html

Any suggestion welcome
steph_tsf
 
Posts: 249
Joined: Sun Aug 15, 2010 10:26 pm

Return to DSP

Who is online

Users browsing this forum: No registered users and 53 guests