Browser-friendly Tone Stack Calculator

Started by jatalahd, November 27, 2017, 01:15:03 PM

Previous topic - Next topic

~arph

That is a good method. Can do this in JavaScript too.

jatalahd

Quote from: iiimonfire on July 04, 2018, 10:39:15 AM
Could you implement sliders for these other Resistor and Capacitor values?
Quote from: j_flanders on July 06, 2018, 07:30:18 PM
Instead of sliders, simply hover your mouse pointer over a component (resistor, capacitor etc.) in the circuit and start scrolling up or down.

I have been away from the forum for some time so that is why I did not respond earlier. These are good proposals for making life easier. Possibly the cells in the parts table can be changed in a way that the standard component values would be selectable by scrolling the mouse wheel. But before doing anything I need to think also other options.

During the past month or so I actually did some development for the TSC in the web. I added the sweep and snapshot features and also calculators for Hiwatt and Crate are added. Getting a bit tangled up in my limited resources in JavaScript development though...

Also, if someone is interested (~arph?) of making a simple prototype of the "change and apply component value by scrolling mouse wheel", you can just develop one individual cell to any tone stack page (for example the bigmuff.htm) and send your demo to me. I can continue from there to apply it to the rest of the tone stack pages. In addition, some refactoring would be needed to collect some duplicate HTML code from the pages. Trying to get into that direction slowly. Life gets in the way too often...
  • SUPPORTER
I have failed to understand.

marcelomd

Hi,
How do you develop the calculation step? I peeked the source code and it is a couple of monter equations hehehe
I wanted to add some stacks, but cannot remember enough from my circuits classes.

Thanks!

jatalahd

Quote from: marcelomd on September 17, 2018, 10:03:38 AM
Hi,
How do you develop the calculation step?
Thanks!

I use basic circuit analysis. Usually the mesh analysis (current loops, based on Kirchhoff's Voltage Law) is more suitable, but sometimes the nodal analysis (voltage nodes, based on Kirchhoff's Current Law) must be used.

Simple example is the Big Muff tone stack. Draw the circuit and the current loops inside. Then use the matrix formulation of the mesh analysis to write the impedance matrix of the circuit. Then look at the /maxima_files/bigmuff.txt file in the GitHub repository. The goal is to use Cramer's rule to solve output current. There in the maxima file, I write the complete impedance matrix to the denominator and according to the Cramer's rule the numerator matrix to solve the output current. In the bigmuff case the output current was I3 - I4, difference of the mesh currents 3 and 4.

All you need to do is to find the matrices to solve the output current, then use the Maxima files as template to produce coefficients As^3, Bs^2, C^s and D for numerator and denominator. Multiply by output resistance to get Vout/Vin coefficients. Then copy these coefficients to the tone stack html file. The loop at the end of the file will take care of the numerical analysis. There can be more than four levels of coefficients, the Hiwatt stack required 6 levels. So the Hiwatt example is the most "general" example at the moment. I am going to unify the coefficient handling in the future.

But yes, now that I think of it, this sounds quite difficult. But once you get the idea, a new stack can be added in two or three hours time, including testing against SPICE model.

If you have a schematic of some tone stack that you want to add, you can send it to me and I can add it (if it is not too complex). Currently all the tone stacks are passive stacks. To add tone stacks with active components, the procedure described here does not work.
  • SUPPORTER
I have failed to understand.

marcelomd

Thanks!

I don't have anything specific in mind right now, but sometimes you just want to do a quick check. Or compare the difference between versions of the same idea (say, two or three realizations of a high cut). Opening the simulator every time is quite cumbersome.

Anyway. Let's see if I can do one.



vigilante397

Blocked by my work's firewall, but I'm commenting here so I remember to open it up when I get home and bookmark it 8)

Also, how did I not see this almost a year ago?!?!?!
  • SUPPORTER
"Some people love music the way other people love chocolate. Some of us love music the way other people love oxygen."

www.sushiboxfx.com

roseblood11

Would it be possible to add the Fender Brownface Tonestack with the strange 350k pot with the extra lug and cap to gnd? Tremolux 6g9-a for example...

Vivek


vigilante397

How do people even find these threads that have been dead for two years? :P
  • SUPPORTER
"Some people love music the way other people love chocolate. Some of us love music the way other people love oxygen."

www.sushiboxfx.com

Vivek


Vivek

Quote from: jatalahd on September 17, 2018, 01:10:54 PM

I use basic circuit analysis.


Can you consider adding WebAudio to run guitar riff samples through the tone stack and make viewer hear the changes as he plays around with the controls ?

jatalahd

Quote from: vigilante397 on October 25, 2020, 02:49:34 AM
How do people even find these threads that have been dead for two years? :P
Is it a bad thing to find the old threads? Fortunately the starter of the thread is still alive  ;)

Quote from: roseblood11 on October 24, 2020, 09:30:50 PM
Would it be possible to add the Fender Brownface Tonestack with the strange 350k pot with the extra lug and cap to gnd? Tremolux 6g9-a for example...

Added here: http://www.guitarscience.net/tsc/brownface.htm

Please confirm that it is done the way you wanted it. In some version there was a cap parallel to the plate resistor in the sourcing stage, I tried to add that to the model, but the result seemed weird so I did not include that. But as a bonus the tap resistance is modifiable as is the pot total resistance so you can play around and see how it works... Unfortunately I cannot verify the results against spice, as to my knowledge there is no direct way to model tapped pots ...??? Please let my know if something needs to be changed, due to limited time I might have missed something.

Quote from: Vivek on October 25, 2020, 01:36:11 AM
And the BLACK STAR ISF please
Thank you

I will try this next weekend, I am busy with my own project at the moment. Thanks for suggesting that to be added.

Quote from: Vivek on October 25, 2020, 06:16:22 AM
Can you consider adding WebAudio to run guitar riff samples through the tone stack and make viewer hear the changes as he plays around with the controls ?

Unfortunately no. My time and skills are limited. But if someone knows how to do this (in javascript or other web-technology :o) the current source files are in github and I can merge pull requests ...
  • SUPPORTER
I have failed to understand.

ThermionicScott

#32
Quote from: vigilante397 on October 25, 2020, 02:49:34 AM
How do people even find these threads that have been dead for two years? :P
The search, of course!   :icon_lol:

Thanks for making this web version of TSC, jatalahd.  I've been using it a lot lately.
"...the IMD products will multiply like bacteria..." -- teemuk

aron

Glad this came up again! I needed this a few weeks ago!

roseblood11


Vivek

Quote from: jatalahd on October 25, 2020, 10:31:46 AM

Unfortunately I cannot verify the results against spice, as to my knowledge there is no direct way to model tapped pots ...???


I suppose we will have to use individual resistors and a bit of simple math in SPICE, to be able to model a tapped pot.



PRR

> able to model a tapped pot.

The real issue is: there's little or no choice when you go to buy this pot.
  • SUPPORTER

ckilgore


PRR

Quote from: ckilgore on October 30, 2020, 11:51:24 AM
Weber stocks the 70k tapped 350k pot.  https://tedweber.com/wp354at/

Yes, and others. This seems to be the ONLY choice everywhere. So not sure the simulator needs tap-point adjustment. Anyway likely taps will always be 10%, 20% (what we use), or 50%. Between 10% and 20% is just a difference where the treble-cut comes in/out of effect. 50% is probably useless here (it would make some sense in a NFB EQ scheme).
  • SUPPORTER

Vivek

Are the Brownface EQ  curves unobtainable without tapped pot ?

Is there something special with the Brownface EQ curve that makes it worthwhile to use a tapped pot ?