HydrogenAudio

Hydrogenaudio Forum => Scientific Discussion => Topic started by: emo_hp on 2017-05-26 15:41:38

Title: Windows Audio Calibration
Post by: emo_hp on 2017-05-26 15:41:38
Hi All!

I'm new to the forum. I like foobar and all the plugins. But I faced one problem which I cannot solve as a developer.

So in short:
Is there a way to use foobar DSP plugins on Windows audio level like Audio Processing Object (APO) first introduced in WIndows Vista.

My setup:
Foo_record plugin with "record://" link added in the playlist, played with 50ms (minimal latency) and some DSPs added. Installed VB Cable (In/Out virtual audio driver) and it is selected as default windows sound device, foobar is set to use the physical sound card (in my case audio DAC).

All this works great with Mathaudio Room_EQ, my calibration microphones, and sometimes dynamic compressors. But the problem is I got some increasing delay over time (especially after hibernate) where I need to restart playback periodically. Also on my atom tablets the delay is bigger.

I also managed to "copy" calibration to cheap Panasonic Condenser Mics (2-3 EUR) without any additional electronics and the result is quite good, difference is only hard-noticeable when a quality Audio DAC is used (where I believe the problem is that I calibrate a particular Mic to a particular laptop input, which is standard lo-quality sound card).

So the real problem is: as a C# developer I don't know how (and if it deserves the efforts if possible) to create an "foobar" source application directly controlling the plugins and output setting (which is based on C++). But generally even automated, it would be external component, not on APO level almost like "driver". Of course it could be converted to be APO compatible/installable somehow. But generally if something already exists, something like "APO foobar Plugin processor" would be great. There is a ton of useful plugins that can make whole audio to sound really hi-end...

If someone can help me... thanks in advice.
I'm open to questions for non-experienced users who want to know more about audio calibration, setup, mics and so.

EQs are 1, room calibrators - absolutely different story. Most audiophiles don't like EQs. And it's normal - they make linear response but phase is totally out of sync - not like sound but more like a noise with a particular frequency. On other hand additional phase correction (+ resonance canceling as a bonus) always make better sound even on a hi-end system (as no system is absolutely in sync thru the whole response). Removing that "correction" (a bad word for audiophiles) makes the sound ugly, unclear and so... I tested tenths of systems including hi-end ones... almost no exception... only one - it was an auto-correcting car amplifier where nothing can help consistently.

Thanks in advice,
Emo
Title: Re: Windows Audio Calibration
Post by: Arnold B. Krueger on 2017-05-27 14:13:47

EQs are 1, room calibrators - absolutely different story. Most audiophiles don't like EQs.

The reason why is the massive propaganda campaign. When equalizers first showed up in consumer gear, dealers told me that they feared that consumers would use them to make cheap gear sound as good as expensive gear.  The response was years of propaganda, some of which appears to be reflected below:

Quote
And it's normal - they make linear response but phase is totally out of sync - not like sound but more like a noise with a particular frequency. On other hand additional phase correction (+ resonance canceling as a bonus) always make better sound even on a hi-end system (as no system is absolutely in sync thru the whole response). Removing that "correction" (a bad word for audiophiles) makes the sound ugly, unclear and so... I tested tenths of systems including hi-end ones... almost no exception... only one - it was an auto-correcting car amplifier where nothing can help consistently.

As long as the phase errors are equal in both channels, not much chance of hearing them unless they are massive - high triple digit in degrees or above.

If the errors are dynamic, also not a lot of chance of hearing them, even if pretty massive. 

Above about 1 KHz the ears lack any hardware to perceive phase, and such perceptions of phase that might be heard, are usually heard due to possible frequency response errors that the phase errors might create.

So, like I said, the propaganda about phase and equalizers is very pervasive and people mostly have to be educated to grow out of it.
Title: Re: Windows Audio Calibration
Post by: DVDdoug on 2017-05-27 15:23:04
The biggest difference in "sound quality" between microphones is usually frequency response.    But, most professional mics are directional so you'll pick-up more "direct sound" and less noise with a directional/cardioid mic.

