DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: merlinb on May 16, 2023, 06:20:04 AM

Title: A simple circuit with an optocoupler creates a “tube” sound
Post by: merlinb on May 16, 2023, 06:20:04 AM
I thought this EDN article might interest some folks:
https://www.edn.com/a-simple-circuit-with-an-optocoupler-creates-a-tube-sound/

(https://i.postimg.cc/zLX338cd/27836721-old-manuscript-isolated-on-white.webp) (https://postimg.cc/zLX338cd)
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: BubbaFet on May 16, 2023, 11:34:48 AM
And from the brief app note...

"As one can see, the second harmonic of a 5 to 15 W tube amplifier dominates the spectrum, and EL34 type lamps are used in the output stage."

...also contributing to that "tube sound".
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Clint Eastwood on May 16, 2023, 12:28:21 PM
What happens when some punk overdrives this circuit?
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: FSFX on May 16, 2023, 12:29:25 PM
This appeared in one of the FB groups a few weeks ago and was discussed there.
Firstly, what exactly is a 'tube sound'? It certainly is not just defined by the harmonic content shown here.
That is easy to achieve with suitable biasing of any simple single BJT common emitter stage or JFET common source stage.
So the use of an additional opto-coupler and an emitter follower output stage looks a bit of a 'Heath Robinson' type of way over-engineered and over-complicated solution.

Anyway, back to what exactly is a 'tube sound'? Here is some reading material that looks at this question.
https://gitec-forum-eng.de/wp-content/uploads/2019/02/poteg-10-09-1-tube-vs-transistor-sound.pdf
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Steben on May 16, 2023, 03:29:06 PM
Quote from: FSFX on May 16, 2023, 12:29:25 PM
This appeared in one of the FB groups a few weeks ago and was discussed there.
Firstly, what exactly is a 'tube sound'? It certainly is not just defined by the harmonic content shown here.
That is easy to achieve with suitable biasing of any simple single BJT common emitter stage or JFET common source stage.
So the use of an additional opto-coupler and an emitter follower output stage looks a bit of a 'Heath Robinson' type of way over-engineered and over-complicated solution.

Anyway, back to what exactly is a 'tube sound'? Here is some reading material that looks at this question.
https://gitec-forum-eng.de/wp-content/uploads/2019/02/poteg-10-09-1-tube-vs-transistor-sound.pdf

True.
Even a single triode preamp stage has less (even order) harmonics than a jfet stage for example. The Fetzer valve is all about taming the harmonics.
I posted some time ago a paper I found where the harmonic spectrum of a non-overdriven biased triode, BJT and jfet stage were analysed. The conclusion was a classic BJT stage with some (emitter) feedback mimicked the triode stage quite well. Solid state is full of harmonics even the good ones.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: FSFX on May 16, 2023, 04:57:02 PM
Even with a tube based circuit, the range and comparative level of harmonic distortion can change significantly depending on the value of the cathode resistor and the details of its bypassing as well as the input signal level.
This is pretty obvious as these things affect the operating conditions of the tube in the circuit.
I spent quite some time experimenting with this and analysing the distortion of different arrangements when designing and building a 'guided-missile' pencil tube boost and overdrive pedal a couple of years ago.
When it comes to 'tube sound' and harmonic distortion it really just depends on circuit configuration anyway as a Class A preamp or single ended output stage will create a whole lot different distortion to a push-pull type of output stage.
There are many other factors involved as well as have been extensively documented over many decades.
     
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: PRR on May 16, 2023, 09:39:42 PM
> easy to achieve with suitable biasing of any simple single BJT

I think it IS a frilled-up "simple single BJT". The opto-coupler is highly linear around 4mA. EF, bah, dead-clean.

FWIW: at the extreme a tube will do >5% THD, a JFET a bit more, but a BJT will do 26%. So much that we almost always "need" some degeneration.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Ben N on May 17, 2023, 12:26:58 AM
Quote from: FSFX on May 16, 2023, 12:29:25 PM
So the use of an additional opto-coupler and an emitter follower output stage looks a bit of a 'Heath Robinson' type of way over-engineered and over-complicated solution.
Check the comments there.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Steben on May 17, 2023, 01:37:17 AM
Quote from: PRR on May 16, 2023, 09:39:42 PM
> easy to achieve with suitable biasing of any simple single BJT

I think it IS a frilled-up "simple single BJT". The opto-coupler is highly linear around 4mA. EF, bah, dead-clean.

FWIW: at the extreme a tube will do >5% THD, a JFET a bit more, but a BJT will do 26%. So much that we almost always "need" some degeneration.

The warmth of the low harmonics.  :icon_mrgreen:
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Rob Strand on May 17, 2023, 03:12:00 AM
QuoteI think it IS a frilled-up "simple single BJT". The opto-coupler is highly linear around 4mA. EF, bah, dead-clean.
To me the question is where the second order harmonic originates.   In general the IF vs IC relationship of optos isn't very linear so my initial thoughts were the gain characteristic is where the second harmonics originates.   (It's reasonably well known they are non-linear in this way.)

