Yet Another Tonestack Calculator

Started by why-trv, October 02, 2024, 08:50:30 AM

Previous topic - Next topic

artofharmony

Oh my gosh you built it in JavaScript. You absolute madlad. I might actually be able to contribute to this one! I tried to contribute to TSC on the web at one point, but it was over my head. But if it's built in web tech, sign me up!

thunderaxe

i have a question -- how does one figure out what values to plug in for R-in and RL?
if i'm trying to come up with a baxandall tone stack for a big muff, should i copy over the R-in and RL values from the big muff tone stack?

fryingpan

Quote from: thunderaxe on October 10, 2024, 03:31:03 PMi have a question -- how does one figure out what values to plug in for R-in and RL?
if i'm trying to come up with a baxandall tone stack for a big muff, should i copy over the R-in and RL values from the big muff tone stack?
Basically, yes.
Otherwise, you rework what's before and after to suit.

thunderaxe

Quote from: fryingpan on October 10, 2024, 03:58:00 PM
Quote from: thunderaxe on October 10, 2024, 03:31:03 PMi have a question -- how does one figure out what values to plug in for R-in and RL?
if i'm trying to come up with a baxandall tone stack for a big muff, should i copy over the R-in and RL values from the big muff tone stack?
Basically, yes.
Otherwise, you rework what's before and after to suit.

okay, so in a BMP, is RL basically just the output volume pot? hence 100k? even though there's another gain stage between the tone stack and the output volume pot?
and is R-in just the resistor in the feedback loop of the previous gain stage, hence 15k?

why-trv

#25
Quote from: thunderaxe on October 10, 2024, 05:28:59 PMokay, so in a BMP, is RL basically just the output volume pot? hence 100k? even though there's another gain stage between the tone stack and the output volume pot?
and is R-in just the resistor in the feedback loop of the previous gain stage, hence 15k?

Not really, we need to calculate the input impedance of the gain stage that goes after the tonestack. And that's what I actually forgot to do...  :icon_eek:
For instance, you can lookup "common emitter amplifier impedance" online

fryingpan

#26
Quote from: thunderaxe on October 10, 2024, 05:28:59 PM
Quote from: fryingpan on October 10, 2024, 03:58:00 PM
Quote from: thunderaxe on October 10, 2024, 03:31:03 PMi have a question -- how does one figure out what values to plug in for R-in and RL?
if i'm trying to come up with a baxandall tone stack for a big muff, should i copy over the R-in and RL values from the big muff tone stack?
Basically, yes.
Otherwise, you rework what's before and after to suit.

okay, so in a BMP, is RL basically just the output volume pot? hence 100k? even though there's another gain stage between the tone stack and the output volume pot?
and is R-in just the resistor in the feedback loop of the previous gain stage, hence 15k?
Somebody with better theoretical knowledge than me will be able to answer this better, but the output impedance of the preceding stage isn't exactly easy to figure out. Apart from the fact that it depends on which version of the BMP you're talking about, the topology is usually a BJT common emitter with mild degeneration (no effect on output impedance), some slight feedback through a large collector-base resistor (should reduce output impedance) technically swamped by the much stronger feedback provided by the clipping, when it's clipping? So the output impedance is not exactly straightforward. The following stage instead is a BJT common emitter with (strong) degeneration. (The Triangle Muff shows RC = 10k and RE = 2.2k). RL is going to be a bit smaller than the smallest resistor in the voltage divider at the base. (In the Triangle Muff, that'll be 100K). All the tonestack calculators I've seen assume some very approximate values for both R-in and RL. R-in has significant effect on the frequency response, RL not much. I've seen the former approximated to anything between 5k and 20k.

fryingpan

I mean, I did some simulations.
It would appear that the preceding stage (Triangle Muff version), when not clipping, has an output impedance around 7.8k with a 2N3904, about 9k with a 2N2222 or a BC547B. But the preceding stage will always be clipping! And it would appear that the output impedance drops to somewhere around 1.1k, "measured" by connecting a 1.1k load at the collector and measuring half the RMS voltage of what you get with a 1Gohm load.

antonis

#28
Quote from: fryingpan on October 11, 2024, 07:13:31 AMI mean, I did some simulations.
It would appear that the preceding stage (Triangle Muff version), when not clipping, has an output impedance around 7.8k with a 2N3904, about 9k with a 2N2222 or a BC547B.

That's because of different Early voltages of different transistors.. :icon_wink:
(both in Simulators data and real life..)

