Author |
Message |
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sat Apr 26, 2008 6:17 am Post subject:
Tube Amp Models Subject description: How to model a tube amp in software? |
|
|
I'm working on some guitar effects processing software, gonna have a setup with guitar to pc to speaker with software that rocks! Right now I've got some preliminary stuff in place and it's time to make some tube amp models. Can you make some recommendations? I have Goooooogled it a bit, and I come up with buying references and bizarre opinions that speak of "light" and "warmth" but nobody seems to have any equations or other characteristics described. I'm sure some of the good folks here have got some nice juicy tube amp modelling links, so I'm asking for them. Thanks in advance, and rock on!!! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Peake
Joined: Jun 29, 2007 Posts: 1113 Location: Loss Angeles
Audio files: 3
|
Posted: Sat Apr 26, 2008 8:38 am Post subject:
|
|
|
I have no links or advice other than to not forget to include the characteristics of big metal audio transformers into your equations. The distortion and soft limiting of tubes is only a part of a good amp/processor. And know that some folks claim to be able to hear the difference between the same transformer wound with nickel or iron (Nashville recording engineers on differences in API EQs). I wouldn't doubt that they are correct.
I hear that subtle subharmonics are a part of the transformer sound; you'll have to confirm that for yourself. |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sat Apr 26, 2008 9:34 am Post subject:
|
|
|
Peake wrote: | I have no links or advice other than to not forget to include the characteristics of big metal audio transformers into your equations. |
OK, I'll look into that. I imagine it must be a hysteresis loop model for that part. That introduces time dependence into the model, which is fine. Thanks Peake. _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
elektro80
Site Admin
Joined: Mar 25, 2003 Posts: 21959 Location: Norway
Audio files: 14
|
Posted: Sat Apr 26, 2008 9:53 am Post subject:
|
|
|
I´ve tried hard to find some specific links but I simply cannot find them. I think a lot of what you would want where there. The silliest thing is that I´m sure I once posted one of them here at electro-music.com but I cannot find that one either. _________________ A Charity Pantomime in aid of Paranoid Schizophrenics descended into chaos yesterday when someone shouted, "He's behind you!"
MySpace
SoundCloud
Flickr |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sat Apr 26, 2008 10:12 am Post subject:
|
|
|
Very interesting. You would think with all the bickering and opinions on the subject that we would just Google up some keywords like "tube amplifier model" or "tube amp equations", and out would pop 100 references. It could be that manufacturers keep their models secret though. I did find a tube amp site but all it had were opinions. How strange! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
jksuperstar
Joined: Aug 20, 2004 Posts: 2503 Location: Denver
Audio files: 1
G2 patch files: 18
|
Posted: Sun Apr 27, 2008 1:08 am Post subject:
|
|
|
If you read C and such, try looking at some of the opensource code for projects like GNUitar, or the http://www.linuxguitar.org project. Through searching for open source guitar, I also came across this site:
http://www.guitarampmodeling.com/topic-1916.html
good luck, I've been keeping an eye on what you've been doing with chuck, just too busy to add to it. But, it's still interests me. |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sun Apr 27, 2008 4:16 am Post subject:
|
|
|
jksuperstar wrote: | good luck, I've been keeping an eye on what you've been doing with chuck, just too busy to add to it. But, it's still interests me. |
Hey, that's great, jksuperstar! I've had fun with the project so far and folks are so helpful, it's even more fun. When it's done we'll have some good guitar effects software to enjoy. Thanks for the links - I haven't found a model yet as the specific link did not take, but I'll look further. Surely on a site called "guitar modeling" they must talk about tube amp models, but so far I can only read messages about *using* tube amp models, not programming them. We'll see how it goes! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
|
Back to top
|
|
|
seraph
Editor
Joined: Jun 21, 2003 Posts: 12398 Location: Firenze, Italy
Audio files: 33
G2 patch files: 2
|
Posted: Sun Apr 27, 2008 3:19 pm Post subject:
|
|
|
DrJustice wrote: | a relative of our most distinguished member Seraph, perhaps? |
no that I know of... _________________ homepage - blog - forum - youtube
Quote: | Don't die with your music still in you - Wayne Dyer |
|
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Sun Apr 27, 2008 5:18 pm Post subject:
|
|
|
Inventor wrote: | It could be that manufacturers keep their models secret though. |
That is indeed the case. Good DSP algorithms and systems are hard to work out and are usually closely guarded secrets.
Quote: | I did find a tube amp site but all it had were opinions. How strange! |
There is no shortage of opinions on the matter, for sure
DJ
-- |
|
Back to top
|
|
|
elektro80
Site Admin
Joined: Mar 25, 2003 Posts: 21959 Location: Norway
Audio files: 14
|
Posted: Sun Apr 27, 2008 5:28 pm Post subject:
|
|
|
Opinions.... well... there is a dense mythology re all things tubes
I tend to think that what you want would be engineering style info.
OT.. or possibly not.
You guys know of that wah wah halo inductor mythology?
This page is good: http://www.geofex.com/Article_Folders/wahpedl/wahped.htm#inductor
Pay attention:
Quote: | I saw no differences at first with tiny sine wave drives. It wasn't until I turned the generator up that differences appeared. The Crybaby inductor performed exactly as I would have expected it to. That is, it had an output that was essentially a pure sine wave right up until the sine was big enough or lowe enough in frequency to start it into the first touches of saturation. When that started, I got precisely what theory predicts: appearance of the third harmonic of the dirve waveform, followed by fifth, and finally a touch of seventh when I really pushed it. However, when I did the same to the Fasel inductor, the onset of saturation-generated harmonics happened a bit sooner, and a second harmonic appeared with the third! As I turned the drive up, the fourth rose with the fifth, and I never got a seventh harmonic. The inductor, all by itself was clipping asymmetrically. |
Quote: | I queried some older and wiser EE's who have spent a career on magnetics. We came to the conclusion that the only way this could happen was if the inductor core had some kind of magnetic offset in it, so one polarity of the waveform saturated earlier than the other. However, none of them had ever seen this in a signal inductor like the ones I was testing. The only good explanation was that the inductor core itself was carrying a magnetic offset, a whiff of permanent magnetism. This was mildly astonishing because that is something that linear ferrite cores are explicitly designed NOT to do. |
As I said above.. this is a hot page. Read it!
and Peake´s comment re the iron is of course very relevant. The transformers can sometimes add some extra magic that sometimes can really make a difference. _________________ A Charity Pantomime in aid of Paranoid Schizophrenics descended into chaos yesterday when someone shouted, "He's behind you!"
MySpace
SoundCloud
Flickr |
|
Back to top
|
|
|
elektro80
Site Admin
Joined: Mar 25, 2003 Posts: 21959 Location: Norway
Audio files: 14
|
Posted: Sun Apr 27, 2008 5:30 pm Post subject:
|
|
|
Magic? Well, at least they can add some serious colour . _________________ A Charity Pantomime in aid of Paranoid Schizophrenics descended into chaos yesterday when someone shouted, "He's behind you!"
MySpace
SoundCloud
Flickr |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Sun Apr 27, 2008 6:02 pm Post subject:
|
|
|
WooHoo! tons of stuff! I'm a readin', I'm a readin'... Full report later! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Peake
Joined: Jun 29, 2007 Posts: 1113 Location: Loss Angeles
Audio files: 3
|
Posted: Sun Apr 27, 2008 7:08 pm Post subject:
|
|
|
I dont' know if any of those researching convolution modeling technology have posted their results, but convolution might be a good lead as it attempts to model holistically the various characteristics of any subject under examination. |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Apr 28, 2008 2:38 am Post subject:
|
|
|
Actually I read a bit further, including here:
http://digilander.libero.it/paeng/spice_models_for_vacuum_tubes.htm
That site lists some good detailed information for some tubes made by them. I can do my own circuit analysis following the prior reference's technique but using simpler tube equations to get a more solvable set of equations. The equations shown in the previous post have integrals due to the capacitors and transcendental forms which require iterative solutions, not very CPU friendly on a sample basis.
For example, I can use the simple tride model: Ip= K*(m*Vgk+Vpk)^(1.5), which only had constants K and m (mu). Let me try to work with that for a while... We will see what happens... _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Apr 28, 2008 4:09 am Post subject:
|
|
|
The first model that I have ended up with is the following:
Vin => HPF @ 7 Hz => LPF @ 3kHz => x^(3/2) => dac;
Where the model is composed of a high pass filter at 7 Hz, a low pass filter at 3 kHz, and an exponent model of x^(3/2). This model includes both the high and low pass effects at the input of the common cathode stage, and an oversimplified tube model where I have removed the transcendental term. The transformer is not yet modeled, and the model is a wave-shaping only model in which the present value is not affected by previous values. I wrote a short program with this model and it sounded OK.
That is an extremely oversimplified model, I'll admit for sure, but it does give a somewhat tube-like warm sound to a ramped sinusoid so I'm OK with it for starters. It's only a starting point. As I become more familiar with tube models and understand them better (and transformer models), I will increase the complexity of the models that I put in the program. At least this is a good beginning. Thanks for the links and advice! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Apr 28, 2008 3:21 pm Post subject:
|
|
|
Ugh, after further testing today I'm realizing that the x^(3/2) term is not quite correct, can't be... that is expanding the wave-shape, not compressing it. Just because the tube equation is of that form doesn't mean the transfer function is. Back to the equations, of which I have four pages of incorrect solutions now! Yikes! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Mon Apr 28, 2008 4:38 pm Post subject:
|
|
|
Here and here are a couple of discussions from music-dsp which may contain something of interest. There's probably more to be found there.
DJ
-- |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Mon Apr 28, 2008 5:05 pm Post subject:
|
|
|
DrJustice wrote: | Here and here are a couple of discussions from music-dsp which may contain something of interest. There's probably more to be found there.
DJ
-- |
Thanks DJ, but didn't find much in those two threads - I'll look again there. It's OK though, I'm starting to piece it together. I'm working with the simplest tube model to start with, the Leach model, and planning to work up to the Rydel model which is continuous and takes more into account. Also my technique for dealing with the transcendental equations is to not solve them, but rather leave them in their original form and code them directly into ChucK with a crude equation solver.
I now have approximate component values for a common cathode amplifier, tube parameters for the Leach model, and more references. The secret was to search on tube amplifier sites devoted to hobbyist building tube amplifiers. They discuss things from a circuit analysis perspective, which is not what I want but I am trying to muster up my old circuit analysis abilities from the wayback machine to solve them correctly. Making a model in ChucK and sweeping some input values to see what output value converges is helping as well.
So I have a tough job ahead of me but I'll persevere. Thanks again for the links everyone - you gave me the push-start that I needed! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Tue Apr 29, 2008 1:02 am Post subject:
|
|
|
Aha! After more reading, more programming, and taking breaks to let my head clear over and over again, I now think I have the first workable tube transfer function. Below are the converged simulation values. To save you from studying the table, just look at the second column and the last column. The second column is a linear sweep of the input voltage, and the last column is the corresponding output voltage. Note the inversion and the gain.
Code: | <<<i, Vin, Verror, Vgk, Vak, Ia, Vo>>>;
1 0.000000 0.000000 0.000000 0.000000 0.000000 50.000000
12 0.100000 0.415891 0.071628 35.167053 0.000275 36.229811
7 0.200000 0.054208 0.162034 36.129175 0.000379 31.071001
7 0.300000 -0.340612 0.255431 33.397189 0.000453 27.374997
7 0.400000 -0.425351 0.348329 30.263746 0.000525 23.739196
7 0.500000 -0.447910 0.441144 26.827313 0.000598 20.124006
7 0.600000 -0.401860 0.533926 23.082435 0.000669 16.561272
7 0.700000 -0.259627 0.626695 19.013856 0.000738 13.087776
7 0.800000 0.013649 0.719456 14.602737 0.000805 9.741477
5 0.900000 0.128989 0.819572 4.342429 0.000802 9.914876
12 1.000000 0.262820 0.909050 2.604408 0.000904 4.788045 |
I coded it up in ChucK and you can definitely hear the "warm" harmonics, yay! That still doesn't model the capacitors or the transformer but at least it's a step in the right direction. Unfortunately the model does not clip above 1V input, but I think I can add that with a ChucK feature.
Success! Who ever thought it would be such fun to listen to ramped sinusoids humming on my speakers? HaHa THANKS a million! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Wed Apr 30, 2008 5:52 am Post subject:
|
|
|
I wrote up a web page on the tube amp model and how to derive your own model, it is here:
http://www.freedomodds.com/music/tube_amp.html _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
elektro80
Site Admin
Joined: Mar 25, 2003 Posts: 21959 Location: Norway
Audio files: 14
|
Posted: Wed Apr 30, 2008 6:08 am Post subject:
|
|
|
Great work!
So now you can essentially build an app in chuck that works like a balanced transformer DI with tube gain stages and with optional iron on the output ? _________________ A Charity Pantomime in aid of Paranoid Schizophrenics descended into chaos yesterday when someone shouted, "He's behind you!"
MySpace
SoundCloud
Flickr |
|
Back to top
|
|
|
Inventor
Stream Operator
Joined: Oct 13, 2007 Posts: 6221 Location: near Austin, Tx, USA
Audio files: 267
|
Posted: Wed Apr 30, 2008 6:17 am Post subject:
|
|
|
Whew! I just got done with the tube model! You're a tough one, elektro80! Sure, I need something to do today, why not look up a hysteresis model of some sort? One of those links had transformer model parameters... Here I go! _________________ "Let's make noise for peace." - Kijjaz |
|
Back to top
|
|
|
|