If you look at the CTR from IF = 0.3mA to 3mA (one decade) the CTR varies say from 33 to 130, a factor of about 4.   That's a lot more than even old school transistors, which might only vary 1.3 (30%) over a decade.

The circuit operates around IF = 0.7mA and a swing of about 80uA (assumed p-p), which is in the non-linear region.

As far as the test in the article goes the swing is quite small and the transistors are not saturating so we only need to consider device non-linearities.  If we pushed the circuit the first transistor doesn't really clip until the swing is quite large, due to the diode load, so the opto transistor will be the only part that clips.

So IMHO the CTR non-linearity is what makes this circuit work.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: FSFX on May 17, 2023, 04:08:29 AM
Quote from: Ben N on May 17, 2023, 12:26:58 AM
Quote from: FSFX on May 16, 2023, 12:29:25 PM
So the use of an additional opto-coupler and an emitter follower output stage looks a bit of a 'Heath Robinson' type of way over-engineered and over-complicated solution.
Check the comments there.
It is just another non-linear circuit configuration creating some harmonic distortion like the many thousands out there. It is not even analysed thoroughly or scientifically. All it shows is some harmonic distortion using a fixed level and single frequency that is common with many circuit designs. No discusion of IMD or analysis of its behaviour with complex signals.

And, I certainly don't think that the following statement from the article is actually technically correct and certainly does not just apply to tube amplifiers [power amps or preamps, single ended or push-pull, Class A or Class AB, etc.?] in many ways and what exactly is meant by the 'pass-through' characteristic?:

QUOTE FROM ARTICLE
It is known that the main feature of tube amplifiers is the presence of small distortions. In these distortions, the second harmonic prevails. Some optocouplers have a pass-through characteristic close to the pass-through characteristic of the electron tube.
END QUOTE

Anyway, back to what exactly is a 'tube sound'? Here is some reading material that looks at this question.
https://gitec-forum-eng.de/wp-content/uploads/2019/02/poteg-10-09-1-tube-vs-transistor-sound.pdf

As every tube guitar amplifier sounds different then I really can't see that you can define just one 'tube sound'. 

Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Rob Strand on May 17, 2023, 08:14:04 AM
I did a quick simulation with a transistor model that fairly steep non-linear gain region (hFE vs Ic).   The 3rd harmonic distortion looked worse than a flat hFE curve.  Very puzzling.   It doesn't look like that's it.  Too late here for me to ponder alternatives.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: antonis on May 17, 2023, 08:42:11 AM
Quote from: Rob Strand on May 17, 2023, 08:14:04 AM
I did a quick simulation with a transistor model that fairly steep non-linear gain region (hFE vs Ic).   The 3rd harmonic distortion looked worse than a flat hFE curve.  Very puzzling.

:o :o
Interesting enough..
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: BubbaFet on May 17, 2023, 12:07:50 PM
What is the minimum numer of tubes or  transistors required to achieve 'tube sound'?