Quote
I also managed to "copy" calibration to cheap Panasonic Condenser Mics (2-3 EUR) without any additional electronics and the result is quite good, difference is only hard-noticeable when a quality Audio DAC is used (where I believe the problem is that I calibrate a particular Mic to a particular laptop input, which is standard lo-quality sound card).
I assume you mean 'ADC'. ;)

The mic preamps built into laptops & consumer soundcards are often noisy and they are unbalanced (2-wire) which only work with cheap "computer mics".    If you boost any frequencies with EQ, you'll boost the noise, making it even worse.

Stage & studio mics use a balanced (3-wire) connection and studio condensers require 48V phantom power (Electret computer mics use 5V power.).  So, you can't  use a cheap computer mic with a good USB audio interface, preamp, or mixer.  For quality recording (from a microphone) I consider a "regular soundcard" to be generally useless.    (For recording line-level sources many regular soundcards are adequate, but most laptops don't have line-in.)
Title: Re: Windows Audio Calibration
Post by: emo_hp on 2017-06-05 22:46:50
Hi All,

Thanks for the answers. But actually they're off-topic.

About mics - this Panasonic IS NOT JUST A RANDOM MIC, but it's one of the best condenser mics. 2-3 EUR. A lot of hi-end best omni-directional mics are made with it.
I have a circuit diagram to make it balanced, but the idea is small and portable. So i use it unbalanced (with no circuit) and laptop input. Of course I try to compensate this by pre-calibration both - mic+input.
No matter the idea is mobility, let's say the magic happens on 90%. Of course with some problem with when calibrating with low volume - especially in the highs.

About the propaganda... I have a lot of hi-end audio experience and I tell you - digital compensation is many, many times better than passive one.
Out of sync of course is hard to hear. But really easy to recognize - no crystal clear sound, no details at all... That's why 2-way and more systems are by default not clear. And most full-range systems are really good, but they don't have linear output. If you use EQ on full-range system - better throw it and listen on ear-plugs :)
But a smart person would calibrate the sound with phase-compensation, so not only he won't destroy the sound, but actually he would improve it making it times better as far as possible, only limited by physical limitations:
1. System's frequency response
2. System's noise level
3. System's cross-over not-correctable wave changes
4. Random resonance or distortion sounds
5. System's build-in audio-shit corrections (anything more than a EQ is not desirable, best is with no corrections at all)

Generally speaking an cheap full-range driver (20-50$) capable of producing desired frequencies in a closed box, with good amp (even good IC 10$), quality audio DAC (20(IC)-150$(behringer for example)) and non-empty listening room would be calibrated really good enough beating system for up to 10 000$ and more. But in the same room I doubt any hi-ultra-end speakers and amplifier would produce better sound without calibration... This is a conclusion from my experience.

So generally let's be more in-topic - I need a software solution to make the things even more easy to achieve. That way I will help many people not to go crazy on things that are so easy to achieve with budget no more than 300$ - less than absolutely entry commercial level and far best than 4-5000$ commercial systems. Sound is nature! - not a way to earn money ;)

A lot of my friends just were not able to believe what they heart from their "great" systems after calibration. And when after 5-10 minutes of listening I bypass it - they usually ask: "Are you serious? Is that really the sound I'm listening last years or you're just kidding me?"...

Thanks,
I'm open to any questions. I would help to anybody sharing my experience and insights for free.

p.s. Of course I listen on one of the best budget studio monitors, but that's a choice - to minimize the hardware limitations and not to try to compete with engineers where I'm weak - wood, speakers calculation and acoustics. And of course - better design.
Title: Re: Windows Audio Calibration
Post by: Juha on 2017-06-06 08:11:52
...
So in short:
Is there a way to use foobar DSP plugins on Windows audio level like Audio Processing Object (APO) first introduced in WIndows Vista.

I don't think so (without re-writing them to APO's) but you can allways use VAC to go through Foobar .... Have you tried with VB-Audio's Voicemeeter Banana? BTW, there are VAC software with VST support on the markets (example: http://ddmf.eu/virtual-audio-stream/ ).

