• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Foobar second harmonic generation plugin

kingofworms

Member
Joined
Apr 24, 2023
Messages
6
Likes
4
Location
Vienna
To test the audibility of pure second-order distortion I have written a Foobar plugin which simulates a quadratic transfer function. On the configuration dialog of the plugin, you can set the desired level of the second harmonic in 24 steps between -150dB and -12dB and also turn it off completely. When processing is active (not in 'Off' state), there is around 2dB of attenuation. As the transfer function gets more "quadratic", there is an increasing DC offset present on the output which needs to be compensated for and attenuation is necessary to avoid clipping.
If you feel like it, you can try the plugin and post the minimum level which makes an audible difference. Additional information on your equipment and music you were listening to would be nice.
I did not have access to an additional PC without Visual Studio installed, so you may have to download and install the VC runtime from Microsoft.
Just let me know if you have any problems and I will try to fix them.
 

Attachments

  • foo_dsp_quadratic.zip
    23.7 KB · Views: 146
Last edited:
To test the audibility of pure second-order distortion I have written a Foobar plugin which simulates a quadratic transfer function. On the configuration dialog of the plugin, you can set the desired level of the second harmonic in 24 steps between -150dB and -12dB and also turn it off completely. When processing is active (not in 'Off' state), there is around 2dB of attenuation. As the transfer function gets more "quadratic", there is an increasing DC offset present on the output which needs to be compensated for and attenuation is necessary to avoid clipping.
If you feel like it, you can try the plugin and post the minimum level which makes an audible difference. Additional information on your equipment and music you were listening to would be nice.
I did not have access to an additional PC without Visual Studio installed, so you may have to download and install the VC runtime from Microsoft.
Just let me know if you have any problems and I will try to fix it.
Do you know the already existing one from one of the forum members ( @pkane ) ?

 
DISTORT lets you mix all kinds of different distortions together and adjust the relative strengths of each. A much simplified version for playing with just the harmonic distortion is also available as a VST plugin:

https://distortaudio.org/pkharmonic.html

I just wanted to offer an alternative for people who do not have the possibility to use VST plugins.
 
-150dB to -12db?

I didn't try the software, but here's my thought.

A single "clean" electric bass guitar note (electrical signal).

I had to pluck several times before I could get the second harmonic lower in level than the fundamental.

You might want to raise the -12dB limit for the additional harmonic.

If not, I can imagine it may just be on the edge of audibility.

Example: 70dB peak 2nd harmonic below.


index.php


Add -12db second harmonic, get less than a 2dB change if the harmonic is in phase with the fundamental (coherent), and assuming the new second harmonic is also in phase with the existing second if it is in phase. Otherwise, less of a rise.

1682338495416.png


Music is chock full of "harmonic distortion" already, it's what makes things sound like they do.

I realize you'll also be adding harmonics to the existing harmonics, too, but the second is probably the most inoffensive of the series.

If I'm thinking wrong let me know.

At what level do you hear a change in music?
 
By all means, the more, the merrier! :) By the way, Foobar supports VST plugins, so PKHarmonic runs in Foobar.

Okay, I clearly missed the fact that there is a plugin for Foobar which can load DST effects :)
 
If I'm thinking wrong let me know.

At what level do you hear a change in music?

My intention was to check the audibility of second-order distortion on music, which already contains harmonics. The maximum setting (-12dB) corresponds to 25% THD which is insanely high in terms of "modern" equipment (DAC, preamp, amp, ...) performance.

Currently, I do not have any decent system at my disposal, so I was testing with a Sony WH-1000XM3 connected via Bluetooth to my PC. It sounds awful even without any kind of added distortion. To be honest, at levels under -48dB I could not hear any difference.

Will do more testing when I get home.
 
Last edited:
Note that the attenuation is constant at all settings (except for 'Off' which does not alter the signal).
 
Last edited:
Back
Top Bottom