Is one gain stage enough?
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Steben on May 17, 2023, 02:31:09 PM
Quote from: BubbaFet on May 17, 2023, 12:07:50 PM
What is the minimum numer of tubes or  transistors required to achieve 'tube sound'?

Is one gain stage enough?

Does a Champ 5W have tube sound?  :icon_mrgreen:
it has 2 tubes in the signal chain. Most triodes come in pairs :D
I guess a champ has "a" tube sound...

It is astonishing how many SS amps are rumoured ot be "ok" in the clean channel. While these channels usually have almost no harmonic content added with their tons of opamp arrays.
Makes me think: they are ok because they lack annoying harmonics.... Combine that with "warmth" of clean triodes (the least harmonic content of discretes)...
Even order.. wasn't that worse for IMD?

Joh mayers sound is usually related to a dead clean tube amp and some drive pedals based around symmetric clipping...
What are even order loaded devices? Many many dirty fuzzes....

On the other hand, "harmonic enhancers" usually are based around mixing some very asymmetric high freq clipped signal to the clean.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Rob Strand on May 18, 2023, 04:20:21 AM
Quote from: antonis on May 17, 2023, 08:42:11 AM
Quote from: Rob Strand on May 17, 2023, 08:14:04 AM
I did a quick simulation with a transistor model that fairly steep non-linear gain region (hFE vs Ic).   The 3rd harmonic distortion looked worse than a flat hFE curve.  Very puzzling.

:o :o
Interesting enough..

I think I screwed up last night. It was getting late and maybe got the traces switched.  No idea.

Here's the results (harmonics levels relative to fundamental)
original article:                       2nd -40dB, 3rd -65dB
transistor with non-linear hFE:  2nd -35dB, 3rd -67dB                ; not far off
common transistor:                 2nd -53dB, 3rd -88dB
second order non-linear:          2nd -38dB, 3rd -77dB

So the non-linear hFE does get close.
The basic transistor isn't close enough

For the second order non-linear, I added second order non-linearity between the LED and base current of a common transistor of the form ILED*(1 - k2  + k2*(ILED/700uA)) = ILED(1-k2) + k2*ILED^2/700uA.   k2 sets the strength of the second order non-linearity and I chose k2 = 0.25 to get close to the article values.

Conclusion: hFE (or CTR) non-linearity of the opto looks like a feasible explanation.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: teemuk on May 18, 2023, 04:41:37 AM
"Tube sound"... sigh. When will we bury this fallacious concept.

It is always trifling when folks try to explain what it is and can't point a single characteristic that isn't circuit-related or otherwise present in other than tube-based circuits as well.

Even the die hard advocates can't quite agree are tubes great because they are so linear and undistorted or because they are not linear and undistorted.  :icon_rolleyes:

Two of my favourite "tube sound" circuits from electronics magazines so far have been:

1. A blatant copy of preamp OD channel from Fender's SS amps. This even had the channel switch FET protection diodes eventhough the magazine circuit had no channel switching and therefore no FETs needing protection either. :icon_biggrin:
2. A circuit that mimicked the weird sounds a tube makes before it has heated to proper operating temperature. Evidently this was the magic of tubes from the point of view of late 1970's Hi-Fi.  :icon_biggrin:

It distorts = tube sound. Problem solved.  ::)
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: FSFX on May 18, 2023, 05:08:24 AM
Quote from: teemuk on May 18, 2023, 04:41:37 AM
"Tube sound"... sigh. When will we bury this fallacious concept.
That was my original comment regarding this.

So what exactly is people's definition of 'Tube Sound' and what is so different to 'SS Sound'?

Is it 'Tube Input Stage Sound' [12AX7, 12AU7, etc] or 'Tube Power Amplifier Sound' [EL34, 6L6, etc] or just a combination of these that then involves the colouring of the sound by the Miller capacitance, grid leakage current, output transformer characteristics, etc, etc?

We know that attempts have been made to try to subtly influence the sound with things like the 'Fetzer Valve' and many various tone controls and EQs as well as things like Rupert Neve's class-A transformer coupled designs.

