My very early New Years resolutions.

General discussion area for tube amps.

Moderators: pompeiisneaks, Colossal

Post Reply
User avatar
LeftyStrat
Posts: 3117
Joined: Fri Jan 14, 2005 6:58 pm
Location: Marietta, SC, but my heart and two of my kids are in Seattle, WA

My very early New Years resolutions.

Post by LeftyStrat »

Two things that I would consider the best Christmas gift ever, one of them I might be able to do on my own, but this community would surely help, the other I need a lot of help. (I know, don't call me Shirley)

Software is how I have earned a living for the past almost thirty years, but re-engineering this may require some math skills where I might be lacking:

- I want a version of the Duncan Tone Stack Calculator that let's you input netlists, so that any tone stack can be modeled. I also want simulation so I can pass a wave file through it and listen to the results. I have the source to Duncan's TSC, I am slowly going through understanding the math based on complex numbers. I want to build something that will run on multiple platforms (that's the easy part for me).

- I want a hardware design for fully characterizing old tubes. I will settle for a system that will give *everything* there is to know about a 12ax7 or friends. I want noise figures, plate curves (as data and not some grainy printout), frequency response, as well as stuff you'd get from an old tube tester, all in a form that can be digested by any computer with a USB port. And I don't want to spend two grand to get it.

Anyway, perhaps our collective experience could produce these in a form that would make it cheap or free for everyone?

I will have the Duncan TSC in it's current state ported to the Mac very soon, but I want a lot more features for this great tool.

Anyone want to help?
It's never too late to have a happy childhood.
fperron_kt88
Posts: 72
Joined: Wed Oct 10, 2007 2:19 pm
Location: Montreal

Re: My very early New Years resolutions.

Post by fperron_kt88 »

Hello LeftyStrat,

(this happens to be my first post here, so hello to all, en passant)

To me (and this is very personnal), netlist + simulation automatically calls for hspice. Folks have already figured out all the complex number math thing, the ill-conditioned matrices and what not. So, maybe you could consider looking that way first. I wouldn't be surprised to find the original Berkeley code for spice lying somewhere on the net for you to read.

I suspect you are looking for a live reaction between a pot change (parameter sweep) and visual and aural effects. In this case my suggestion is probably less interesting... unless you think that waiting a few minutes could still be called "live" :cry: ! I remember having used a Em Kerrrang of a few seconds to simulate with and getting a reasonable tradeoff between computation time, file size, sound quality and circuit behavior insight. BTW look at http://www.lynx.bc.ca/~jc/model.html for a good 12AX7 model... I also used GoldWave as a basic interface to get/playbak samples and gluing the rest with perl. Definitely not realtime, but yet loads of good clean fun. And distorted guitar sounds :o

If you dig Laplacian transforms, Mason rules and Z transforms, you could probably take any undergraduate DSP book and figure out real-time algorithms driven by some graphical displays of Caps and Res/Pot. But this is essentially what the Duncan thing probably is.

From my experience, the fastest, cheapest and most simple way to listen to a virtual circuit was to play a sample through a spice simulator.

As for the curve tracing HW, I have dreamt about the same circuit for years. Turns out I started to swap tubes in real amps instead... If you dig GPIB and have access to a good electronics lab, you might be able to realize such a setup and get some curves (perhaps even feed the data back into models like on the link above...). My head just spins at the cost of doing this that way though. It spins even faster at the time and efforts required to build it from discrete parts and package it into a usb tool... I would very much like (and play with) the end product though... Let me know if Santa helps you with this one :wink: .

FX
dehughes
Posts: 1143
Joined: Thu Mar 23, 2006 2:29 pm
Location: Portland, OR

Re: My very early New Years resolutions.

Post by dehughes »

Wow. Most of that is over my head, but it's not so far over that I fail to understand how cool it all would be should it ever get realized.
Tempus edax rerum
User avatar
Richie
Posts: 1175
Joined: Mon Jan 09, 2006 3:44 am
Location: Ky

Re: My very early New Years resolutions.

Post by Richie »

tube cad has some good info.

http://www.glass-ware.com/tubecad/
sentrido
Posts: 2
Joined: Wed Oct 18, 2006 1:26 am

Re: My very early New Years resolutions.

Post by sentrido »

You should look into writing a plugin:

http://en.wikipedia.org/wiki/Virtual_Studio_Technology

http://en.wikipedia.org/wiki/Audio_Units

I haven't looked at this stuff in a long time, but i might be willing to help. A tone stack simulator plugin would be sweet!
fperron_kt88
Posts: 72
Joined: Wed Oct 10, 2007 2:19 pm
Location: Montreal

Re: My very early New Years resolutions.

Post by fperron_kt88 »

A second tought about the HW part (tube tracer): with the Clio Win lite (http://www.audiomatica.com/) and a DC power scaling kit (http://www.londonpower.com/) you would have most of what needs to be put together for a tracer, save for a few parts that , as a tube amp builder, I am convinced you already have.

You would have to be really careful not to fry anything but the basics are probably there. Save for the multiplatform thing (stuck in windows... AFAIK).


+1 for sentrido: a dxi or vst plugin would bring you there. You still have to figure the Z transform part though, but there is a large community of coders that have already figured things out for EQs, tube amp sim and what not... so you might get lucky running into some very good examples.
User avatar
LeftyStrat
Posts: 3117
Joined: Fri Jan 14, 2005 6:58 pm
Location: Marietta, SC, but my heart and two of my kids are in Seattle, WA

Re: My very early New Years resolutions.

Post by LeftyStrat »

Thanks for all the replies. I've written quite a few plugins, mostly AU or LADSPA, but that would definitely be nice if you could generate and audio plugin from a tone stack. After staring at the code for a while it is starting to make sense. Here is the function for the Big Muff tone control. It is called for each frequency point along the plot. I have added my comments:

function SCalcMuff(freq: double): double;
var Z11, Z12, Z13, Z14,
Z21, Z22, Z23, Z24,
Z31, Z32, Z33, Z34,
Z41, Z42, Z43, Z44: TComplex;
XC1, XC2: TComplex;
mj: TComplex; { -j }
omega: double;
Iout: TComplexBase;
a: TCpxCramerMatrix;
b: TCpxCramerVector;
res: TCpxCramerVector;
begin
{ Work out the capacitor reactances }
omega := 2 * Pi * freq;
mj := CpxSet(0,-1);
XC1 := CpxDivide(mj,CpxSet(omega * C1));
XC2 := CpxDivide(mj,CpxSet(omega * C2));
{ Work out the mesh impedances }
Z11 := CpxAdd(XC2,CpxSet(ZS+R1));
{ R3A and R3B are each side of the pot }
Z22 := CpxAdd(XC1,CpxSet(R1+R3A+R3B));
Z33 := CpxAdd(XC2,CpxSet(R3A+R4));
Z44 := CpxSet(R3B+R4+R2);
Z12 := CpxSet(-R1); Z21 := Z12;
Z13 := CpxNegate(XC2); Z31 := Z13;
Z14 := CpxSet(0); Z41 := Z14;
Z23 := CpxSet(-R3A); Z32 := Z23;
Z24 := CpxSet(-R3B); Z42 := Z24;
Z34 := CpxSet(-R4); Z43 := Z34;
{ Now into the array... }
a[0,0] := Z11; a[0,1] := Z12; a[0,2] := Z13; a[0,3] := Z14;
a[1,0] := Z21; a[1,1] := Z22; a[1,2] := Z23; a[1,3] := Z24;
a[2,0] := Z31; a[2,1] := Z32; a[2,2] := Z33; a[2,3] := Z34;
a[3,0] := Z41; a[3,1] := Z42; a[3,2] := Z43; a[3,3] := Z44;
CpxRSet(1.0,b[0]);
CpxRSet(0.0,b[1]);
CpxRSet(0.0,b[2]);
CpxRSet(0.0,b[3]);
{ Perform the elimination using Cramer's Rule }
CpxCramer(4,a,b,res);
{ And finish off }
CpxRMagnitude(CpxSubtract(res[2],res[3]),Iout);
{ Convert from gain to decibels }
result := Log10(Iout * R4) * 20.0;
end;

The C1, C2, R1-4, and ZS (Zsrc) all come directly from the circuit.

As far as the hardware side, I've found a few interesting things on Steve Bench's site:

Poor mans distortion tester:
http://members.aol.com/sbench102/TubeMisc/notch.gif

Noise Meter:
http://members.aol.com/sbench101/#Noise

Tube Tester:
http://members.aol.com/sbench101/#TubeTest

And then I've also found a kit for $629:
http://www.transcendentsound.com/tube_analyzer.htm

This really looks promising:
http://www.tech-diy.com/MCTracer_no_pix ... eb6_04.htm
It's never too late to have a happy childhood.
Post Reply