My setup:
Foo_record plugin with "record://" link added in the playlist, played with 50ms (minimal latency) and some DSPs added. Installed VB Cable (In/Out virtual audio driver) and it is selected as default windows sound device, foobar is set to use the physical sound card (in my case audio DAC).

All this works great with Mathaudio Room_EQ, my calibration microphones, and sometimes dynamic compressors. But the problem is I got some increasing delay over time (especially after hibernate) where I need to restart playback periodically. Also on my atom tablets the delay is bigger.

Delay usually comes from input buffers (driver) ... ASIO, WDM or KS (Voicemeeter Banana I/O options) allows use smaller I/O buffer sizes and therefore gives the lowest delay but also the plug-ins in chain can produce delay which is then harder to controll.

So the real problem is: as a C# developer I don't know how (and if it deserves the efforts if possible) to create an "foobar" source application directly controlling the plugins and output setting (which is based on C++). But generally even automated, it would be external component, not on APO level almost like "driver". Of course it could be converted to be APO compatible/installable somehow. But generally if something already exists, something like "APO foobar Plugin processor" would be great. There is a ton of useful plugins that can make whole audio to sound really hi-end...

AFAIK, C# isn't very common language in area of DSP/Audio programming (API's usually for C/C++).

Couple APO related:
Audio API for Windows (Voicemeeter) - http://www.kvraudio.com/forum/viewtopic.php?f=33&t=463843
EqualizerAPO (Voicemeeter) - https://sourceforge.net/p/equalizerapo/discussion/general/thread/be655f99/#eee2
Title: Re: Windows Audio Calibration
Post by: Arnold B. Krueger on 2017-06-06 22:35:15
Hi All!

I'm new to the forum. I like foobar and all the plugins. But I faced one problem which I cannot solve as a developer.

So in short:
Is there a way to use foobar DSP plugins on Windows audio level like Audio Processing Object (APO) first introduced in WIndows Vista.

I would imagine so, but there is a UI for the Windows Equalizer APO called Peace/APO. It controls windows audio and so any audio source including FoooBar can exploit it.  https://sourceforge.net/projects/peace-equalizer-apo-extension/

Quote
I managed to "copy" calibration to cheap Panasonic Condenser Mics (2-3 EUR) without any additional electronics and the result is quite good, difference is only hard-noticeable when a quality Audio DAC is used (where I believe the problem is that I calibrate a particular Mic to a particular laptop input, which is standard lo-quality sound card).

If you are speaking about the WM61 product, http://industrial.panasonic.com/cdbs/www-data/pdf/ABA5000/ABA5000CE22.pdf  then it is a fine mic for the price. It shows up in a number of products and has aggressively been cloned around the Pacific rim. If you follow my line, you will find a calibration curve that suggests that it can be used quite effectively without adding the curve, because the curve is so smooth and flat that its audible consequences are minimal to vanishing.

The known shortcomings of this mic are less-than-optimal dynamic range and noise performance.  I first built a project using it back in the 80s. It's been around a long time!  It has been alleged by some that the well known Behringer ECM8000 measurement-style mic and its numerous clones are just a clones of this capsule with minimal circuitry including an unbalanced to the balanced conversion circuit.

Speaking of that, most microphones are composed of a grounded element and an insulated element and are therefore inherently unbalanced, which is why they need additional circuitry (often FET-based) to provide a normal balanced output. There are a few exceptions but just a few.

Balanced operation's actual advantage is the rejection of outside noise, as opposed to lower inherent noise. A balanced noise circuit necessarily has two noise sources, so its inherent noise is actually increased over an unbalanced reference by about 3 dB.  However, its output may be 6 dB higher than the unbalanced reference circuit, so there is a possible 3 dB advantage for dynamic range, which frankly is not all that dramatic.

Tiny mics are often noisy because their diaphragms are so tiny that the number air molecules that strike them is so small that you are more likely to hear their individual contributions.
Title: Re: Windows Audio Calibration
Post by: Juha on 2017-06-07 10:02:05
...
I would imagine so, but there is a UI for the Windows Equalizer APO called Peace/APO. It controls windows audio and so any audio source including FoooBar can exploit it.  https://sourceforge.net/projects/peace-equalizer-apo-extension/
...

