Third harmonic generator

A single low pass filter to cut out the 5th and higher harmonic would only work for a narrow range of frequencies. Go to high and the 3rd harmonic will get squashed. To cover a wide range of frequencies you could first band pass the signal, like you do for a speaker crossover, to produce several distinct bands. Then clip, rate limit and low pass filter each. A different low pass filter cut off frequency would be required for each band to cut the 5th and higher harmonics.
 
Thank you @MarcelvdG! Never heard of bcm transistors.I see they are matched trz but I don't see them paired in your circuit so I assume i can use normal bc trz.Am I correct?

No, they do need to match. The NPN transistors are organized in groups of six, with one stack of three on the left and one stack of three on the right. Each transistor in the left stack has to match a transistor in the right stack, match in VBE that is. All six need to have the same absolute temperature, but as they dissipate almost nothing, that should be OK automatically.

You can of course use separate transistors and select ones of which the VBEs match within a millivolt or two. Discrete bipolar transistors from the same batch often match quite well.

I really wait for the whole circuit ideas and explanations .
I just want to make a tape simulator .

I'm no expert, but I could imagine that the arctanh of a simple bipolar differential pair is closer to what a saturating tape does than pure third-order distortion.

The polarity of the third-order term in my circuit is such that it is expansive rather than compressive, x + a x3 instead of x - a x3. It can easily be fixed by subtracting the output signal of the circuit from an undistorted signal.

Explaining the translinear principle that the circuit is based on will have to wait until this evening. You may be able to figure it out by an Internet search for "translinear" and "Barry Gilbert".
 
I'm no expert, but I could imagine that the arctanh of a simple bipolar differential pair is closer to what a saturating tape does than pure third-order distortion.

The polarity of the third-order term in my circuit is such that it is expansive rather than compressive, x + a x3 instead of x - a x3. It can easily be fixed by subtracting the output signal of the circuit from an undistorted signal.

Explaining the translinear principle that the circuit is based on will have to wait until this evening. You may be able to figure it out by an Internet search for "translinear" and "Barry Gilbert".
First of all I have to thank you from all of my heart for the efforts you made on countless ocasions to do all this mathematical acrobacies I can't even understand in full most of the times to clarify a position that would probably more useful to others more skilled than me!
I thought multipliers are only good for H2 synthesis .I saw AD835 used for h2 generation in the past and i planned to use some of my mc1594 chips that I have.I can't afford ad835, but MC1594 might do the job as well while not as fast as AD835.
I understand that I really need some math skills that I never had to undestand this circuit, but I'll try to simulate it and get a picture at least.
A deep understanding of the circuit would still be useful at least for other members.
Stepping into Gilbert, Blackmer and Dolby territory is still difficult for me, but I timidly do it from time to time on a trial & error basis.

Please correct me if I'm wrong! Changing the diodes clamping the input stage of a Aiwa c 30 phono stage like or just clamping the inputs of a normal op amp with some germanium or schotky diodes in conjunction with a controlled input can do a simpler job at getting h3 products or more simillar tape like sound products or just going with very mild guitar germanium or Marshall fuzz circuits would be acceptable? I tried the Marshall way with many series diodes in the feedback path and it's very dependent on gain and input level but getting the right level is tricky to get just the acceptable amount of compression.When driving hard the record tapeheads i got a wider gain or input level range for acceptable distortions, but while very pleasing(probably more h2) still didn't sound like my Pioneer ct 777 when dolby C activated on real tape which was as emotional as can possibly be.
Tape compression is nothing like guitar fuzz sound and I think it's the tape's higher frequency limit and bias that works out as higher order harmonics gate.Removing the tape I need some form of filtering for the higher order harmonics.Either I prescribe no frequency level dependent limit and fabricate the sound through a mix of h2 and h3, either I use a muddy
compressor and filter the higher products out through a transformer or a that (dbx) like level dependent compressor.Either way i can only approach tape compression in an analogue fashion, but I simply hate paying huge amounts of money on metal tapes and tapehead wear is a real thing.
My own minimal appproach these days would be to use coupled record: playback tapeheads followed by the dolby/dbx compander/expander process usually used in monitoring three heads cassette decks .Now these compressors found in cassette decks are very agressive as they are intended to reduce noise associated with cassettes low speed, but there's some consesus that they are also prone to some dynamic limiting when judged in absolute terms to which I don't fully subscribe but anyway....So I thought that maybe a lower compression expansion rate as in professional THAT circuits might lead to a better sound as removing the tape doesn't ask for such higher compression rates having no noise involved.
 

Attachments

  • Screenshot_20220727-123326_Word.jpg
    Screenshot_20220727-123326_Word.jpg
    180.3 KB · Views: 97
but I need to break an audiophile embargo that's lurking around for very long.
ok you go, banzai!