So these days we just use solid state amplifiers with amp simulators and cab simulators and IR editors to allow us tweak the sound to whatever we think sounds 'right'.   
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: teemuk on May 18, 2023, 05:43:00 AM
QuoteIs it 'Tube Input Stage Sound' [12AX7, 12AU7, etc] or 'Tube Power Amplifier Sound' [EL34, 6L6, etc] or just a combination of these...

And we are not even touching the circuit architecture aspect. PP is quite different to single-ended for instance. This was acknowledged already back in the early 1970's.

QuoteSo these days we just use solid state amplifiers with amp simulators and cab simulators and IR editors to allow us tweak the sound to whatever we think sounds 'right'.

Right. I know there have been fantastic simulations of some typical circuit characteristics tube amps - particularly those used as "effect processors" - might feature. But if all the same effects can be achieved with various semiconductor -based solutions (whether analog or DSP) is it even no longer "tube sound"?

Shouldn't "tube sound" be an universal trait? ...Like all tube amps have it? Not like one tube amp has this or that trait and the another doesn't, but then a transistorized amp also does have it. Then it's not "tube sound" IMO.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Steben on May 18, 2023, 08:32:20 AM
Sounds tube amps produced all along. But no exclusion of other sources or devices.
The - by now classic - overdrives with clippers in non inverting feedback circuits are so common they are worth mentioning since they are a thing on their own. Very elaborate to mimick with tubes.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: FSFX on May 18, 2023, 08:57:57 AM
Quote from: Steben on May 18, 2023, 08:32:20 AM
Sounds tube amps produced all along.
I have a Wurlitzer jukebox from 1954 with a tube amp. It is far from perfect in reproducing the sound.  As well as being far from perfect in reproducing the true sounds of the 45 records, it also adds noise and hum. That is just like all of the other tube amps from that era. Nostalgic sound but I prefer the purer sound of more modern amplifiers.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: BubbaFet on May 18, 2023, 01:18:08 PM
Quote from: FSFX on May 16, 2023, 04:57:02 PM
Even with a tube based circuit, the range and comparative level of harmonic distortion can change significantly depending on the value of the cathode resistor and the details of its bypassing as well as the input signal level.
This is pretty obvious as these things affect the operating conditions of the tube in the circuit.
I spent quite some time experimenting with this and analysing the distortion of different arrangements when designing and building a 'guided-missile' pencil tube boost and overdrive pedal a couple of years ago.
When it comes to 'tube sound' and harmonic distortion it really just depends on circuit configuration anyway as a Class A preamp or single ended output stage will create a whole lot different distortion to a push-pull type of output stage.
There are many other factors involved as well as have been extensively documented over many decades.
   

In my 'distorted' view  ::), the best explanation of 'tube sound' and its mechanism is to be found in 'Radiotron Designers Handbook 4th Edition'.

http://www.tubebooks.org/Books/RDH4.pdf (http://www.tubebooks.org/Books/RDH4.pdf) 

Specifically...  Chapter 14 - Fidelity and Distortion, starting on page 643 of the pdf.

--------------------------------------------------

Meanwhile, Chat-GPT3.5 offers up this response...

me: What exactly is 'tube sound'?

ChatGPT: "Tube sound" refers to a distinctive audio quality or character associated with vacuum tube amplifiers, also known as valve amplifiers. Tube amplifiers use vacuum tubes (also called valves) to amplify audio signals. These tubes are composed of a vacuum-sealed glass envelope containing various elements and electrodes.

The term "tube sound" is often used to describe the unique sonic characteristics produced by tube amplifiers. It encompasses several qualities, including harmonic distortion, compression, and a warm, smooth tone. Here are some key aspects typically associated with tube sound:

1.) Harmonic Distortion: Vacuum tubes tend to introduce harmonic distortion when amplifying signals. This means they add harmonics, which are additional frequencies that are multiples of the original signal. This distortion can impart a pleasant, euphonic quality to the audio, often described as "warmth" or "richness."