You can verify it by comparing respective hoes (Output Admittances), calculate Early voltage via ICollector / hoe and find BJT's Collector resistance via Early voltage divided with Collector current ( VA/IC, ignoring VCE due its negligible value compared to VA)..
Or, more simply, just calculate the reciprocal value of hoe.. :icon_wink:

That resistance is effectivelly set in parallel with Collector resistance for stage's output equivalent impedance..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

why-trv

Very interesting, I'd say it's getting way above my paygrade as a mere mortal user, so please just let me know if I should change the defaults for RIN or RL :D

why-trv

#30
Quote from: artofharmony on October 09, 2024, 09:38:02 PMOh my gosh you built it in JavaScript. You absolute madlad. I might actually be able to contribute to this one! I tried to contribute to TSC on the web at one point, but it was over my head. But if it's built in web tech, sign me up!

TSC in the web is JavaScript too, isn't it? (Albeit a different flavor.)
In YATSC, given the math for transfer function coefficients, its pretty straightforward to add a tonestack - it's just two functions basically (e.g. the newly added Bandmaster stack - https://github.com/why-trv/yet-another-tonestack-calculator/blob/main/src/models/tonestacks/Fender/Bandmaster6G7.js). And a schematic.

I've also developed a Python script that takes a Lcapy-style netlist with short frontmatter and generates both the schematic and the JS code from it, so the whole thing can be defined using a short file like this: https://github.com/why-trv/yet-another-tonestack-calculator/blob/main/resources/lcapy/circuits/Fender/Bandmaster6G7.sch

fryingpan

I'd be inclined to believe that the effective R-in is around 1.2k, due to the way people use a Big Muff, but I'll wait for others to chime in.

Jim Hagerman

I have an idea for you...

How about adding an oscilloscope type graph below the frequency response chart?  Drive the stack with a 200Hz square wave and plot what the output looks like.  We all know time domain and frequency domain are linked.  This would be a great opportunity to see such results.

Many of us who design or fix guitar pedals use an oscilloscope for debugging and test.  This new feature would allow us to see in almost real time the effects of a wrong component value.

PRR

Quote from: Jim Hagerman on October 11, 2024, 06:55:23 PMan oscilloscope type graph below the frequency response chart?

It could be more useful than the phase graph. Most people don't hear or think in phase. In part because the customary wrap-around at 180 seems nonsense.

OTOH, creeping featuritis is a real thing.
  • SUPPORTER

why-trv

Nice idea, working on it now...


why-trv

#35
And it's live!

I know next to nothing about debugging circuits and have little idea how close the scope of these ideal models resembles something in real life, but it is kinda fun.
I also didn't have much time to test it, so please let me know if anything looks wrong.

It's a bit of a fine line between plot resolution and performance (especially since it's JavaScript) - for instance, spikes in some cases are not as high as they should be. Hopefully I can figure out a way to optimize this later.

Jim Hagerman

Quote from: why-trv on October 14, 2024, 06:37:38 PMso please let me know if anything looks wrong
Quote from: why-trv on October 14, 2024, 06:37:38 PMso please let me know if anything looks wrong

Wow, looks fantastic! Very much as I expected waveforms to be. Now I know what I am seeing on scope is correct.

One more thing, a lot of these tonestacks are driven by not just a resistance, but a series capacitor as well. Often, the capacitance value greatly reduces bass response because of the high pass filter created. Would be nice if such a coupling capacitor were added in front of each filter. Default value could be 10uF or something that appears relatively infinite.

Unbelievable how fast you did this!

why-trv

Quote from: Jim Hagerman on October 16, 2024, 12:19:15 AMWow, looks fantastic! Very much as I expected waveforms to be. Now I know what I am seeing on scope is correct.

One more thing, a lot of these tonestacks are driven by not just a resistance, but a series capacitor as well. Often, the capacitance value greatly reduces bass response because of the high pass filter created. Would be nice if such a coupling capacitor were added in front of each filter. Default value could be 10uF or something that appears relatively infinite.

Unbelievable how fast you did this!

Thanks!
That's a good point. I'm including the input coupling cap in newly added circuits that have it (as opposed to the ones I just ported from TSC in the web), such as the 6G7 Bandmaster and Hiwatt CP, and it sounds appropriate to add one even if the original circuit didn't have it.
I don't know if I'll have the time to re-do most of the stacks (I gotta say it got a bit out of hand in terms of time spent on a hobby project ;D), but I'll keep this in mind.

SprinkleSpraycan

Quote from: why-trv on October 08, 2024, 10:21:03 PMAlso just added Boss HM-2 and FZ-2 EQ sections

Just discovered this add the other day. Amazing. Thank you thank you.

I really like the marshall like eq in the sovtek. Any chance of adding that to the calculator?