But if you don't have a computer or other equipment that can digitize and analyze the distortion of a tape deck or whatever you are trying to characterize, how do you know what the harmonic content really look like and what you should mimic?
With REW at least you don't have to measure and analyze the distortion as you decide what it should be, if you want 1.23% H2 then just type it in and have a listen.
 
Actually i have them...but they're dismembered for years...I bought an audient id22 specifically for this measurement setup, but it needs the replacement of the the smps power supply as the psrr isn't too great in the official specs.
In the last years I relyed heavily on reading others experiments, simulations, auditions and small tricks to help me take a decision...I live in not too optimal conditions for a few years now .Kinda hard to explain how I run my trials, very difficult to get public approvals without an AP analyser anyway...Comming from a repair -test-fix background, usually I'm good at having hunches...but that's just all about it.Now testing h2 and h3 in tape setups where they go up to 3% is not really difficult on a sensitive oscilloscope and I have two of them...
http://www.cordellaudio.com/instrumentation/distortion_magnifier.shtml
 

Attachments

  • Screenshot_20220727-142140_Word.jpg
    Screenshot_20220727-142140_Word.jpg
    298.1 KB · Views: 71
  • Screenshot_20220727-142155_Word.jpg
    Screenshot_20220727-142155_Word.jpg
    193.3 KB · Views: 82
Last edited:
ok so it involves a bunch of other people, and an AP stamp in the upper right corner ads some snob dignity to it, yes, but I think the Cosmos ADC will get a word soon in the audio world, but considering how expensive id22 is (right now here in Finland cheapest is 369€) why this one, and it's also several years old doing only 96kHz with poor psrr.., but if you got it veeery cheap it's better than nothing as soon as it's fixed, nonetheless it will be enough for this and many other experiments.
ps misery exists everywhere these days, godspeed to all of us.
 
I paid 350 pounds on it back in 2017 ...It seems to have a good value for artists although it's full of chinese cheap capacitors...I'll probably be removing the mike inputs and allow for better snr by paralleling some of its dacs one day...not sure when though.
It happened that I worked on AP1 and AP2 a few years ago so I can't talk'em down...They're not exactly a snobish choice...I'd say they're exactly what they are supposed to be...Not taking part in Dragons and Dragon killers ...
 
I'm no expert, but I could imagine that the arctanh of a simple bipolar differential pair is closer to what a saturating tape does than pure third-order distortion.

First of two silly mistakes: I meant tanh rather than arctanh.

You may be able to figure it out by an Internet search for "translinear" and "Barry Gilbert".

Second silly mistake: I meant Barrie Gilbert.
 
Marcel's solution is deterministic and exact, but it has a non-negligible complexity. If rigorous accuracy is not absolutely required, it is possible to use a much cruder, informal circuit to generate mostly third, polluted by a few others:
H3gen.png


I gave two examples, one based on BJT's, the other on FETs. I would have thought that the FETs would work better, but it is the opposite in fact: the BJT circuit manages to deliver more than 100% third harmonic.
This should be mixed with the "clean" signal in the correct proportion to arrive at the desired HD level.
Note that the circuits are more fuzz-box like than proper analog processing blocks, and I didn't tweak them very much: by adjusting the input amplitude and the resistors values, you can certainly arrive at a higher, purer HD3 than currently.
Earlier, I had published an adjustable H2 generator too, it is somewhere on the forum, and if you are motivated enough to struggle with the lame search function, you can probably locate it
 

Attachments

  • Like
Reactions: dreamth
sound like my Pioneer ct 777 when dolby C activated on real tape which was as emotional as can possibly be.
So you want a black box that "sounds like my Pioneer ct 777 when dolby C activated on real tape". I wonder what would happen if you took an actual Pioneer ct 777 when dolby C activated on real tape and used its effect on an audio signal to train this:

https://hackaday.com/2021/05/30/neural-networks-emulate-any-guitar-pedal-for-120/

I suspect one day this AI will be finished and it'll just be a matter of i/o quality, power, jitter et al to take any signal path through any device that happens to suit your ears and, "here ya go!".
 
  • Like
Reactions: dreamth
Well guys, everything you post is interesting to me.Thank you!
@Elvee ...I've read before that reversed bias was used in the early days of germanium in fuzzy circuits and very low voltage switching circuits and it happends that I have many of them.I might try some on your circuit.Seems very compelling.I bet @marcel's circuit is complex for linearity reasons cause i also know that compression ratio varies with input level in guitar effects.Now simulating tape compression is kinda level depending so it may work.
@jjasniew that's probably the future of everything...but will that future be ours?
 
@jjasniew that's probably the future of everything...but will that future be ours?
Dunno, but I messaged the guy behind it immediately, asking about stereo processing. Funny, I also mentioned I'm 65 and "hope to see the day"...