2.) Compression: Tube amplifiers exhibit a natural compression effect. When the input signal exceeds a certain level, tubes gradually saturate, compressing the dynamic range of the audio. This compression can add a pleasing smoothness and sustain to the sound, particularly in the context of guitar amplifiers.

3.) Soft Clipping: When a tube amplifier is driven into overdrive, it exhibits a form of soft clipping, which differs from the harsh clipping produced by solid-state amplifiers. Soft clipping introduces a more gradual and smoother distortion, often preferred by musicians and audiophiles for certain genres of music.

4.) Harmonic Content: Tubes tend to emphasize even-order harmonic content, particularly second-order harmonics, which are perceived as adding warmth and richness to the sound. Solid-state amplifiers, on the other hand, generally produce odd-order harmonics, which can sound harsher to some listeners.

It's important to note that the perception of "tube sound" can vary among individuals, and different tube amplifiers can have unique sonic characteristics. Additionally, modern solid-state amplifiers and digital modeling technologies can emulate some aspects of tube sound, blurring the line between tube and solid-state audio quality.

Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: FSFX on May 18, 2023, 01:52:51 PM
QUOTE
4.) Harmonic Content: Tubes tend to emphasize even-order harmonic content, particularly second-order harmonics, which are perceived as adding warmth and richness to the sound. Solid-state amplifiers, on the other hand, generally produce odd-order harmonics, which can sound harsher to some listeners.
END QUOTE

I don't think that statement above is actually true.
It just shows that things like Chat-GPT are just as likely to give wrong answers as right ones, typical of the 'garbage in - garbage out' that computers are known for. Don't trust AI to tell the truth. It is based on a myth that has been around since the early days of solid state amplifiers that used certain circuit configurations such as the typical push-pull output stages. It can be proven quite easily that simple solid state amplifiers can be designed to give predominantly second harmonic distortion, just like tube amplifiers.
Further more, the square law forward transconductance characteristics of JFETs make them ideal for generating second harmonic distortion.   
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: ElectricDruid on May 18, 2023, 05:11:53 PM
Yep, anything that regurgitates what it read on the internet is going to be at least 95% full of rubbish.

Not that I'm blaming ChatGPT - that applies to humans too!
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Rob Strand on May 18, 2023, 06:17:09 PM
QuoteFurther more, the square law forward transconductance characteristics of JFETs make them ideal for generating second harmonic distortion.   

And we know that doesn't automatically give you a "tube sound".

IMHO, there's two tube sounds:

Clean: which isn't that much different to any clean sound, including opamps. 

Overloaded:  this is where things really change.   The changes are more than just second harmonics.  In fact a push-pull tube output stage has tube sound and very little even harmonics**.   Some key points are how tubes clip at low VPK, especially pentodes,  and the softness of the GK diode when the gate is forward biased.  The GK diode is *very*soft and difficult to emulate with solid state.


** A caveat is a device with second order harmonics on a sine-wave will produce a particular intermodulation spectra with a complex tone.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Ben N on May 18, 2023, 10:07:48 PM
Quote from: Rob Strand on May 18, 2023, 06:17:09 PM
IMHO, there's two tube sounds:

Clean: which isn't that much different to any clean sound, including opamps. 

Overloaded:  this is where things really change.   The changes are more than just second harmonics. 
But to me - and I can't begin to explain this in technical terms - the really interesting region that makes tubes special is where there these two flirt & cross over. I agree that clean-clean doesn't really reveal anything special, almost by definition. Linearity just doesn't allow for much variation by definition. But where a little bit of saturation starts to happen and picking dynamics start to have this outsize effect on how the amp responds -- that's where the magic is and where tubes shine. I don't really play heavily distorted amps -- if I'm getting that heavy, it's with a fuzz -- so I don't really appreciate what's happening in a modern high-gain amp from a player's perspective, and maybe there's something special there with tubes, too, though as a listener, it all kind of sounds like a distortion pedal with good eq to me. But the edge of breakup dynamics is where tubes are still king for me.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: teemuk on May 19, 2023, 03:34:59 AM
QuoteChatGPT: "Tube sound" refers to a distinctive audio quality or character associated with vacuum tube amplifiers, also known as valve amplifiers.

