Digital H2 <=> Chebyshev polys ?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hello,


Nelson Pass explores different areas, and plays with subtle amounts of second and third harmonics. He developped the H2 generator to experience this: http://www.firstwatt.com/pdf/art_h2.pdf


I have a full digital system, that makes this difficult to use except having a DAC=>H2=>ADC conversion.


Would the usage of Chebyshev poly allow me to do the same thing in my system ? (x+k*(2*x^2-1)) to generate additional parametrable H2 ?


Would this approach have inconvenience ?


I have seen some LADSPA or CSOUND plugins implementing this type of thing.


Best regards,


JMF
 
Hello,


Nelson Pass explores different areas, and plays with subtle amounts of second and third harmonics...

I have a full digital system...


If using Sabre dacs, the harmonic distortion compensation registers can be used to add or subtract H2 and or H3. However, the dacs sound best with minimum distortion, IME.

Also, the actual distortion curve may be level dependent in an actual analog piece of gear and thus possibly exhibit more complex behavior than the ESS HD comp registers can emulate. Take for example the Pass Laps HPA-1 headphone amp measurements at Stereophile (see Fig. 4): Pass Labs HPA-1 headphone amplifier Measurements | Stereophile.com

That being said, I have listened to HPA-1 and while it sounds good at first, the HD is not my cup of tea. That's mainly because of the associated IMD which is always present along with any HD. If listening to a small jazz ensemble, it may sound good, but switch to more complex music and all the different instruments playing at the same time become mushed together into a combined sound-texture rather than sounding like what they really are on a recording, separate instruments.
 
Last edited:
If using Sabre dacs, the harmonic distortion compensation registers can be used to add or subtract H2 and or H3. However, the dacs sound best with minimum distortion, IME.

To our ears we find that the ESS sounds best with the THD compensation block disabled - even if this resultant in slightly higher distortion. I'm guessing we are hearing the effects of the extra mathematics rather then the THD which is so low anyway.
 
Hello,


Thanks for the feedbacks. So, I don't use Sabre / ESS Dacs. This is not an option. I have a microcontroller getting the music by Async USB. The microntroller performs the multichannel filtering (DSP) and then outputs 2 Spdif streams to 2x Full Digital Amp (FX-Audio D802 - STA326 chip)


The basic question is: could applying Chebyshev poly to generate H2 induce some signal artifacts that would ruin the experiment, the intention being to emulate mathematically the spririt of the Nelson Pass H2 Generator ?


Best regards,


JM
 
you can't. Chebyshev polys work nice for a full scale (+1 -1) signal.
When the signal drops, the harmonics get fuzzy.
 

Attachments

  • dist-fs.png
    dist-fs.png
    118.9 KB · Views: 78
  • dist-01.png
    dist-01.png
    117.3 KB · Views: 81
Results may be limited by numerical accuracy if using 32-bit ints. Using 64-bit float and dither back down to 32-bit int or 24-bit int might help. Don't forger LPF where needed. For whatever reasons, high sample rate processing often sounds better, even if it is decimated back down to baseline sample rate before playback.

In addition, is possible to select particular filter bands for processing and leave other frequencies unprocessed.

These kinds of problems have been solved for a long time in the world of VST plugin DAW processing. The assumes one is reasonably simulating the transfer characteristics of analog components claimed to sound good for audio.
 
Last edited:
previous post is implementation of Chebyshev's algorithm, with +-1 sine on the left picture, and +-0.1 on the right as the input.
I'd be happy to find a working solution. By the way, harmonics come in yet another flavor - they have phase! :)
everything but FFT itself is done in 64-bit double-float, hence the "noise floor".
 
previous post is implementation of Chebyshev's algorithm, with +-1 sine on the left picture, and +-0.1 on the right as the input.
I'd be happy to find a working solution. By the way, harmonics come in yet another flavor - they have phase! :)
everything but FFT itself is done in 64-bit double-float, hence the "noise floor".


Hello,


Thanks for the experiment. Which coefficients for the different Chebyshev polynoms terms do you use here ?