I'll make a wild guess what's possible today. Train this AI device using your Pioneer ct 777 when dolby C activated on real tape; I assume you give it both pre and post effect for the AI to consider. The inventor mentions on his site you can "burn" the result of the AI based processing to a VST plug-in. Just, make it a two channel effect out of whatever it derives. Put that into Foobar 2000 and anything played thereafter (with the VST engaged) sounds like it going through "my Pioneer ct 777 when dolby C activated on real tape".
 
dreamth,

Clipping a relatively single tone, a pure music sine wave (skillfully played flute?), would produce a square wave.
A perfect square wave consists of the following infinite series of odd harmonics:
Harmonic, Relative V, dB.
Fundamental, 1, -0.0.
3, 1/3, -9.5.
5, 1/5, -14.
. . . etc.

An analog low pass filter that filters the 5th and higher harmonics to be -80dB down is a real challenge.
And that same analog low pass filter will disturb the phase of the 3rd harmonic relative to the fundamental.
But doing that for one flute at 440Hz and one at 780Hz is not going to be possible for a single low pass filter.

If your goal is to produce the 3rd harmonic of all the fundamentals of a music signal, then that would have to be done digitally.
A/D; FFT to identify each tone; calculate the 3rd harmonic of each tone; digitally add all those fundamentals and 3rd harmonics; and send to a DAC.
. . . Not likely to be done on constantly changing music;
but perhaps possible for two sustained notes of the 440Hz and 780Hz flutes.

Just my opinions.
 
Last edited:
  • Like
Reactions: rayma
Doing so would be unnatural: it is possible with DSP, but no real analog circuit having a cube transfer function will be able to create 3rd harmonics of each signal without also creating many intermodulation products.
I think the OP's intention is to create a cube transfer function, with all that is implied with it (I may over-interpret Dream's intentions, maybe he can clarify this point himself?)
 
I would just try a bipolar differential pair, probably with a big capacitor between the emitters to reduce the effect of offset, make the input level adjustable from 1 mV to 50 mV and check if the resulting hyperbolic tangent distortion sounds as desired.


Anyway, regarding yesterday's circuit, there are two practical matters:
Chances are that the base stoppers won't be needed and if they are not needed, it is best to leave them out. As the BCM56DS is an SMD device, it is not straightforward to add base stoppers if you should need them, hence it may be wise to reserve space for them anyway. That's why they are all marked "0 ohm or 47 ohm".

The trimming range of RV1 is a bit too tight. I should have made RV1 10 kohm multiturn and R32 = 6.8 kohm.

About the principle, there is a good explanation of the translinear principle on Wikipedia, https://en.wikipedia.org/wiki/Translinear_circuit When you apply it to my loops of six transistors, you get this:

Q7B, Q8A and Q9B all have a collector current of approximately Ibias + isignal

Q7A and Q8B are biased at a practically constant current Ibias. That is, R25 is essentially used as a bias current source. A possible circuit refinement would be to replace it with a real current source implementation, but I don't expect much difference.

The product of the collector currents of the stack of transistors on the left must be equal to the product of the collector currents on the right, hence the current through Q9A must be (Ibias + isignal)3/Ibias2.

When you write out (Ibias + isignal)3, you get Ibias3 + 3 Ibias2 isignal + 3 Ibiasisignal2 + isignal3. The quadratic term produces second-order distortion.

Hence, the quadratic term needs to be balanced out by using two of these circuits driven in antiphase:

(Ibias + isignal)3 - (Ibias - isignal)3 = 6 Ibias2 isignal + 2 isignal3

This is why there are two groups of six transistors, with all the circuitry around them.
 
Last edited:
  • Like
Reactions: dreamth
Well...i have admit that I don't understand how is that puting out h3, but I take your word for it.
Truth is that I am not sure of what i really want except reproducing a tape saturation sound like without using the tape as everything else surrounding tape reproduction can be modified in countless ways.
I have lm394 pairs which would make a good try being used in front of the tapehead preamp itself being very low noise.
This is probably the only application where a differential cancelling h2 is expected to produce a pleasing sound...
 
The last step was still missing:

We had (Ibias + isignal)3 - (Ibias - isignal)3 = 6 Ibias2 isignal + 2 isignal3

Using cos3(x) = 1/4 cos(3x) + 3/4 cos(x) and keeping in mind that the largest cosine the circuit can handle without clipping is Ibias cos(2pi f t), you get with the maximum input signal 6 Ibias3 cos(2pi f t) + 1/2 Ibias3 cos(2pi 3 f t) + 3/2 Ibias3 cos(2pi f t), so a third harmonic that is 1/15 of the fundamental, 6.66666... % third-harmonic distortion. If that's not enough, you could subtract some undistorted signal.
 
Last edited:
  • Like
Reactions: dreamth