Keyword: distinctive.

Quote1.) Harmonic Distortion: Vacuum tubes tend to introduce harmonic distortion when amplifying signals.

Any non-linear circuit does.

Quote2.) Compression: Tube amplifiers exhibit a natural compression effect.
This is natural to transistors too.

Quote3.) Soft Clipping
Is not inherent to tubes. Some tube circuits soft clip, some don't. Solid-state circuits can also soft clip.

Quote4.) Harmonic Content: Tubes tend to emphasize even-order harmonic content, particularly second-order harmonics
Again some do and some don't. Solid-state circuitry can also be designed to emphasize 2nd order.

QuoteIt's important to note that the perception of "tube sound" can vary among individuals, and different tube amplifiers can have unique sonic characteristics.

So much for "distinct" then.

This response reads like copy & pasted amateurish tube advocate websites, or the super cluttered Wikipedia article of the same topic. I honestly expected a bit more from AI but it obviously just mishashes various cliches without actual abstract or critical thinking to weed out facts from falses.

Before it cracks up the secret of "tube sound" (and learns to draw hands) I'm not worried it develops self-conscience and destroys the mankind.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Steben on May 19, 2023, 04:04:38 AM
There is no difference between amp harmonic distortion and amp harmonic content. Ild say the guitar has content the amp adds distortion.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: FSFX on May 19, 2023, 04:27:33 AM
It is interesting to read the actual original article that started this all off and see that there are quite a few disputable points.

https://habr.com/ru/articles/697508/

Here is a quote directly from the article.

QUOTE
I invited the sound engineers I knew to listen to the sound. We listened to the audio of the narrowband channel and full-fledged tracks. That's when my attention was drawn to the similarity of the sound of the processed audio with the sound of tube amplifiers. In the process of working on this scheme, I looked through various publications, including patents, among which I found patents of the American company Aphex for a device called Aural Exciter. The principle is almost the same, only instead of a multiplier, they have a cascade on an offset diode, generating higher harmonics, which are added to the original signal. Then I began to look for other ways to get such a sound.

There are many circuits designed to produce a sound similar to "tube" and they are all reduced to two different types. The first are circuits with limiters on diodes that provide "soft" clipping of the signal, and the second are circuits on field-effect transistors that are not included in the general negative feedback circuit. Both types have, in my opinion, a common drawback, which is that these schemes, due to the fact that the transition characteristic is described by a logarithmic equation, generate odd harmonics, which are known to adversely affect the sound quality.
ENDQUOTE

It is interesting that the author attributed a logarithmic equation and odd harmonics to field-effect transistors. Certainly true for diode clippers but definitely not for JFETs which have a second order (square-law) equation and generate even harmonics.

FWIW, the original article mentions a circuit that uses a four-quadrant multiplier to generate additional harmonic content. This multiplier will act as a frequency doubler, just like many octave type of circuits and produce mainly even harmonics. The original article is well worth reading to see the subject of this thread in context. The version of the article I found was in Russian so needed to be translated to read it.   
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Clint Eastwood on May 19, 2023, 04:39:30 AM
It makes more sense to me, and I think this is Teemuk's point,  to speak about "tube amplifier sound". The use of high voltages, giving lots of headroom, little or no global negative feedback, and the output transformer coupling alone makes a tube amp sound different from a solid state amp.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Steben on May 19, 2023, 05:13:36 AM
Personally I never understood the devotion to "headroom"...
Low headroom means too much gain. It's all relative.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: FSFX on May 19, 2023, 05:25:59 AM
Quote from: Steben on May 19, 2023, 05:13:36 AM
Personally I never understood the devotion to "headroom"...
- - - -    It's all relative.
Me neither. Many modern audio devices run at less than 5 volts. I think 'headroom' and 'dynamic range' get confused a lot.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Clint Eastwood on May 19, 2023, 06:19:02 AM
I should not have used the word headroom, but it seems to me there is something like 'high voltage' sound. Or maybe I am just imagining it?
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Steben on May 19, 2023, 07:13:52 AM
Quote from: Clint Eastwood on May 19, 2023, 06:19:02 AM
I should not have used the word headroom, but it seems to me there is something like 'high voltage' sound. Or maybe I am just imagining it?