Do I understand well that the level of the harmonics changes with the amplitude of the input signal ? Not so nice in that case.


Is your experiment a measurement of the output of a real device, or a simulation like with some sort of Mathlab thing?
 
Results may be limited by numerical accuracy if using 32-bit ints. Using 64-bit float and dither back down to 32-bit int or 24-bit int might help. Don't forger LPF where needed. For whatever reasons, high sample rate processing often sounds better, even if it is decimated back down to baseline sample rate before playback.

In addition, is possible to select particular filter bands for processing and leave other frequencies unprocessed.

These kinds of problems have been solved for a long time in the world of VST plugin DAW processing. The assumes one is reasonably simulating the transfer characteristics of analog components claimed to sound good for audio.


I would be happy to learn about good plugin doing this. I'm experimenting with Hornet Harmonics plugin. My understanding it that it justs implements Chebyshev polynoms:
HoRNet Harmonics, free waveshaper VST, AAX and Audio units plugin


best regards,


JMF
 
Hello,


Thanks for the experiment. Which coefficients for the different Chebyshev polynoms terms do you use here ?



Do I understand well that the level of the harmonics changes with the amplitude of the input signal ? Not so nice in that case.


Is your experiment a measurement of the output of a real device, or a simulation like with some sort of Mathlab thing?
Yep, if your sine is less than 1 p-p, it doesn't work. At least this one, although i have found same issues others had with Chebyshev, without solution.

It's "self-check" routine for my analyzer, very simple one. If you feed it with sine samples, you get distorted samples on the output.
Harmonic coefficients are "H2".."H6" (note the uppercase) in form of 0.01 for 1% distortion.
"Good" picture has H2..6=0.001/100, and
output = Distort(Sine(w));

bad one:
output = Distort(0.1 * Sine(w));

if you do
output = 0.1 * Distort(Sine(w));
it works fine, but doesn't make any sense :)

Code:
        public double Distort(double val) {
            vi = val;
            h1 = vi;
            h2 = (2 * vi * h1 - 1);
            h3 = (2 * vi * h2 - h1);
            h4 = (2 * vi * h3 - h2);
            h5 = (2 * vi * h4 - h3);
            h6 = (2 * vi * h5 - h4);

            return (
                h1 
                + H2 * h2 
                + H3 * h3 
                + H4 * h4 
                + H5 * h5 
                + H6 * h6
                );
        }
 
Last edited:
I would be happy to learn about good plugin doing this.

How the best plugins work remains quite proprietary. Some very good ones, for example: plug-ins

However, you can be sure they probably use good DSP engineering practices to emulate analog hardware already known to sound good. At least that is the starting point for learning how to do it. It means one would have to carefully study dynamic non-linear behavior of key vintage pieces of equipment.

Used to be some of the plugin manufactures would provide more technical information on their websites about how their plugins work. Most of that seems to have been taken down in recent years, but maybe searches of old forums like gearslutz could turn up some clues.

As far as emulating simple harmonic distortion, a mildly curved nonlinear voltage transfer function based on a 2nd order polynomial would seem like a good place to start. Recall that adding harmonics will violate Nyquist unless appropriate steps are taken to prevent it. Upsampling before processing seems like wise thing to try. H2 processing could potentially double bandwidth of the audio signal, so make sure the sample rate is high enough not to alias at the highest new frequencies produced and or to band limit before processing to limit possible output frequencies. Dither before truncation, etc. Hopefully, that all makes sense.
 
Last edited:
Humm looks like that it is not a straightforward thing like I expected, especially for a curious dummy as I am.


I believe the " mildly curved nonlinear voltage transfer function based on a 2nd order polynomial would seem like a good place to start" is the first term of the Chebyshev polynom. But all needed precautions, I'm not clear how to deal with them.


I will continue my experiments with the Hornet Harmonics plugin, but It is not sure that it can cope with the small amounts of distortion I want. Minimun displayed figure is 10%. It seems that you can enter lower values without rounding to zero, but some behaviours are a bit weird.


JMF
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.