Hmm... filters you define for EqualizerAPO (in config.txt and included command files) are processed by the EqualizerAPO code and AFAIK, Peace is just a tool for to work with a command file (maybe defaulted to peace.txt ?) which is then included in config.txt for EqualizerAPO use ... but anyway, REW + EqualizerAPO could be usable combination for OP.
Also, keep in mind that APO 'layer' is bypassed by certain driver APIs as like ASIO, WASAPI Exclusive Mode.
Title: Re: Windows Audio Calibration
Post by: emo_hp on 2017-06-12 14:37:51
Hi All!

I'm new to the forum. I like foobar and all the plugins. But I faced one problem which I cannot solve as a developer.

So in short:
Is there a way to use foobar DSP plugins on Windows audio level like Audio Processing Object (APO) first introduced in WIndows Vista.

I would imagine so, but there is a UI for the Windows Equalizer APO called Peace/APO. It controls windows audio and so any audio source including FoooBar can exploit it.  https://sourceforge.net/projects/peace-equalizer-apo-extension/

Quote
I managed to "copy" calibration to cheap Panasonic Condenser Mics (2-3 EUR) without any additional electronics and the result is quite good, difference is only hard-noticeable when a quality Audio DAC is used (where I believe the problem is that I calibrate a particular Mic to a particular laptop input, which is standard lo-quality sound card).

If you are speaking about the WM61 product, http://industrial.panasonic.com/cdbs/www-data/pdf/ABA5000/ABA5000CE22.pdf  then it is a fine mic for the price. It shows up in a number of products and has aggressively been cloned around the Pacific rim. If you follow my line, you will find a calibration curve that suggests that it can be used quite effectively without adding the curve, because the curve is so smooth and flat that its audible consequences are minimal to vanishing.

The known shortcomings of this mic are less-than-optimal dynamic range and noise performance.  I first built a project using it back in the 80s. It's been around a long time!  It has been alleged by some that the well known Behringer ECM8000 measurement-style mic and its numerous clones are just a clones of this capsule with minimal circuitry including an unbalanced to the balanced conversion circuit.

Speaking of that, most microphones are composed of a grounded element and an insulated element and are therefore inherently unbalanced, which is why they need additional circuitry (often FET-based) to provide a normal balanced output. There are a few exceptions but just a few.

Balanced operation's actual advantage is the rejection of outside noise, as opposed to lower inherent noise. A balanced noise circuit necessarily has two noise sources, so its inherent noise is actually increased over an unbalanced reference by about 3 dB.  However, its output may be 6 dB higher than the unbalanced reference circuit, so there is a possible 3 dB advantage for dynamic range, which frankly is not all that dramatic.

Tiny mics are often noisy because their diaphragms are so tiny that the number air molecules that strike them is so small that you are more likely to hear their individual contributions.


Perfect post! Thank you! All true and facts!

About the mic I know about the existing calibration files exists, but looking at the difference I think best average is no calibration at all :)
My "calibration copy" is more to compensate direct condenser mic usage + imperfections of normal laptop input. The results are quite good and without this "copy", direct mic usage without calibration is not OK, actually it destroys the sound when used for calibration.
Title: Re: Windows Audio Calibration
Post by: vburel on 2017-06-14 07:41:39
...
So in short:
Is there a way to use foobar DSP plugins on Windows audio level like Audio Processing Object (APO) first introduced in WIndows Vista.

I don't think so (without re-writing them to APO's) but you can allways use VAC to go through Foobar .... Have you tried with VB-Audio's Voicemeeter Banana? BTW, there are VAC software with VST support on the markets (example: http://ddmf.eu/virtual-audio-stream/ ).

in fact yes, you can build a client application connected to Voicemeeter audio outputs (thanks to its specific audio API) , then you can practically process PC Audio output (for any sources connected to Voicemeeter). We made a example of 8x8 gain matrix working as APO with Voicemeeter : (Source code included in Voicemeeter Remote API SDK) : http://vbaudio.jcedeveloppement.com/forum/viewtopic.php?f=8&t=394