Frankly, still not quite sure what you mean. Triodes usually clip harshly either way whether on 100 or 300V.
Power amps in class B tend to squish but this can be emulated.

Many tube guitar amp DO sound and feel great. Let that be clear  :icon_mrgreen:
Yet question is whether this is device based or topology based.

Do fireflies and other 1W amps sound great? They do not have sag for example yet have push pull structure.
Ss rectifier high power marshalls have not that much sag nor cathode bias shift. Though 1974 has it. Ac30s have shift but hardly a sag. Tweed deluxes have shift, sag and some grid blocking. These are called downright fuzzy often...
And sorry ... again .... I adore the t dynamics power amp emulation. Analog solid state.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: amptramp on May 19, 2023, 08:30:02 AM
Just to explain the idea that a square-law transfer function leads to the generation of second harmonics, use the trig formula:

cos(2a) = 2cos2a - 1

where a is an angle.  But if we take 2*pi*f = a to be an angle, we can back into the frequency domain from an angle.  The 2a in the first equation is a double angle that corresponds to double the frequency.

Thus, FET's with their square law transfer function should generate a lot of second harmonics.
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: ElectricDruid on May 19, 2023, 09:17:22 AM
Quote from: amptramp on May 19, 2023, 08:30:02 AM
Just to explain the idea that a square-law transfer function leads to the generation of second harmonics, use the trig formula:

cos(2a) = 2cos2a - 1

where a is an angle.  But if we take 2*pi*f = a to be an angle, we can back into the frequency domain from an angle.  The 2a in the first equation is a double angle that corresponds to double the frequency.

Thus, FET's with their square law transfer function should generate a lot of second harmonics.

In general, transfer functions that are mirror-symmetric generate even harmonics. Ones that are rotationally symmetric generate odd harmonics. Non-linear functions that are neither produce a mixture of odd and even.

http://musicweb.ucsd.edu/~trsmyth/waveshaping/waveshaping.pdf (http://musicweb.ucsd.edu/~trsmyth/waveshaping/waveshaping.pdf)
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: BubbaFet on May 19, 2023, 10:26:14 AM
Quote from: teemuk on May 19, 2023, 03:34:59 AM
QuoteChatGPT: "Tube sound" refers to a distinctive audio quality or character associated with vacuum tube amplifiers, also known as valve amplifiers.

...

This response reads like copy & pasted amateurish tube advocate websites, or the super cluttered Wikipedia article of the same topic. I honestly expected a bit more from AI but it obviously just mishashes various cliches without actual abstract or critical thinking to weed out facts from falses.

Before it cracks up the secret of "tube sound" (and learns to draw hands) I'm not worried it develops self-conscience and destroys the mankind.

Methinks that you may have just put yourself at the top of the 'A.I. KILL LIST' for writing this  :icon_mrgreen:
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Rob Strand on May 20, 2023, 06:49:18 PM
Quote from: amptramp on May 19, 2023, 08:30:02 AM
Just to explain the idea that a square-law transfer function leads to the generation of second harmonics, use the trig formula:

cos(2a) = 2cos2a - 1

where a is an angle.  But if we take 2*pi*f = a to be an angle, we can back into the frequency domain from an angle.  The 2a in the first equation is a double angle that corresponds to double the frequency.

Thus, FET's with their square law transfer function should generate a lot of second harmonics.

The book Microelectronic Circuits by Sedra & Smith actually derives the second harmonic level for a JFET and gives a formula.  (Well at least the earlier editions.   Stuff seems to get edited out of books these days.)
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: samhay on May 28, 2023, 04:54:31 PM
I was playing with optocoupler delays a few years ago.
(https://samdump.files.wordpress.com/2023/05/optical_delay.png?resize=510%2C270)
https://www.diystompboxes.com/smfforum/index.php?topic=116243 (https://www.diystompboxes.com/smfforum/index.php?topic=116243)

The topology was different - the phototransistor was set up common collector, and the current was low as I was trying to drive it using distant LEDs. In any case, you could easily get distortion by setting the LED current such that the transistor wasn't biased sensibly. It can't have been too earth shattering though, as I never built one.

One thing I found puzzling was that it had voltage gain, despite being set up common collector. You can see this in LTspice sims too, so it must be a known property of the optocoupler. Any idea what's going on there?
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Eb7+9 on May 28, 2023, 08:51:17 PM
Quote from: samhay on May 28, 2023, 04:54:31 PM

One thing I found puzzling was that it had voltage gain, despite being set up common collector. You can see this in LTspice sims too, so it must be a known property of the optocoupler. Any idea what's going on there?


common collector (or emitter) implies common to two circuits ... here, the circuits are decoupled

so, voltage in >> LED current >> photons/lumens >> base current >> hFE times base current times emitter resistor >> emitter voltage

potential for overall voltage gain production is there provided product of all transfer ratios amounts to something greater than unity


the bipolar transistor is working as a current amplifier here, and not a voltage follower since there is no voltage source at the base

(https://i.postimg.cc/tsRD5JHk/bipolar-Current-Amplifier.png) (https://postimg.cc/tsRD5JHk)
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Steben on May 29, 2023, 02:25:28 AM
Quote from: Eb7+9 on May 28, 2023, 08:51:17 PM
Quote from: samhay on May 28, 2023, 04:54:31 PM

One thing I found puzzling was that it had voltage gain, despite being set up common collector. You can see this in LTspice sims too, so it must be a known property of the optocoupler. Any idea what's going on there?


common collector (or emitter) implies common to two circuits ... here, the circuits are decoupled

so, voltage in >> LED current >> photons/lumens >> base current >> hFE times base current times emitter resistor >> emitter voltage

potential for overall voltage gain production is there provided product of all transfer ratios amounts to something greater than unity


the bipolar transistor is working as a current amplifier here, and not a voltage follower since there is no voltage source at the base

(https://i.postimg.cc/tsRD5JHk/bipolar-Current-Amplifier.png) (https://postimg.cc/tsRD5JHk)
Thats quite non linear.
2nd harmonics, here we come
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Eb7+9 on May 29, 2023, 03:11:15 AM
Quote from: Steben on May 29, 2023, 02:25:28 AM

Thats quite non linear.
2nd harmonics, here we come


and not just any kind of non-linearity ... it's the soft clipping that matters, the expo-like part near the origin

exactly the same "outcome" as my jFET-based idea: http://www.lynx.net/~jc/transferCurvature-TubeSimulation.html (http://www.lynx.net/~jc/transferCurvature-TubeSimulation.html)

amazing what a search on tube or triode emulation yields these days ...
Title: Re: A simple circuit with an optocoupler creates a “tube” sound
Post by: Steben on May 29, 2023, 04:31:10 AM
Quote from: Eb7+9 on May 29, 2023, 03:11:15 AM
Quote from: Steben on May 29, 2023, 02:25:28 AM

Thats quite non linear.
2nd harmonics, here we come


and not just any kind of non-linearity ... it's the soft clipping that matters, the expo-like part near the origin

exactly the same "outcome" as my jFET-based idea: http://www.lynx.net/~jc/transferCurvature-TubeSimulation.html (http://www.lynx.net/~jc/transferCurvature-TubeSimulation.html)

amazing what a search on tube or triode emulation yields these days ...

Although linearisation by means of a source resistor is exactly what brings a jfet curve towards a triode curve  ???
Do we really want all those 2nd harmonics each stage?
Not just clean but even in overdrive mode. High distortion level combined with a lot of 2nd harmonics is fuzz land.