├── 5e3_pic.png ├── README.md ├── aria.htm ├── aria2_pic.png ├── bassman5f6a.htm ├── bassman5f6a_pic.png ├── baxandall_1.htm ├── baxandall_1_pic.png ├── baxandall_2.htm ├── baxandall_2_pic.png ├── baxandall_passive.htm ├── baxandall_passive_2.htm ├── baxandall_passive_2_pic.png ├── baxandall_passive_pic.png ├── bench.htm ├── bench2_pic.png ├── bigmuff.htm ├── bigmuff2_pic.png ├── blackstar.htm ├── blackstar2_pic.png ├── boneray.htm ├── boneray2_pic.png ├── brownface.htm ├── brownface2_pic.png ├── circuit_analysis ├── baxandall_1.pdf ├── baxandall_2.pdf ├── baxandall_passive.pdf ├── baxandall_passive_2.pdf ├── james_2.pdf ├── james_3.pdf ├── james_4.pdf └── nevehilo.pdf ├── complex.min.js ├── crate.htm ├── crate2_pic.png ├── deluxe_5e3.htm ├── drz.htm ├── drz_pic.png ├── dumble_jazz.htm ├── dumble_jazz2.htm ├── dumble_jazz2_pic.png ├── dumble_jazz3_pic.png ├── dumble_rock.htm ├── dumble_rock2.htm ├── dumble_rock2_pic.png ├── dumble_rock3_pic.png ├── dygraph.css ├── dygraph.min.js ├── eseries.htm ├── eseries2_pic.png ├── expand_more.png ├── fender.htm ├── fender2_pic.png ├── framus.htm ├── framus2_pic.png ├── hiwatt.htm ├── hiwatt2_pic.png ├── info.htm ├── james.htm ├── james2_pic.png ├── james_2.htm ├── james_2_pic.png ├── james_3.htm ├── james_3_pic.png ├── james_4.htm ├── james_4_pic.png ├── marshall.htm ├── marshall2_pic.png ├── maxima_files ├── aria.txt ├── bassman5f6a.txt ├── baxandall_1.txt ├── baxandall_2.txt ├── baxandall_passive.txt ├── baxandall_passive_2.txt ├── bench.txt ├── bigmuff.txt ├── blackstar.txt ├── boneray.txt ├── brownface.txt ├── brownface2.txt ├── crate.txt ├── deluxe_5e3.txt ├── drz.txt ├── dumble_jazz.txt ├── dumble_jazz2.txt ├── dumble_rock.txt ├── dumble_rock2.txt ├── eseries.txt ├── fender.txt ├── framus.txt ├── hiwatt.txt ├── james.txt ├── james_2.txt ├── james_3.txt ├── james_4.txt ├── marshall.txt ├── nevehilo.txt ├── princeton_5e2.txt ├── princeton_5f2a.txt ├── projunior.txt ├── swtc1.txt ├── swtc2.txt ├── swtc3.txt ├── swtc4.txt ├── tilt.txt ├── values_aria.txt ├── values_bench.txt ├── values_bigmuff.txt ├── values_crate.txt ├── values_dumble_jazz.txt ├── values_dumble_rock.txt ├── values_eseries.txt ├── values_fender.txt ├── values_hiwatt.txt ├── values_james.txt ├── values_marshall.txt ├── values_vox.txt ├── vox.txt └── wah.txt ├── nevehilo.htm ├── nevehilo_pic.png ├── nouislider.css ├── nouislider.min.css ├── nouislider.min.js ├── princeton.htm ├── princeton2_pic.png ├── princeton5e2.htm ├── princeton5e2_pic.png ├── projunior.htm ├── projunior2_pic.png ├── rlc.js ├── rlc_test.js ├── swtc1.htm ├── swtc1_pic.png ├── swtc2.htm ├── swtc2_pic.png ├── swtc3.htm ├── swtc3_pic.png ├── swtc4.htm ├── swtc4_pic.png ├── tilt.htm ├── tilt2_pic.png ├── tsc.css ├── tsc_common.js ├── vox.htm ├── vox2_pic.png ├── wah.htm └── wah2_pic.png /5e3_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/5e3_pic.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tsc 2 | Project discontinued. Better version by other contributor here: https://github.com/why-trv/yet-another-tonestack-calculator. 3 | -------------------------------------------------------------------------------- /aria2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/aria2_pic.png -------------------------------------------------------------------------------- /bassman5f6a_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/bassman5f6a_pic.png -------------------------------------------------------------------------------- /baxandall_1_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/baxandall_1_pic.png -------------------------------------------------------------------------------- /baxandall_2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/baxandall_2_pic.png -------------------------------------------------------------------------------- /baxandall_passive_2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/baxandall_passive_2_pic.png -------------------------------------------------------------------------------- /baxandall_passive_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/baxandall_passive_pic.png -------------------------------------------------------------------------------- /bench2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/bench2_pic.png -------------------------------------------------------------------------------- /bigmuff.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TSC in the web 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 22 | 23 | 24 | 27 | 80 | 95 | 96 | 97 | 109 | 110 |
25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |
PartValue
Ω
Ω
Ω
Ω
Ω
F
F
74 |
75 | 76 | 77 | 78 |
79 |
81 |
82 |
83 | AmplitudePhase 84 |
85 | 86 | 87 | 88 |
89 |
90 |
91 | 92 |
93 |
94 |
98 |
99 | RM 100 | 105 | 106 |
107 |



108 |
111 | 112 | 265 |
266 | 267 | 268 | -------------------------------------------------------------------------------- /bigmuff2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/bigmuff2_pic.png -------------------------------------------------------------------------------- /blackstar2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/blackstar2_pic.png -------------------------------------------------------------------------------- /boneray2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/boneray2_pic.png -------------------------------------------------------------------------------- /brownface2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/brownface2_pic.png -------------------------------------------------------------------------------- /circuit_analysis/baxandall_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/circuit_analysis/baxandall_1.pdf -------------------------------------------------------------------------------- /circuit_analysis/baxandall_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/circuit_analysis/baxandall_2.pdf -------------------------------------------------------------------------------- /circuit_analysis/baxandall_passive.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/circuit_analysis/baxandall_passive.pdf -------------------------------------------------------------------------------- /circuit_analysis/baxandall_passive_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/circuit_analysis/baxandall_passive_2.pdf -------------------------------------------------------------------------------- /circuit_analysis/james_2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/circuit_analysis/james_2.pdf -------------------------------------------------------------------------------- /circuit_analysis/james_3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/circuit_analysis/james_3.pdf -------------------------------------------------------------------------------- /circuit_analysis/james_4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/circuit_analysis/james_4.pdf -------------------------------------------------------------------------------- /circuit_analysis/nevehilo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/circuit_analysis/nevehilo.pdf -------------------------------------------------------------------------------- /complex.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | Complex.js v2.0.11 11/02/2016 3 | 4 | Copyright (c) 2016, Robert Eisele (robert@xarg.org) 5 | Dual licensed under the MIT or GPL Version 2 licenses. 6 | */ 7 | (function(n){function h(){throw SyntaxError("Invalid Param");}function g(a){return.5*(Math.exp(a)-Math.exp(-a))}function e(a){return.5*(Math.exp(a)+Math.exp(-a))}function m(a,b){var c=Math.abs(a),d=Math.abs(b);return 0===a?Math.log(d):0===b?Math.log(c):3E3>c&&3E3>d?.5*Math.log(a*a+b*b):Math.log(a/Math.cos(Math.atan2(b,a)))}function d(a,b){if(!(this instanceof d))return new d(a,b);var c={re:0,im:0};if(void 0===a||null===a)c.re=c.im=0;else if(void 0!==b)c.re=a,c.im=b;else switch(typeof a){case "object":"im"in 8 | a&&"re"in a?(c.re=a.re,c.im=a.im):"abs"in a&&"arg"in a?!Number.isFinite(a.abs)&&Number.isFinite(a.arg)?c=d.INFINITY:(c.re=a.abs*Math.cos(a.arg),c.im=a.abs*Math.sin(a.arg)):"r"in a&&"phi"in a?!Number.isFinite(a.r)&&Number.isFinite(a.phi)?c=d.INFINITY:(c.re=a.r*Math.cos(a.phi),c.im=a.r*Math.sin(a.phi)):2===a.length?(c.re=a[0],c.im=a[1]):h();break;case "string":c.im=c.re=0;var f=a.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),l=1,e=0;null===f&&h();for(var g=0;g=a?.5*Math.sqrt(2*(c-a)):Math.abs(b)/Math.sqrt(2*(c+a));return new d(f,0>b?-a:a)},exp:function(){var a=Math.exp(this.re);return new d(a*Math.cos(this.im),a*Math.sin(this.im))},expm1:function(){var a=this.re,b=this.im;var c=Math.PI/4;b<-c||b>c?c=Math.cos(b)-1:(c=b*b,c*=-.5+c*(1/24+c*(-1/720+c*(1/40320+c*(-1/3628800+c*(1/4790014600+c*(-1/87178291200+1/20922789888E3*c))))))); 14 | return new d(Math.expm1(a)*Math.cos(b)+c,Math.exp(a)*Math.sin(b))},log:function(){var a=this.re,b=this.im;return new d(m(a,b),Math.atan2(b,a))},abs:function(){var a=this.re;var b=this.im,c=Math.abs(a),d=Math.abs(b);3E3>c&&3E3>d?a=Math.sqrt(c*c+d*d):(c=a.im){var b=a.re;a.re=-a.im;a.im=b}else b=a.im,a.im=-a.re,a.re=b;return a},atanh:function(){var a=this.re,b=this.im,c=1b?" - ":" + ":0>b&&(c+="-"),b=Math.abs(b), 23 | 1!==b&&(c+=b),c+="i");return c?c:"0"},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return(0===this.re||-0===this.re)&&(0===this.im||-0===this.im)},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}};d.ZERO=new d(0,0);d.ONE=new d(1,0);d.I=new d(0,1);d.PI=new d(Math.PI,0);d.E=new d(Math.E,0);d.INFINITY= 24 | new d(Infinity,Infinity);d.NAN=new d(NaN,NaN);d.EPSILON=1E-16;"function"===typeof define&&define.amd?define([],function(){return d}):"object"===typeof exports?(Object.defineProperty(exports,"__esModule",{value:!0}),d["default"]=d,d.Complex=d,module.exports=d):n.Complex=d})(this); 25 | -------------------------------------------------------------------------------- /crate2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/crate2_pic.png -------------------------------------------------------------------------------- /drz_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/drz_pic.png -------------------------------------------------------------------------------- /dumble_jazz2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/dumble_jazz2_pic.png -------------------------------------------------------------------------------- /dumble_jazz3_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/dumble_jazz3_pic.png -------------------------------------------------------------------------------- /dumble_rock2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/dumble_rock2_pic.png -------------------------------------------------------------------------------- /dumble_rock3_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/dumble_rock3_pic.png -------------------------------------------------------------------------------- /dygraph.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Default styles for the dygraphs charting library. 3 | */ 4 | 5 | .dygraph-legend { 6 | position: absolute; 7 | font-size: 14px; 8 | z-index: 10; 9 | width: 250px; /* labelsDivWidth */ 10 | /* 11 | dygraphs determines these based on the presence of chart labels. 12 | It might make more sense to create a wrapper div around the chart proper. 13 | top: 0px; 14 | right: 2px; 15 | */ 16 | background: white; 17 | line-height: normal; 18 | text-align: left; 19 | overflow: hidden; 20 | } 21 | 22 | /* styles for a solid line in the legend */ 23 | .dygraph-legend-line { 24 | display: inline-block; 25 | position: relative; 26 | bottom: .5ex; 27 | padding-left: 1em; 28 | height: 1px; 29 | border-bottom-width: 2px; 30 | border-bottom-style: solid; 31 | /* border-bottom-color is set based on the series color */ 32 | } 33 | 34 | /* styles for a dashed line in the legend, e.g. when strokePattern is set */ 35 | .dygraph-legend-dash { 36 | display: inline-block; 37 | position: relative; 38 | bottom: .5ex; 39 | height: 1px; 40 | border-bottom-width: 2px; 41 | border-bottom-style: solid; 42 | /* border-bottom-color is set based on the series color */ 43 | /* margin-right is set based on the stroke pattern */ 44 | /* padding-left is set based on the stroke pattern */ 45 | } 46 | 47 | .dygraph-roller { 48 | position: absolute; 49 | z-index: 10; 50 | } 51 | 52 | /* This class is shared by all annotations, including those with icons */ 53 | .dygraph-annotation { 54 | position: absolute; 55 | z-index: 10; 56 | overflow: hidden; 57 | } 58 | 59 | /* This class only applies to annotations without icons */ 60 | /* Old class name: .dygraphDefaultAnnotation */ 61 | .dygraph-default-annotation { 62 | border: 1px solid black; 63 | background-color: white; 64 | text-align: center; 65 | } 66 | 67 | .dygraph-axis-label { 68 | /* position: absolute; */ 69 | /* font-size: 14px; */ 70 | z-index: 10; 71 | line-height: normal; 72 | overflow: hidden; 73 | color: black; /* replaces old axisLabelColor option */ 74 | } 75 | 76 | .dygraph-axis-label-x { 77 | } 78 | 79 | .dygraph-axis-label-y { 80 | } 81 | 82 | .dygraph-axis-label-y2 { 83 | } 84 | 85 | .dygraph-title { 86 | font-weight: bold; 87 | z-index: 10; 88 | text-align: center; 89 | /* font-size: based on titleHeight option */ 90 | } 91 | 92 | .dygraph-xlabel { 93 | text-align: center; 94 | /* font-size: based on xLabelHeight option */ 95 | } 96 | 97 | /* For y-axis label */ 98 | .dygraph-label-rotate-left { 99 | text-align: center; 100 | /* See http://caniuse.com/#feat=transforms2d */ 101 | transform: rotate(90deg); 102 | -webkit-transform: rotate(90deg); 103 | -moz-transform: rotate(90deg); 104 | -o-transform: rotate(90deg); 105 | -ms-transform: rotate(90deg); 106 | } 107 | 108 | /* For y2-axis label */ 109 | .dygraph-label-rotate-right { 110 | text-align: center; 111 | /* See http://caniuse.com/#feat=transforms2d */ 112 | transform: rotate(-90deg); 113 | -webkit-transform: rotate(-90deg); 114 | -moz-transform: rotate(-90deg); 115 | -o-transform: rotate(-90deg); 116 | -ms-transform: rotate(-90deg); 117 | } 118 | -------------------------------------------------------------------------------- /eseries2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/eseries2_pic.png -------------------------------------------------------------------------------- /expand_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/expand_more.png -------------------------------------------------------------------------------- /fender2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/fender2_pic.png -------------------------------------------------------------------------------- /framus.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TSC in the web 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 22 | 23 | 24 | 27 | 75 | 90 | 91 | 92 | 104 | 105 |
25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
PartValue
Ω
Ω
Ω
Ω
F
F
69 |
70 | 71 | 72 | 73 |
74 |
76 |
77 |
78 | AmplitudePhase 79 |
80 | 81 | 82 | 83 |
84 |
85 |
86 | 87 |
88 |
89 |
93 |
94 | RM 95 | 100 | 101 |
102 |



103 |
106 | 107 | 255 |
256 | 257 | 258 | -------------------------------------------------------------------------------- /framus2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/framus2_pic.png -------------------------------------------------------------------------------- /hiwatt2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/hiwatt2_pic.png -------------------------------------------------------------------------------- /info.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | TSC in the web 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 17 | 18 | 19 | 61 | 62 |
20 | Hello from TSC in the web! 21 |

22 | These pages bring the legendary Tone Stack Calculator (http://www.duncanamps.com/tsc/) 23 | to be run on browsers that support JavaScript (and have it enabled). 24 | The motivation to re-create the TSC was to be able to avoid the platform dependency of the original Windows application. 25 | Currently these pages have been tested to work on Chrome and Firefox browsers in Windows and Linux laptops and 26 | in a tablet device running relatively old Android OS (version 4.x). The width of the container table in the web page is currently 27 | 1280 pixels, therefore screens that have lower width resolution will not show the pages correctly. 28 |

29 | In addition to own JavaScript code, two external JavaScript libraries have been utilized: the slider controls are from the 30 | noUiSlider library ( https://refreshless.com/nouislider/ ) and the neat graphs are from the dyGraphs library ( http://dygraphs.com/ ). 31 | DyGraphs is used under the terms of the required MIT license. The sliders are currently not licensed in any way. 32 |

33 | The logarithmic potentiometer implementations (LogA and LogB) have been copied directly from the original TSC source code, 34 | so the results obtained from these simulations are the same as from the orginal TSC (results verified by shallow visual comparison). 35 | The circuit models have been also verified numerically to give exactly the same values as SPICE simulation, so the models ought to be correct. 36 |

37 | Whereas the original TSC evaluates complex matrices for each frequency point, in this implementation 38 | the matrices have been pre-solved symbolically (using Maxima computer algebra system) to be able to calculate polynomial factors 39 | in the powers of corner frequency ω only once before the frequency analysis takes place. 40 | This approach saves several hundred milliseconds of calculation time in JavaScript and makes the analysis fast enough to be run directly on browsers. 41 |

42 | This project is a result of co-operation by users jatalahd, ~arph and TheseGoToEleven from diystompboxes.com forum. 43 |


44 | Version History
45 | The first version (let's call it version 1.0) contains simulations for Marshall, Fender, Vox, James, E-series, Bench, Hiwatt and Big Muff. 46 | A reverse-engineered tone stack from my Aria bass amplifier has been added as an extra bonus. 47 | Compared to the original TSC, the sweep feature and some other (minor) things are still missing from the web-implementation. 48 | It would need some better layout for mobile devices as well. 49 | Hopefully the undersigned (or some other volunteer) will add these (and maybe more) features later on. 50 | The development files are shared in GitHub: https://github.com/jatalahd/tsc 51 |

52 | The second version (let's call it version 2.0) adds the sweep and snapshot features, plus unified Vout/Vin Maxima models for 53 | all tone stacks. The snapshot feature unfortunately does not work between different tone stacks. 54 |

55 | Version 2.0.1 released in mid 2019 includes minor fixes to Dumble tone stacks due to error in "original" schematic regarding one capacitor connection. 56 | Also a simulation model for the classic wah circuit is added. 57 |

58 | Version 3.0 released in mid 2021 adds phase graphs for all stacks. URLs also include all part values for ease of recall and 59 | sharing. And there are 7 new simulation models for Baxandall & James tone stack variations. 60 |
63 |
64 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /james2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/james2_pic.png -------------------------------------------------------------------------------- /james_2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/james_2_pic.png -------------------------------------------------------------------------------- /james_3_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/james_3_pic.png -------------------------------------------------------------------------------- /james_4_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/james_4_pic.png -------------------------------------------------------------------------------- /marshall2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/marshall2_pic.png -------------------------------------------------------------------------------- /maxima_files/aria.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Aria tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | ZT: s*CT1/(1 + s*CT1*RT1)$ 10 | /* matrix obtained from current loops in the circuit */ 11 | matrix( 12 | [1/RIN+ZT+1/RM1+1/RB3, -ZT , 0 , -1/RM1 , 0 , -1/RB3 ], 13 | [ -ZT ,ZT+1/RT2+1/RT3+s*CT2, -1/RT3-s*CT2 , 0 , 0 , 0 ], 14 | [ 0 , -1/RT3-s*CT2 ,1/RL+s*CT2+1/RT3+1/RM3+1/RB4, -1/RM3 , -1/RB4 , 0 ], 15 | [ -1/RM1 , 0 , -1/RM3 ,1/RM1+1/RM2+1/RM3, 0 , 0 ], 16 | [ 0 , 0 , -1/RB4 , 0 ,1/RB1+1/RB2+1/RB4, -1/RB1 ], 17 | [ -1/RB3 , 0 , 0 , 0 , -1/RB1 ,1/RB1+1/RB3+s*CB1] 18 | )$ 19 | determinant(%)$ /* evaluates the determinant of the previous output % */ 20 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 21 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 22 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 23 | /* extract denominator coefficients in the powers of s to designated variables */ 24 | DEN_XRe: coeff(pld,s,4); 25 | DEN_AIm: coeff(pld,s,3); 26 | DEN_BRe: coeff(pld,s,2); 27 | DEN_CIm: coeff(pld,s,1); 28 | DEN_DRe: coeff(pld,s,0); 29 | 30 | /* matrix to solve Iout using Cramer's rule */ 31 | matrix( 32 | [1/RIN+ZT+1/RM1+1/RB3, -ZT , 1/RIN , -1/RM1 , 0 , -1/RB3 ], 33 | [ -ZT ,ZT+1/RT2+1/RT3+s*CT2, 0 , 0 , 0 , 0 ], 34 | [ 0 , -1/RT3-s*CT2 , 0 , -1/RM3 , -1/RB4 , 0 ], 35 | [ -1/RM1 , 0 , 0 ,1/RM1+1/RM2+1/RM3, 0 , 0 ], 36 | [ 0 , 0 , 0 , 0 ,1/RB1+1/RB2+1/RB4, -1/RB1 ], 37 | [ -1/RB3 , 0 , 0 , 0 , -1/RB1 ,1/RB1+1/RB3+s*CB1] 38 | )$ 39 | determinant(%)$ 40 | NUM_fs: factor(%)$ 41 | NUM_den: denom(NUM_fs)$ 42 | pln: expand(num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 43 | /* extract numerator coefficients in the powers of s to designated variables */ 44 | NUM_XRe: coeff(pln,s,4); 45 | NUM_AIm: coeff(pln,s,3); 46 | NUM_BRe: coeff(pln,s,2); 47 | NUM_CIm: coeff(pln,s,1); 48 | NUM_DRe: coeff(pln,s,0); 49 | DEN_den; 50 | NUM_den; 51 | DEN_den/NUM_den; 52 | 53 | 54 | -------------------------------------------------------------------------------- /maxima_files/bassman5f6a.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Marshall tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | /* This example also solves the coefficients for Fender Bassman 5F6-A tone control, as */ 8 | /* the Marshall circuit is the same circuit with different part values. */ 9 | /* Charles Day 27.6.2021 */ 10 | 11 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 12 | ratmx: true$ /* matrix operations are performed in CRE */ 13 | /* matrix obtained from current loops in the circuit */ 14 | matrix( 15 | [RIN+R1+RM2+1/(s*C3), -R1 , -1/(s*C3) , -RM2 ], 16 | [ -R1 ,R1+RT1+RT2+1/(s*C1)+1/(s*C2), -1/(s*C2) , -RT2 ], 17 | [ -1/(s*C3) , -1/(s*C2) ,RB+RM1+1/(s*C2)+1/(s*C3), -RB-RM1 ], 18 | [ -RM2 , -RT2 , -RB-RM1 ,RT2+RB+RM1+RM2+RL] 19 | )$ 20 | determinant(%)$ /* evaluates the determinant of the previous output % */ 21 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 22 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 23 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 24 | /* extract denominator coefficients in the powers of s to designated variables */ 25 | DEN_AIm: coeff(pld,s,3); 26 | DEN_BRe: coeff(pld,s,2); 27 | DEN_CIm: coeff(pld,s,1); 28 | DEN_DRe: coeff(pld,s,0); 29 | 30 | /* matrix to solve Iout using Cramer's rule */ 31 | matrix( 32 | [RIN+R1+RM2+1/(s*C3), -R1 , -1/(s*C3) , 1 ], 33 | [ -R1 ,R1+RT1+RT2+1/(s*C1)+1/(s*C2), -1/(s*C2) , 0 ], 34 | [ -1/(s*C3) , -1/(s*C2) ,RB+RM1+1/(s*C2)+1/(s*C3), 0 ], 35 | [ -RM2 , -RT2 , -RB-RM1 , 0 ] 36 | )$ 37 | determinant(%)$ 38 | NUM_fs: factor(%)$ 39 | NUM_den: denom(NUM_fs)$ 40 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 41 | /* extract numerator coefficients in the powers of s to designated variables */ 42 | NUM_AIm: coeff(pln,s,3); 43 | NUM_BRe: coeff(pln,s,2); 44 | NUM_CIm: coeff(pln,s,1); 45 | NUM_DRe: coeff(pln,s,0); 46 | DEN_den; 47 | NUM_den; 48 | DEN_den/NUM_den; 49 | -------------------------------------------------------------------------------- /maxima_files/baxandall_1.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* Jarmo L. 14.9.2018 */ 5 | 6 | /* This variation of a James/Baxandall two-band shelving tone stack offers: */ 7 | /* - active circuitry (opamp w/ negative feedback) */ 8 | /* - two capacitors in the bass control */ 9 | /* - one capacitor in the treble control */ 10 | /* Charles Day 9.5.2021 */ 11 | 12 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 13 | ratmx: true$ /* matrix operations are performed in CRE */ 14 | /* matrix obtained from node analysis of the circuit */ 15 | A: matrix( 16 | [1/RIN+1/RT1+1/R1, -1/R1 , 0 , 0 , -1/RT1 , 0 , 0 ], 17 | [ -1/R1 ,1/R1+1/RB1+s*CB1, -1/RB1-s*CB1 , 0 , 0 , 0 , 0 ], 18 | [ 0 , -1/RB1-s*CB1 ,1/RB1+1/RB2+1/R3+s*CB1+s*CB2, -1/RB2-s*CB2 , 0 , 0 , 0 ], 19 | [ 0 , 0 , -1/RB2-s*CB2 ,1/RB2+1/R2+s*CB2, 0 , -1/R2 , 0 ], 20 | [ -1/RT1 , 0 , 0 , 0 ,1/RT1+1/RT2+s*CT, -1/RT2 , 0 ], 21 | [ 0 , 0 , 0 , -1/R2 , -1/RT2 ,1/R2+1/RT2+1/RF,-1/RF], 22 | [ 0 , 0 , -1/R3 , 0 , -s*CT , 0 , 0 ] 23 | )$ 24 | determinant(%)$ /* evaluates the determinant of the previous output % */ 25 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 26 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 27 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 28 | /* extract denominator coefficients in the powers of s to designated variables */ 29 | DEN_ZRe: coeff(pld,s,6); 30 | DEN_YIm: coeff(pld,s,5); 31 | DEN_XRe: coeff(pld,s,4); 32 | DEN_AIm: coeff(pld,s,3); 33 | DEN_BRe: coeff(pld,s,2); 34 | DEN_CIm: coeff(pld,s,1); 35 | DEN_DRe: coeff(pld,s,0); 36 | 37 | /* Solve Vout/Vin using Cramer's rule */ 38 | minor(A,1,7)$ 39 | determinant(%)$ 40 | NUM_fs: factor(%)$ 41 | NUM_den: denom(NUM_fs)$ 42 | /* expand to common denominator for numerator and denominator in Cramer's division */ 43 | pln: expand((1/RIN)*num(NUM_fs)*DEN_den/NUM_den)$ 44 | /* extract numerator coefficients in the powers of s to designated variables */ 45 | NUM_ZRe: coeff(pln,s,6); 46 | NUM_YIm: coeff(pln,s,5); 47 | NUM_XRe: coeff(pln,s,4); 48 | NUM_AIm: coeff(pln,s,3); 49 | NUM_BRe: coeff(pln,s,2); 50 | NUM_CIm: coeff(pln,s,1); 51 | NUM_DRe: coeff(pln,s,0); 52 | DEN_den; 53 | NUM_den; 54 | DEN_den/NUM_den; 55 | -------------------------------------------------------------------------------- /maxima_files/baxandall_2.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* Jarmo L. 14.9.2018 */ 5 | 6 | /* This variation of a James/Baxandall two-band shelving tone stack offers: */ 7 | /* - active circuitry (opamp w/ negative feedback) */ 8 | /* - one capacitor in the bass control */ 9 | /* - one capacitor in the treble control */ 10 | /* Charles Day 5.5.2021 */ 11 | 12 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 13 | ratmx: true$ /* matrix operations are performed in CRE */ 14 | /* matrix obtained from node analysis of the circuit */ 15 | A: matrix( 16 | [1/RIN+1/RT1+1/R1, -1/R1 , 0 , 0 , -1/RT1 , 0 , 0 ], 17 | [ -1/R1 ,1/R1+1/RB1+s*CB, -1/RB1 , -s*CB , 0 , 0 , 0 ], 18 | [ 0 , -1/RB1 ,1/RB1+1/RB2+1/R3, -1/RB2 , 0 , 0 , 0 ], 19 | [ 0 , -s*CB , -1/RB2 ,1/RB2+1/R2+s*CB, 0 , -1/R2 , 0 ], 20 | [ -1/RT1 , 0 , 0 , 0 ,1/RT1+1/RT2+s*CT, -1/RT2 , 0 ], 21 | [ 0 , 0 , 0 , -1/R2 , -1/RT2 ,1/R2+1/RT2+1/RF,-1/RF], 22 | [ 0 , 0 , -1/R3 , 0 , -s*CT , 0 , 0 ] 23 | )$ 24 | determinant(%)$ /* evaluates the determinant of the previous output % */ 25 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 26 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 27 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 28 | /* extract denominator coefficients in the powers of s to designated variables */ 29 | DEN_ZRe: coeff(pld,s,6); 30 | DEN_YIm: coeff(pld,s,5); 31 | DEN_XRe: coeff(pld,s,4); 32 | DEN_AIm: coeff(pld,s,3); 33 | DEN_BRe: coeff(pld,s,2); 34 | DEN_CIm: coeff(pld,s,1); 35 | DEN_DRe: coeff(pld,s,0); 36 | 37 | /* Solve Vout/Vin using Cramer's rule */ 38 | minor(A,1,7)$ 39 | determinant(%)$ 40 | NUM_fs: factor(%)$ 41 | NUM_den: denom(NUM_fs)$ 42 | /* expand to common denominator for numerator and denominator in Cramer's division */ 43 | pln: expand((1/RIN)*num(NUM_fs)*DEN_den/NUM_den)$ 44 | /* extract numerator coefficients in the powers of s to designated variables */ 45 | NUM_ZRe: coeff(pln,s,6); 46 | NUM_YIm: coeff(pln,s,5); 47 | NUM_XRe: coeff(pln,s,4); 48 | NUM_AIm: coeff(pln,s,3); 49 | NUM_BRe: coeff(pln,s,2); 50 | NUM_CIm: coeff(pln,s,1); 51 | NUM_DRe: coeff(pln,s,0); 52 | DEN_den; 53 | NUM_den; 54 | DEN_den/NUM_den; 55 | -------------------------------------------------------------------------------- /maxima_files/baxandall_passive.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* Jarmo L. 14.9.2018 */ 5 | 6 | /* This variation of a James/Baxandall two-band shelving tone stack offers: */ 7 | /* - passive circuitry */ 8 | /* - two capacitors in the bass control */ 9 | /* - one capacitor in the treble control */ 10 | /* Charles Day 26.4.2021 */ 11 | 12 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 13 | ratmx: true$ /* matrix operations are performed in CRE */ 14 | /* matrix obtained from current loops in the circuit */ 15 | A: matrix( 16 | [RIN+R1+RB1+RB2+R2, -R1 , -RB1 , -RB2 , -R2 , 0 ], 17 | [ -R1 ,R1+R3+RT1+1/(s*C1)+1/(s*C3), -1/(s*C1) , 0 , -R3 , -1/(s*C3) ], 18 | [ -RB1 , -1/(s*C1) ,RB1+1/(s*C1), 0 , 0 , 0 ], 19 | [ -RB2 , 0 , 0 ,RB2+1/(s*C2), -1/(s*C2) , 0 ], 20 | [ -R2 , -R3 , 0 , -1/(s*C2) ,R2+R3+RL+1/(s*C2), -RL ], 21 | [ 0 , -1/(s*C3) , 0 , 0 , -RL , RT2+RL+1/(s*C3)] 22 | )$ 23 | determinant(%)$ /* evaluates the determinant of the previous output % */ 24 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 25 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 26 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 27 | /* extract denominator coefficients in the powers of s to designated variables */ 28 | DEN_XRe: coeff(pld,s,4); 29 | DEN_AIm: coeff(pld,s,3); 30 | DEN_BRe: coeff(pld,s,2); 31 | DEN_CIm: coeff(pld,s,1); 32 | DEN_DRe: coeff(pld,s,0); 33 | 34 | /* matrices to solve Vout/Vin using Cramer's rule */ 35 | M1_5: determinant(minor(A,1,5))$ 36 | M1_6: determinant(minor(A,1,6))$ 37 | M1_5+M1_6$ 38 | NUM_fs: factor(%)$ 39 | NUM_den: denom(NUM_fs)$ 40 | /* expand to common denominator for numerator and denominator in Cramer's division */ 41 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ 42 | /* extract numerator coefficients in the powers of s to designated variables */ 43 | NUM_XRe: coeff(pln,s,4); 44 | NUM_AIm: coeff(pln,s,3); 45 | NUM_BRe: coeff(pln,s,2); 46 | NUM_CIm: coeff(pln,s,1); 47 | NUM_DRe: coeff(pln,s,0); 48 | DEN_den; 49 | NUM_den; 50 | DEN_den/NUM_den; 51 | -------------------------------------------------------------------------------- /maxima_files/baxandall_passive_2.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* Jarmo L. 14.9.2018 */ 5 | 6 | /* This variation of a James/Baxandall two-band shelving tone stack offers: */ 7 | /* - passive circuitry */ 8 | /* - one capacitor in the bass control */ 9 | /* - one capacitor in the treble control */ 10 | /* Charles Day 10.5.2021 */ 11 | 12 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 13 | ratmx: true$ /* matrix operations are performed in CRE */ 14 | /* matrix obtained from node analysis of the circuit */ 15 | matrix( 16 | [1/RIN+1/RT1+1/R1, -1/R1 , 0 , 0 , -1/RT1 , 0 ], 17 | [ -1/R1 ,1/R1+1/RB1+s*CB, -1/RB1 , -s*CB , 0 , 0 ], 18 | [ 0 , -1/RB1 ,1/RB1+1/RB2+1/R3, -1/RB2 , 0 , -1/R3 ], 19 | [ 0 , -s*CB , -1/RB2 ,1/RB2+1/R2+s*CB, 0 , 0 ], 20 | [ -1/RT1 , 0 , 0 , 0 ,1/RT1+1/RT2+s*CT, -s*CT ], 21 | [ 0 , 0 , -1/R3 , 0 , -s*CT ,1/R3+1/RL+s*CT] 22 | )$ 23 | determinant(%)$ /* evaluates the determinant of the previous output % */ 24 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 25 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 26 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 27 | /* extract denominator coefficients in the powers of s to designated variables */ 28 | DEN_XRe: coeff(pld,s,4); 29 | DEN_AIm: coeff(pld,s,3); 30 | DEN_BRe: coeff(pld,s,2); 31 | DEN_CIm: coeff(pld,s,1); 32 | DEN_DRe: coeff(pld,s,0); 33 | 34 | /* matrix to solve Vout/Vin using Cramer's rule */ 35 | matrix( 36 | [ -1/R1 ,1/R1+1/RB1+s*CB, -1/RB1 , -s*CB , 0 ], 37 | [ 0 , -1/RB1 ,1/RB1+1/RB2+1/R3, -1/RB2 , 0 ], 38 | [ 0 , -s*CB , -1/RB2 ,1/RB2+1/R2+s*CB, 0 ], 39 | [ -1/RT1 , 0 , 0 , 0 ,1/RT1+1/RT2+s*CT], 40 | [ 0 , 0 , -1/R3 , 0 , -s*CT ] 41 | )$ 42 | M1_6: determinant(%)$ 43 | NUM_fs: factor(%)$ 44 | NUM_den: denom(NUM_fs)$ 45 | /* expand to common denominator for numerator and denominator in Cramer's division */ 46 | pln: expand((-1/RIN)*num(NUM_fs)*DEN_den/NUM_den)$ 47 | /* extract numerator coefficients in the powers of s to designated variables */ 48 | NUM_XRe: coeff(pln,s,4); 49 | NUM_AIm: coeff(pln,s,3); 50 | NUM_BRe: coeff(pln,s,2); 51 | NUM_CIm: coeff(pln,s,1); 52 | NUM_DRe: coeff(pln,s,0); 53 | DEN_den; 54 | NUM_den; 55 | DEN_den/NUM_den; 56 | -------------------------------------------------------------------------------- /maxima_files/bench.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Bench tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [1/RIN+1/RM1+1/RB1+1/RT1+1/R4, -1/RM1 , 0 , -1/R4 , -1/RB1 , -1/RT1 ], 12 | [ -1/RM1 ,1/RM1+1/RM2+s*C1, -s*C1 , 0 , 0 , 0 ], 13 | [ 0 , -s*C1 ,1/(s*L1)+s*C1, -1/(s*L1) , 0 , 0 ], 14 | [ -1/R4 , 0 , -1/(s*L1) ,s*C2+1/R4+1/R5+1/(s*L1)+1/(s*L2), -1/(s*L2) , -s*C2 ], 15 | [ -1/RB1 , 0 , 0 , -1/(s*L2) ,1/(s*L2)+1/RB1+1/RB2, 0 ], 16 | [ -1/RT1 , 0 , 0 , -s*C2 , 0 ,1/RT1+1/RT2+s*C2] 17 | )$ 18 | determinant(%)$ /* evaluates the determinant of the previous output % */ 19 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 20 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 21 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 22 | /* extract denominator coefficients in the powers of s to designated variables */ 23 | DEN_XRe: coeff(pld,s,4); 24 | DEN_AIm: coeff(pld,s,3); 25 | DEN_BRe: coeff(pld,s,2); 26 | DEN_CIm: coeff(pld,s,1); 27 | DEN_DRe: coeff(pld,s,0); 28 | 29 | /* matrix to solve Vout using Cramer's rule */ 30 | matrix( 31 | [1/RIN+1/RM1+1/RB1+1/RT1+1/R4, -1/RM1 , 0 , 1/RIN , -1/RB1 , -1/RT1 ], 32 | [ -1/RM1 ,1/RM1+1/RM2+s*C1, -s*C1 , 0 , 0 , 0 ], 33 | [ 0 , -s*C1 ,1/(s*L1)+s*C1, 0 , 0 , 0 ], 34 | [ -1/R4 , 0 , -1/(s*L1) , 0 , -1/(s*L2) , -s*C2 ], 35 | [ -1/RB1 , 0 , 0 , 0 ,1/(s*L2)+1/RB1+1/RB2, 0 ], 36 | [ -1/RT1 , 0 , 0 , 0 , 0 ,1/RT1+1/RT2+s*C2] 37 | )$ 38 | determinant(%)$ 39 | NUM_fs: factor(%)$ 40 | NUM_den: denom(NUM_fs)$ 41 | pln: expand(num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 42 | /* extract numerator coefficients in the powers of s to designated variables */ 43 | NUM_XRe: coeff(pln,s,4); 44 | NUM_AIm: coeff(pln,s,3); 45 | NUM_BRe: coeff(pln,s,2); 46 | NUM_CIm: coeff(pln,s,1); 47 | NUM_DRe: coeff(pln,s,0); 48 | DEN_den; 49 | NUM_den; 50 | DEN_den/NUM_den; 51 | 52 | 53 | -------------------------------------------------------------------------------- /maxima_files/bigmuff.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Big Muff tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+1/(s*C2), -R1 , -1/(s*C2) , 0 ], 12 | [ -R1 ,R1+RM1+RM2+1/(s*C1), -RM2 , -RM1 ], 13 | [ -1/(s*C2) , -RM2 ,RM2+RL+1/(s*C2), -RL ], 14 | [ 0 , -RM1 , -RL ,R2+RL+RM1] 15 | )$ 16 | determinant(%)$ /* evaluates the determinant of the previous output % */ 17 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 18 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 19 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 20 | /* extract denominator coefficients in the powers of s to designated variables */ 21 | DEN_AIm: coeff(pld,s,3); 22 | DEN_BRe: coeff(pld,s,2); 23 | DEN_CIm: coeff(pld,s,1); 24 | DEN_DRe: coeff(pld,s,0); 25 | 26 | /* matrix to solve Iout using Cramer's rule */ 27 | matrix( 28 | [RIN+R1+1/(s*C2), -R1 , 1 , 0 ], 29 | [ -R1 ,R1+RM1+RM2+1/(s*C1), 0 , -RM1 ], 30 | [ -1/(s*C2) , -RM2 , 0 , -RL ], 31 | [ 0 , -RM1 , 0 ,R2+RL+RM1] 32 | )$ 33 | III: determinant(%)$ 34 | matrix( 35 | [RIN+R1+1/(s*C2), -R1 , -1/(s*C2) , 1 ], 36 | [ -R1 ,R1+RM1+RM2+1/(s*C1), -RM2 , 0 ], 37 | [ -1/(s*C2) , -RM2 ,RM2+RL+1/(s*C2), 0 ], 38 | [ 0 , -RM1 , -RL , 0 ] 39 | )$ 40 | IIII: determinant(%)$ 41 | III-IIII$ 42 | NUM_fs: factor(%)$ 43 | NUM_den: denom(NUM_fs)$ 44 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 45 | /* extract numerator coefficients in the powers of s to designated variables */ 46 | NUM_AIm: coeff(pln,s,3); 47 | NUM_BRe: coeff(pln,s,2); 48 | NUM_CIm: coeff(pln,s,1); 49 | NUM_DRe: coeff(pln,s,0); 50 | DEN_den; 51 | NUM_den; 52 | DEN_den/NUM_den; 53 | 54 | 55 | -------------------------------------------------------------------------------- /maxima_files/blackstar.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Brownface tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 17.7.2020 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | writefile("den_blackst.txt"); 10 | /* matrix obtained from current loops in the circuit */ 11 | matrix( 12 | [RIN+1/(s*CIN) , -RIN , 0 , 0 , 0 , 0 , 0 , 0], 13 | [-RIN , RIN+RI11+RI12+R1+1/(s*C1) , -RI11 , -RI12-R1 , 0 , -1/(s*C1) , 0 , 0], 14 | [0 , -RI11 , RI11+1/(s*C2) , 0 , -1/(s*C2) , 0 , 0 , 0], 15 | [0 , -RI12-R1 , 0 , R1+R2+RM+RI12 , -R2 , -RM , 0 , 0], 16 | [0 , 0 , -1/(s*C2) , -R2 , R2+R3+RI21+1/(s*C2)+1/(s*C3)+1/(s*C4), -1/(s*C4) , -R3-RI21 , 0], 17 | [0 , -1/(s*C1) , 0 , -RM , -1/(s*C4) , RM+R4+RB+1/(s*C1)+1/(s*C4), 0 , -R4-RB ], 18 | [0 , 0 , 0 , 0 , -R3-RI21 , 0 , R3+RI21+RT1+RT2, -RT2], 19 | [0 , 0 , 0 , 0 , 0 , -R4-RB , -RT2 , R4+RT2+RL+RB+1/(s*C5)] 20 | )$ 21 | determinant(%)$ /* evaluates the determinant of the previous output % */ 22 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 23 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 24 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 25 | /* extract denominator coefficients in the powers of s to designated variables */ 26 | DEN_PIm: coeff(pld,s,7); 27 | DEN_ZRe: coeff(pld,s,6); 28 | DEN_YIm: coeff(pld,s,5); 29 | DEN_XRe: coeff(pld,s,4); 30 | DEN_AIm: coeff(pld,s,3); 31 | DEN_BRe: coeff(pld,s,2); 32 | DEN_CIm: coeff(pld,s,1); 33 | DEN_DRe: coeff(pld,s,0); 34 | closefile(); 35 | 36 | /* matrix to solve Iout using Cramer's rule */ 37 | writefile("num_blackst.txt"); 38 | matrix( 39 | [RIN+1/(s*CIN) , -RIN , 0 , 0 , 0 , 0 , 0 , 1], 40 | [-RIN , RIN+RI11+RI12+R1+1/(s*C1) , -RI11 , -RI12-R1 , 0 , -1/(s*C1) , 0 , 0], 41 | [0 , -RI11 , RI11+1/(s*C2) , 0 , -1/(s*C2) , 0 , 0 , 0], 42 | [0 , -RI12-R1 , 0 , R1+R2+RM+RI12 , -R2 , -RM , 0 , 0], 43 | [0 , 0 , -1/(s*C2) , -R2 , R2+R3+RI21+1/(s*C2)+1/(s*C3)+1/(s*C4), -1/(s*C4) , -R3-RI21 , 0], 44 | [0 , -1/(s*C1) , 0 , -RM , -1/(s*C4) , RM+R4+RB+1/(s*C1)+1/(s*C4), 0 , 0], 45 | [0 , 0 , 0 , 0 , -R3-RI21 , 0 , R3+RI21+RT1+RT2, 0], 46 | [0 , 0 , 0 , 0 , 0 , -R4-RB , -RT2 , 0] 47 | )$ 48 | determinant(%)$ /* evaluates the determinant of the previous output % */ 49 | NUM_fs: factor(%)$ 50 | NUM_den: denom(NUM_fs)$ 51 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 52 | /* extract numerator coefficients in the powers of s to designated variables */ 53 | NUM_Pim: coeff(pln,s,7); 54 | NUM_ZRe: coeff(pln,s,6); 55 | NUM_YIm: coeff(pln,s,5); 56 | NUM_XRe: coeff(pln,s,4); 57 | NUM_AIm: coeff(pln,s,3); 58 | NUM_BRe: coeff(pln,s,2); 59 | NUM_CIm: coeff(pln,s,1); 60 | NUM_DRe: coeff(pln,s,0); 61 | DEN_den; 62 | NUM_den; 63 | DEN_den/NUM_den; 64 | closefile(); 65 | -------------------------------------------------------------------------------- /maxima_files/boneray.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Bone Ray tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 17.7.2020 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix([RIN+R1+1/(s*C1), -1/(s*C1) , 0 , 0 , -R1 , 0], 11 | [-1/(s*C1) , R2+RT1+RT2+1/(s*C1), -RT2 , 0 , -RT1 , 0], 12 | [0 , -RT2 , RT2+RM1+1/(s*C4), 0 , 0 , -RM1-1/(s*C4)], 13 | [0 , 0 , 0 , RM2+1/(s*C2), 0 , -RM2], 14 | [-R1 , -RT1 , 0 , 0 , R1+RT1+RL, -RL], 15 | [0 , 0 ,-RM1-1/(s*C4) , -RM2 , -RL , RL+RM1+RM2+1/(s*C3)+1/(s*C4) ])$ 16 | determinant(%)$ /* evaluates the determinant of the previous output % */ 17 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 18 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 19 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 20 | /* extract denominator coefficients in the powers of s to designated variables */ 21 | DEN_XRe: coeff(pld,s,4); 22 | DEN_AIm: coeff(pld,s,3); 23 | DEN_BRe: coeff(pld,s,2); 24 | DEN_CIm: coeff(pld,s,1); 25 | DEN_DRe: coeff(pld,s,0); 26 | 27 | /* matrix to solve Iout using Cramer's rule */ 28 | matrix([RIN+R1+1/(s*C1), -1/(s*C1) , 0 , 0 , 1 , 0], 29 | [-1/(s*C1) , R2+RT1+RT2+1/(s*C1) , -RT2 , 0 , 0 , 0], 30 | [0 , -RT2 , RT2+RM1+1/(s*C4), 0 , 0 , -RM1-1/(s*C4)], 31 | [0 , 0 , 0 , RM2+1/(s*C2), 0 , -RM2], 32 | [-R1 , -RT1 , 0 , 0 , 0 , -RL], 33 | [0 , 0 ,-RM1-1/(s*C4) , -RM2 , 0 , RL+RM1+RM2+1/(s*C3)+1/(s*C4) ])$ 34 | IIIII: determinant(%)$ 35 | matrix([RIN+R1+1/(s*C1), -1/(s*C1) , 0 , 0 , -R1 , 1], 36 | [-1/(s*C1) , R2+RT1+RT2+1/(s*C1) , -RT2 , 0 , -RT1 , 0], 37 | [0 , -RT2 , RT2+RM1+1/(s*C4), 0 , 0 , 0], 38 | [0 , 0 , 0 , RM2+1/(s*C2), 0 , 0], 39 | [-R1 , -RT1 , 0 , 0 , R1+RT1+RL, 0], 40 | [0 , 0 ,-RM1-1/(s*C4) , -RM2 , -RL , 0]) 41 | $IIIIII: determinant(%)$ 42 | IIIII-IIIIII$ 43 | NUM_fs: factor(%)$ 44 | NUM_den: denom(NUM_fs)$ 45 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 46 | /* extract numerator coefficients in the powers of s to designated variables */ 47 | NUM_XRe: coeff(pln,s,4); 48 | NUM_AIm: coeff(pln,s,3); 49 | NUM_BRe: coeff(pln,s,2); 50 | NUM_CIm: coeff(pln,s,1); 51 | NUM_DRe: coeff(pln,s,0); 52 | DEN_den; 53 | NUM_den; 54 | DEN_den/NUM_den; 55 | -------------------------------------------------------------------------------- /maxima_files/brownface.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Brownface tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 17.7.2020 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | writefile("den_brown.txt"); 10 | /* matrix obtained from current loops in the circuit */ 11 | matrix([RIN+R1+R2+1/(s*C3), -RIN , -R1 , -1/(s*C3) , -R2 , 0], 12 | [-RIN , RIN+1/(s*CIN) , 0 , 0 , 0 , 0], 13 | [-R1 , 0 , R1+RT11+RT12+1/(s*C1)+1/(s*C2), -1/(s*C2) , 0 , -RT12], 14 | [-1/(s*C3) , 0 , -1/(s*C2) , RB+1/(s*C2)+1/(s*C3), -RB , 0], 15 | [-R2 , 0 , 0 , -RB , RB+R2+RT21+RT22+1/(s*C4), -RT21-RT22-1/(s*C4)], 16 | [0 , 0 ,-RT12 , 0 , -RT21-RT22-1/(s*C4) , RL+RT12+RT21+RT22+1/(s*C4) ])$ 17 | determinant(%)$ /* evaluates the determinant of the previous output % */ 18 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 19 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 20 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 21 | /* extract denominator coefficients in the powers of s to designated variables */ 22 | DEN_YIm: coeff(pld,s,5); 23 | DEN_XRe: coeff(pld,s,4); 24 | DEN_AIm: coeff(pld,s,3); 25 | DEN_BRe: coeff(pld,s,2); 26 | DEN_CIm: coeff(pld,s,1); 27 | DEN_DRe: coeff(pld,s,0); 28 | closefile(); 29 | 30 | /* matrix to solve Iout using Cramer's rule */ 31 | writefile("num_brown.txt"); 32 | matrix([RIN+R1+R2+1/(s*C3), -RIN , -R1 , -1/(s*C3) , -R2 , 1], 33 | [-RIN , RIN+1/(s*CIN) , 0 , 0 , 0 , 0], 34 | [-R1 , 0 , R1+RT11+RT12+1/(s*C1)+1/(s*C2), -1/(s*C2) , 0 , 0], 35 | [-1/(s*C3) , 0 , -1/(s*C2) , RB+1/(s*C2)+1/(s*C3), -RB , 0], 36 | [-R2 , 0 , 0 , -RB , RB+R2+RT21+RT22+1/(s*C4), 0], 37 | [0 , 0 ,-RT12 , 0 , -RT21-RT22-1/(s*C4) , 0])$ 38 | determinant(%)$ /* evaluates the determinant of the previous output % */ 39 | NUM_fs: factor(%)$ 40 | NUM_den: denom(NUM_fs)$ 41 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 42 | /* extract numerator coefficients in the powers of s to designated variables */ 43 | NUM_YIm: coeff(pln,s,5); 44 | NUM_XRe: coeff(pln,s,4); 45 | NUM_AIm: coeff(pln,s,3); 46 | NUM_BRe: coeff(pln,s,2); 47 | NUM_CIm: coeff(pln,s,1); 48 | NUM_DRe: coeff(pln,s,0); 49 | DEN_den; 50 | NUM_den; 51 | DEN_den/NUM_den; 52 | closefile(); 53 | -------------------------------------------------------------------------------- /maxima_files/brownface2.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Brownface tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 17.7.2020 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | writefile("den_brown2.txt"); 10 | /* matrix obtained from current loops in the circuit */ 11 | matrix([RIN+R1+R2+1/(s*C3), -RIN , -R1 , -1/(s*C3) , -R2 , 0], 12 | [-RIN , RIN+1/(s*CIN) , 0 , 0 , 0 , 0], 13 | [-R1 , 0 , R1+RT11+RT12+1/(s*C1)+1/(s*C2), -1/(s*C2) , 0 , 0], 14 | [-1/(s*C3) , 0 , -1/(s*C2) , RB+1/(s*C2)+1/(s*C3), -RB , 0], 15 | [-R2 , 0 , 0 , -RB , RB+R2+RT21+RT22+1/(s*C4), -RT22-1/(s*C4)], 16 | [0 , 0 ,0 , 0 , -RT22-1/(s*C4) , RL+RT22+1/(s*C4) ])$ 17 | determinant(%)$ /* evaluates the determinant of the previous output % */ 18 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 19 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 20 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 21 | /* extract denominator coefficients in the powers of s to designated variables */ 22 | DEN_YIm: coeff(pld,s,5); 23 | DEN_XRe: coeff(pld,s,4); 24 | DEN_AIm: coeff(pld,s,3); 25 | DEN_BRe: coeff(pld,s,2); 26 | DEN_CIm: coeff(pld,s,1); 27 | DEN_DRe: coeff(pld,s,0); 28 | closefile(); 29 | 30 | /* matrix to solve Iout using Cramer's rule */ 31 | writefile("num_brown2.txt"); 32 | matrix([RIN+R1+R2+1/(s*C3), -RIN , -R1 , -1/(s*C3) , -R2 , 1], 33 | [-RIN , RIN+1/(s*CIN) , 0 , 0 , 0 , 0], 34 | [-R1 , 0 , R1+RT11+RT12+1/(s*C1)+1/(s*C2), -1/(s*C2) , 0 , 0], 35 | [-1/(s*C3) , 0 , -1/(s*C2) , RB+1/(s*C2)+1/(s*C3), -RB , 0], 36 | [-R2 , 0 , 0 , -RB , RB+R2+RT21+RT22+1/(s*C4), 0], 37 | [0 , 0 , 0 , 0 , -RT22-1/(s*C4) , 0])$ 38 | determinant(%)$ /* evaluates the determinant of the previous output % */ 39 | NUM_fs: factor(%)$ 40 | NUM_den: denom(NUM_fs)$ 41 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 42 | /* extract numerator coefficients in the powers of s to designated variables */ 43 | NUM_YIm: coeff(pln,s,5); 44 | NUM_XRe: coeff(pln,s,4); 45 | NUM_AIm: coeff(pln,s,3); 46 | NUM_BRe: coeff(pln,s,2); 47 | NUM_CIm: coeff(pln,s,1); 48 | NUM_DRe: coeff(pln,s,0); 49 | DEN_den; 50 | NUM_den; 51 | DEN_den/NUM_den; 52 | closefile(); 53 | -------------------------------------------------------------------------------- /maxima_files/crate.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Crate tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+RM+1/(s*C3), -R1 , -1/(s*C3) , -RM , 0 ], 12 | [ -R1 ,R1+RT1+RT2+1/(s*C1)+1/(s*C2), -1/(s*C2) , 0 , -RT2 ], 13 | [ -1/(s*C3) , -1/(s*C2) ,RB+1/(s*C2)+1/(s*C3)+1/(s*C4), -1/(s*C4) , -RB ], 14 | [ -RM , 0 , -1/(s*C4) ,RM+1/(s*C4), 0 ], 15 | [ 0 , -RT2 , -RB , 0 ,RB+RT2+RL] 16 | )$ 17 | determinant(%)$ /* evaluates the determinant of the previous output % */ 18 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 19 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 20 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 21 | /* extract denominator coefficients in the powers of s to designated variables */ 22 | DEN_XRe: coeff(pld,s,4); 23 | DEN_AIm: coeff(pld,s,3); 24 | DEN_BRe: coeff(pld,s,2); 25 | DEN_CIm: coeff(pld,s,1); 26 | DEN_DRe: coeff(pld,s,0); 27 | 28 | /* matrix to solve Iout using Cramer's rule */ 29 | matrix( 30 | [RIN+R1+RM+1/(s*C3), -R1 , -1/(s*C3) , -RM , 1 ], 31 | [ -R1 ,R1+RT1+RT2+1/(s*C1)+1/(s*C2), -1/(s*C2) , 0 , 0 ], 32 | [ -1/(s*C3) , -1/(s*C2) ,RB+1/(s*C2)+1/(s*C3)+1/(s*C4), -1/(s*C4) , 0 ], 33 | [ -RM , 0 , -1/(s*C4) ,RM+1/(s*C4), 0 ], 34 | [ 0 , -RT2 , -RB , 0 , 0 ] 35 | )$ 36 | determinant(%)$ 37 | NUM_fs: factor(%)$ 38 | NUM_den: denom(NUM_fs)$ 39 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 40 | /* extract numerator coefficients in the powers of s to designated variables */ 41 | NUM_XRe: coeff(pln,s,4); 42 | NUM_AIm: coeff(pln,s,3); 43 | NUM_BRe: coeff(pln,s,2); 44 | NUM_CIm: coeff(pln,s,1); 45 | NUM_DRe: coeff(pln,s,0); 46 | DEN_den; 47 | NUM_den; 48 | DEN_den/NUM_den; 49 | 50 | 51 | -------------------------------------------------------------------------------- /maxima_files/deluxe_5e3.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for f52a tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 10.4.2020 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RINN+RVN2+1/(s*C1) , -RVN2 , 0 , 0 , 0 , 0], 12 | [ -RVN2 , RVN2+RVN1+RT2+1/(s*C2), -RT2-1/(s*C2) , 0 , 0 , 0], 13 | [ 0 , -RT2-1/(s*C2) , RT2+1/(s*C2)+RL , -RL , 0 , 0], 14 | [ 0 , 0 , -RL , RT1+1/(s*C3)+RL+RVB2,-RT1-1/(s*C3) , -RVB2], 15 | [ 0 , 0 , 0 , -RT1-1/(s*C3) , RT1+1/(s*C3)+RVB1, 0 ], 16 | [ 0 , 0 , 0 , -RVB2 , 0 , RVB2+RINB+ 1/(s*C4) ] 17 | )$ 18 | determinant(%)$ /* evaluates the determinant of the previous output % */ 19 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 20 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 21 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 22 | /* extract denominator coefficients in the powers of s to designated variables */ 23 | DEN_YIm: coeff(pld,s,5); 24 | DEN_XRe: coeff(pld,s,4); 25 | DEN_AIm: coeff(pld,s,3); 26 | DEN_BRe: coeff(pld,s,2); 27 | DEN_CIm: coeff(pld,s,1); 28 | DEN_DRe: coeff(pld,s,0); 29 | 30 | /* matrix to solve Iout using Cramer's rule */ 31 | matrix( 32 | [RINN+RVN2+1/(s*C1) , -RVN2 , 1 , 0 , 0 , 0], 33 | [ -RVN2 , RVN2+RVN1+RT2+1/(s*C2), 0 , 0 , 0 , 0], 34 | [ 0 , -RT2-1/(s*C2) , 0 , -RL , 0 , 0], 35 | [ 0 , 0 , 0 , RT1+1/(s*C3)+RL+RVB2,-RT1-1/(s*C3) , -RVB2], 36 | [ 0 , 0 , 0 , -RT1-1/(s*C3) , RT1+1/(s*C3)+RVB1, 0 ], 37 | [ 0 , 0 , 0 , -RVB2 , 0 , RVB2+RINB+ 1/(s*C4) ] 38 | )$ 39 | III: determinant(%)$ 40 | matrix( 41 | [RINN+RVN2+1/(s*C1) , -RVN2 , 0 , 1 , 0 , 0], 42 | [ -RVN2 , RVN2+RVN1+RT2+1/(s*C2), -RT2-1/(s*C2) , 0 , 0 , 0], 43 | [ 0 , -RT2-1/(s*C2) , RT2+1/(s*C2)+RL , 0 , 0 , 0], 44 | [ 0 , 0 , -RL , 0 ,-RT1-1/(s*C3) , -RVB2], 45 | [ 0 , 0 , 0 , 0 , RT1+1/(s*C3)+RVB1, 0 ], 46 | [ 0 , 0 , 0 , 0 , 0 , RVB2+RINB+ 1/(s*C4) ] 47 | )$ 48 | IIII: determinant(%)$ 49 | III-IIII$ 50 | NUM_fs: factor(%)$ 51 | NUM_den: denom(NUM_fs)$ 52 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 53 | /* extract numerator coefficients in the powers of s to designated variables */ 54 | NUM_YIm: coeff(pln,s,5); 55 | NUM_XRe: coeff(pln,s,4); 56 | NUM_AIm: coeff(pln,s,3); 57 | NUM_BRe: coeff(pln,s,2); 58 | NUM_CIm: coeff(pln,s,1); 59 | NUM_DRe: coeff(pln,s,0); 60 | DEN_den; 61 | NUM_den; 62 | DEN_den/NUM_den; 63 | -------------------------------------------------------------------------------- /maxima_files/drz.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Dr. Z tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 26.5.2022 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+1/(s*C1)+1/(s*C3), -R1 , 0 , -1/(s*C3) , 0 ], 12 | [ -R1 , R1+R2+1/(s*C2) , -R2 , 0 , 0 ], 13 | [ 0 , -R2 , R2+RT1 , 0 , -RT1 ], 14 | [ -1/(s*C3) , 0 , 0 , RT2+1/(s*C3) , -RT2 ], 15 | [ 0 , 0 , -RT1 , -RT2 , RT1+RT2+RL] 16 | )$ 17 | determinant(%)$ /* evaluates the determinant of the previous output % */ 18 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 19 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 20 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 21 | /* extract denominator coefficients in the powers of s to designated variables */ 22 | DEN_AIm: coeff(pld,s,3); 23 | DEN_BRe: coeff(pld,s,2); 24 | DEN_CIm: coeff(pld,s,1); 25 | DEN_DRe: coeff(pld,s,0); 26 | 27 | /* matrix to solve Iout using Cramer's rule */ 28 | matrix( 29 | [RIN+R1+1/(s*C1)+1/(s*C3), -R1 , 0 , -1/(s*C3) , 1 ], 30 | [ -R1 , R1+R2+1/(s*C2) , -R2 , 0 , 0 ], 31 | [ 0 , -R2 , R2+RT1 , 0 , 0 ], 32 | [ -1/(s*C3) , 0 , 0 , RT2+1/(s*C3) , 0 ], 33 | [ 0 , 0 , -RT1 , -RT2 , 0 ] 34 | )$ 35 | determinant(%)$ 36 | NUM_fs: factor(%)$ 37 | NUM_den: denom(NUM_fs)$ 38 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 39 | /* extract numerator coefficients in the powers of s to designated variables */ 40 | NUM_AIm: coeff(pln,s,3); 41 | NUM_BRe: coeff(pln,s,2); 42 | NUM_CIm: coeff(pln,s,1); 43 | NUM_DRe: coeff(pln,s,0); 44 | DEN_den; 45 | NUM_den; 46 | DEN_den/NUM_den; 47 | -------------------------------------------------------------------------------- /maxima_files/dumble_jazz.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Dumble tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix([RIN+R1+RM+1/(s*C2),-R1,-RM-1/(s*C2),0,0],[-R1,R1+RT1+R3+RB1+1/(s*C1)+1/(s*C3),-RB1-1/(s*C1),-R3,0],[-RM-1/(s*C2),-RB1-1/(s*C1),RB1+RB2+R2+RM+1/(s*C1)+1/(s*C2),-RB2-R2,0],[0,-R3,-RB2-R2,RB2+R3+R2+RL,-RL],[0,0,0,-RL,RL+RT2+1/(s*C4)])$ 11 | determinant(%)$ /* evaluates the determinant of the previous output % */ 12 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 13 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 14 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 15 | /* extract denominator coefficients in the powers of s to designated variables */ 16 | DEN_XRe: coeff(pld,s,4); 17 | DEN_AIm: coeff(pld,s,3); 18 | DEN_BRe: coeff(pld,s,2); 19 | DEN_CIm: coeff(pld,s,1); 20 | DEN_DRe: coeff(pld,s,0); 21 | 22 | /* matrix to solve Iout using Cramer's rule */ 23 | matrix([RIN+R1+RM+1/(s*C2),-R1,-RM-1/(s*C2),1,0],[-R1,R1+RT1+R3+RB1+1/(s*C1)+1/(s*C3),-RB1-1/(s*C1),0,0],[-RM-1/(s*C2),-RB1-1/(s*C1),RB1+RB2+R2+RM+1/(s*C1)+1/(s*C2),0,0],[0,-R3,-RB2-R2,0,-RL],[0,0,0,0,RL+RT2+1/(s*C4)])$ 24 | IIII: determinant(%)$ 25 | matrix([RIN+R1+RM+1/(s*C2),-R1,-RM-1/(s*C2),0,1],[-R1,R1+RT1+R3+RB1+1/(s*C1)+1/(s*C3),-RB1-1/(s*C1),-R3,0],[-RM-1/(s*C2),-RB1-1/(s*C1),RB1+RB2+R2+RM+1/(s*C1)+1/(s*C2),-RB2-R2,0],[0,-R3,-RB2-R2,RB2+R3+R2+RL,0],[0,0,0,-RL,0])$ 26 | IIIII: determinant(%)$ 27 | IIII-IIIII$ 28 | NUM_fs: factor(%)$ 29 | NUM_den: denom(NUM_fs)$ 30 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 31 | /* extract numerator coefficients in the powers of s to designated variables */ 32 | NUM_XRe: coeff(pln,s,4); 33 | NUM_AIm: coeff(pln,s,3); 34 | NUM_BRe: coeff(pln,s,2); 35 | NUM_CIm: coeff(pln,s,1); 36 | NUM_DRe: coeff(pln,s,0); 37 | DEN_den; 38 | NUM_den; 39 | DEN_den/NUM_den; 40 | -------------------------------------------------------------------------------- /maxima_files/dumble_jazz2.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Dumble tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | writefile("den_jazz.txt"); 11 | /*matrix( 12 | [RIN+R1+1/(s*C3)+RM, -R1 , -RM-1/(s*C3) , 0 , 0 , 0 , 0 , 0 , 0 ], 13 | [ -R1 ,R1+RT1+R4+RB1+1/(s*C1)+1/(s*C2)+1/(s*C5),-1/(s*C2), -R4 , 0 , 0 , 0 ,-RT1-1/(s*C5) , -RB1 ], 14 | [ -RM-1/(s*C3) , -1/(s*C2) ,1/(s*C7)+RM+R2+1/(s*C2)+1/(s*C3), -R2 , 0 , 0 , 0 , 0 , -1/(s*C7) ], 15 | [ 0 , -R4 , -R2 ,R2+RB2+R4+RT2+1/(s*C4), -RT2-1/(s*C4) , 0 , 0 , 0 , -RB2 ], 16 | [ 0 , 0 , 0 , -RT2-1/(s*C4) ,RV1+RV2+RT2+1/(s*C4), -RV1 , -RV2 , 0 , 0 ], 17 | [ 0 , 0 , 0 , 0 , -RV1 , RV1+1/(s*C6) , 0 , -1/(s*C6) , 0 ], 18 | [ 0 , 0 , 0 , 0 , -RV2 , 0 , RV2+RL , -RL , 0 ], 19 | [ 0 , -RT1-1/(s*C5) , 0 , 0 , 0 , -1/(s*C6) , -RL ,R3+RL+RT1+1/(s*C5)+1/(s*C6), 0 ], 20 | [ 0 , -RB1 , -1/(s*C7) , -RB2 , 0 , 0 , 0 , 0 ,1/(s*C7)+RB1+RB2] 21 | )$*/ 22 | matrix( 23 | [R1+RT1+R4+RB1+1/(s*C1)+1/(s*C2)+1/(s*C5), -1/(s*C2) , -R4 , 0 , 0 , 0 , -RT1-1/(s*C5) , -RB1 ], 24 | [ -1/(s*C2) ,1/(s*C7)+RM+R2+1/(s*C2)+1/(s*C3), -R2 , 0 , 0 , 0 , 0 , -1/(s*C7) ], 25 | [ -R4 , -R2 ,R2+RB2+R4+RT2+1/(s*C4), -RT2-1/(s*C4) , 0 , 0 , 0 , -RB2 ], 26 | [ 0 , 0 , -RT2-1/(s*C4) ,RV1+RV2+RT2+1/(s*C4), -RV1 , -RV2 , 0 , 0 ], 27 | [ 0 , 0 , 0 , -RV1 ,RV1+1/(s*C6), 0 , -1/(s*C6) , 0 ], 28 | [ 0 , 0 , 0 , -RV2 , 0 ,RV2+RL, -RL , 0 ], 29 | [ -RT1-1/(s*C5) , 0 , 0 , 0 , -1/(s*C6) , -RL ,R3+RL+RT1+1/(s*C5)+1/(s*C6), 0 ], 30 | [ -RB1 , -1/(s*C7) , -RB2 , 0 , 0 , 0 , 0 ,1/(s*C7)+RB1+RB2] 31 | )$ 32 | det1: determinant(%)$ 33 | matrix( 34 | [ -R1 , -RM-1/(s*C3) , 0 , 0 , 0 , 0 , 0 , 0 ], 35 | [ -1/(s*C2) ,1/(s*C7)+RM+R2+1/(s*C2)+1/(s*C3), -R2 , 0 , 0 , 0 , 0 , -1/(s*C7) ], 36 | [ -R4 , -R2 ,R2+RB2+R4+RT2+1/(s*C4), -RT2-1/(s*C4) , 0 , 0 , 0 , -RB2 ], 37 | [ 0 , 0 , -RT2-1/(s*C4) ,RV1+RV2+RT2+1/(s*C4), -RV1 , -RV2 , 0 , 0 ], 38 | [ 0 , 0 , 0 , -RV1 ,RV1+1/(s*C6), 0 , -1/(s*C6) , 0 ], 39 | [ 0 , 0 , 0 , -RV2 , 0 ,RV2+RL, -RL , 0 ], 40 | [ -RT1-1/(s*C5) , 0 , 0 , 0 , -1/(s*C6) , -RL ,R3+RL+RT1+1/(s*C5)+1/(s*C6), 0 ], 41 | [ -RB1 , -1/(s*C7) , -RB2 , 0 , 0 , 0 , 0 ,1/(s*C7)+RB1+RB2] 42 | )$ 43 | det2: determinant(%)$ 44 | matrix( 45 | [ -R1 , -RM-1/(s*C3) , 0 , 0 , 0 , 0 , 0 , 0 ], 46 | [R1+RT1+R4+RB1+1/(s*C1)+1/(s*C2)+1/(s*C5), -1/(s*C2) , -R4 , 0 , 0 , 0 , -RT1-1/(s*C5) , -RB1 ], 47 | [ -R4 , -R2 ,R2+RB2+R4+RT2+1/(s*C4), -RT2-1/(s*C4) , 0 , 0 , 0 , -RB2 ], 48 | [ 0 , 0 , -RT2-1/(s*C4) ,RV1+RV2+RT2+1/(s*C4), -RV1 , -RV2 , 0 , 0 ], 49 | [ 0 , 0 , 0 , -RV1 ,RV1+1/(s*C6), 0 , -1/(s*C6) , 0 ], 50 | [ 0 , 0 , 0 , -RV2 , 0 ,RV2+RL, -RL , 0 ], 51 | [ -RT1-1/(s*C5) , 0 , 0 , 0 , -1/(s*C6) , -RL ,R3+RL+RT1+1/(s*C5)+1/(s*C6), 0 ], 52 | [ -RB1 , -1/(s*C7) , -RB2 , 0 , 0 , 0 , 0 ,1/(s*C7)+RB1+RB2] 53 | )$ 54 | det3: determinant(%)$ /* evaluates the determinant of the previous output % */ 55 | sum: (RIN+R1+1/(s*C3)+RM)*det1 + R1*det2 - (RM+1/(s*C3))*det3$ 56 | DEN_fs: factor(sum)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 57 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 58 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 59 | /* extract denominator coefficients in the powers of s to designated variables */ 60 | DEN_PIm: coeff(pld,s,7); 61 | DEN_ZRe: coeff(pld,s,6); 62 | DEN_YIm: coeff(pld,s,5); 63 | DEN_XRe: coeff(pld,s,4); 64 | DEN_AIm: coeff(pld,s,3); 65 | DEN_BRe: coeff(pld,s,2); 66 | DEN_CIm: coeff(pld,s,1); 67 | DEN_DRe: coeff(pld,s,0); 68 | closefile(); 69 | 70 | /* matrix to solve Iout using Cramer's rule */ 71 | writefile("num_jazz.txt"); 72 | matrix( 73 | [ -R1 ,R1+RT1+R4+RB1+1/(s*C1)+1/(s*C2)+1/(s*C5), -1/(s*C2) , -R4 , 0 , 0 , -RT1-1/(s*C5) , -RB1 ], 74 | [-RM-1/(s*C3), -1/(s*C2) ,1/(s*C7)+RM+R2+1/(s*C2)+1/(s*C3), -R2 , 0 , 0 , 0 , -1/(s*C7) ], 75 | [ 0 , -R4 , -R2 ,R2+RB2+R4+RT2+1/(s*C4), -RT2-1/(s*C4) , 0 , 0 , -RB2 ], 76 | [ 0 , 0 , 0 , -RT2-1/(s*C4) ,RV1+RV2+RT2+1/(s*C4), -RV1 , 0 , 0 ], 77 | [ 0 , 0 , 0 , 0 , -RV1 ,RV1+1/(s*C6), -1/(s*C6) , 0 ], 78 | [ 0 , 0 , 0 , 0 , -RV2 , 0 , -RL , 0 ], 79 | [ 0 , -RT1-1/(s*C5) , 0 , 0 , 0 , -1/(s*C6) ,R3+RL+RT1+1/(s*C5)+1/(s*C6), 0 ], 80 | [ 0 , -RB1 , -1/(s*C7) , -RB2 , 0 , 0 , 0 , 1/(s*C7)+RB1+RB2] 81 | )$ 82 | Ia: determinant(%)$ 83 | matrix( 84 | [ -R1 ,R1+RT1+R4+RB1+1/(s*C1)+1/(s*C2)+1/(s*C5), -1/(s*C2) , -R4 , 0 , 0 , 0 , -RB1 ], 85 | [-RM-1/(s*C3), -1/(s*C2) ,1/(s*C7)+RM+R2+1/(s*C2)+1/(s*C3), -R2 , 0 , 0 , 0 , -1/(s*C7) ], 86 | [ 0 , -R4 , -R2 ,R2+RB2+R4+RT2+1/(s*C4), -RT2-1/(s*C4) , 0 , 0 , -RB2 ], 87 | [ 0 , 0 , 0 , -RT2-1/(s*C4) ,RV1+RV2+RT2+1/(s*C4), -RV1 , -RV2 , 0 ], 88 | [ 0 , 0 , 0 , 0 , -RV1 ,RV1+1/(s*C6), 0 , 0 ], 89 | [ 0 , 0 , 0 , 0 , -RV2 , 0 , RV2+RL , 0 ], 90 | [ 0 , -RT1-1/(s*C5) , 0 , 0 , 0 , -1/(s*C6) , -RL , 0 ], 91 | [ 0 , -RB1 , -1/(s*C7) , -RB2 , 0 , 0 , 0 , 1/(s*C7)+RB1+RB2] 92 | )$ 93 | Ib: (-1)*determinant(%)$ 94 | Ia-Ib$ 95 | NUM_fs: factor(%)$ 96 | NUM_den: denom(NUM_fs)$ 97 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 98 | /* extract numerator coefficients in the powers of s to designated variables */ 99 | NUM_Pim: coeff(pln,s,7); 100 | NUM_ZRe: coeff(pln,s,6); 101 | NUM_YIm: coeff(pln,s,5); 102 | NUM_XRe: coeff(pln,s,4); 103 | NUM_AIm: coeff(pln,s,3); 104 | NUM_BRe: coeff(pln,s,2); 105 | NUM_CIm: coeff(pln,s,1); 106 | NUM_DRe: coeff(pln,s,0); 107 | DEN_den; 108 | NUM_den; 109 | DEN_den/NUM_den; 110 | closefile(); 111 | 112 | -------------------------------------------------------------------------------- /maxima_files/dumble_rock.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Dumble tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix([RIN+R1+RM+1/(s*C3),-R1,-1/(s*C3)-RM, 0],[-R1,R1+RT1+RT2+1/(s*C1)+1/(s*C2),-1/(s*C2),-RT2],[-1/(s*C3)-RM,-1/(s*C2),RB+1/(s*C2)+1/(s*C3)+RM,-RB],[0,-RT2,-RB,RL+RB+RT2])$ 11 | determinant(%)$ /* evaluates the determinant of the previous output % */ 12 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 13 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 14 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 15 | /* extract denominator coefficients in the powers of s to designated variables */ 16 | DEN_XRe: coeff(pld,s,4); 17 | DEN_AIm: coeff(pld,s,3); 18 | DEN_BRe: coeff(pld,s,2); 19 | DEN_CIm: coeff(pld,s,1); 20 | DEN_DRe: coeff(pld,s,0); 21 | 22 | /* matrix to solve Iout using Cramer's rule */ 23 | matrix([RIN+R1+RM+1/(s*C3),-R1,-1/(s*C3)-RM, 1],[-R1,R1+RT1+RT2+1/(s*C1)+1/(s*C2),-1/(s*C2),0],[-1/(s*C3)-RM,-1/(s*C2),RB+1/(s*C2)+1/(s*C3)+RM,0],[0,-RT2,-RB,0])$ 24 | determinant(%)$ 25 | NUM_fs: factor(%)$ 26 | NUM_den: denom(NUM_fs)$ 27 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 28 | /* extract numerator coefficients in the powers of s to designated variables */ 29 | NUM_XRe: coeff(pln,s,4); 30 | NUM_AIm: coeff(pln,s,3); 31 | NUM_BRe: coeff(pln,s,2); 32 | NUM_CIm: coeff(pln,s,1); 33 | NUM_DRe: coeff(pln,s,0); 34 | DEN_den; 35 | NUM_den; 36 | DEN_den/NUM_den; 37 | 38 | 39 | -------------------------------------------------------------------------------- /maxima_files/dumble_rock2.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Dumble tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | writefile("den_rock.txt"); 11 | matrix( 12 | [RIN+R1+1/(s*C3)+RM, -R1 , -RM-1/(s*C3) , 0 , 0 , 0 , 0 , 0 ], 13 | [-R1 ,R1+RT1+RT2+RB1+1/(s*C1)+1/(s*C2)+1/(s*C5),-RB1-1/(s*C2),0 , -RT2 , 0 , 0 ,-RT1-1/(s*C5)], 14 | [-RM-1/(s*C3) , -RB1-1/(s*C2) ,RB1+RM+R2+1/(s*C2)+1/(s*C3)+1/(s*C4),-1/(s*C4), -R2 , 0 , 0 , 0 ], 15 | [ 0 , 0 , -1/(s*C4) , RB2+1/(s*C4) , -RB2 , 0 , 0 , 0 ], 16 | [ 0 , -RT2 , -R2 , -RB2 ,R2+RB2+RT2+RV1+RV2, -RV1 , -RV2 , 0 ], 17 | [ 0 , 0 , 0 , 0 , -RV1 , RV1+1/(s*C6) , 0 , -1/(s*C6)], 18 | [ 0 , 0 , 0 , 0 , -RV2 , 0 , RV2+RL , -RL ], 19 | [ 0 , -RT1-1/(s*C5) , 0 , 0 , 0 , -1/(s*C6) ,-RL ,R3+RL+RT1+1/(s*C5)+1/(s*C6)] 20 | )$ 21 | determinant(%)$ /* evaluates the determinant of the previous output % */ 22 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 23 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 24 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 25 | /* extract denominator coefficients in the powers of s to designated variables */ 26 | DEN_ZRe: coeff(pld,s,6); 27 | DEN_YIm: coeff(pld,s,5); 28 | DEN_XRe: coeff(pld,s,4); 29 | DEN_AIm: coeff(pld,s,3); 30 | DEN_BRe: coeff(pld,s,2); 31 | DEN_CIm: coeff(pld,s,1); 32 | DEN_DRe: coeff(pld,s,0); 33 | closefile(); 34 | 35 | /* matrix to solve Iout using Cramer's rule */ 36 | writefile("num_rock.txt"); 37 | matrix( 38 | [RIN+R1+1/(s*C3)+RM, -R1 , -RM-1/(s*C3) , 0 , 0 , 0 , 1 , 0 ], 39 | [-R1 ,R1+RT1+RT2+RB1+1/(s*C1)+1/(s*C2)+1/(s*C5),-RB1-1/(s*C2),0 , -RT2 , 0 , 0 ,-RT1-1/(s*C5)], 40 | [-RM-1/(s*C3) , -RB1-1/(s*C2) ,RB1+RM+R2+1/(s*C2)+1/(s*C3)+1/(s*C4),-1/(s*C4), -R2 , 0 , 0 , 0 ], 41 | [ 0 , 0 , -1/(s*C4) , RB2+1/(s*C4) , -RB2 , 0 , 0 , 0 ], 42 | [ 0 , -RT2 , -R2 , -RB2 ,R2+RB2+RT2+RV1+RV2, -RV1 , 0 , 0 ], 43 | [ 0 , 0 , 0 , 0 , -RV1 , RV1+1/(s*C6) , 0 , -1/(s*C6)], 44 | [ 0 , 0 , 0 , 0 , -RV2 , 0 , 0 , -RL ], 45 | [ 0 , -RT1-1/(s*C5) , 0 , 0 , 0 , -1/(s*C6) ,0 ,R3+RL+RT1+1/(s*C5)+1/(s*C6)] 46 | )$ 47 | Ia: determinant(%)$ 48 | matrix( 49 | [RIN+R1+1/(s*C3)+RM, -R1 , -RM-1/(s*C3) , 0 , 0 , 0 , 0 , 1 ], 50 | [-R1 ,R1+RT1+RT2+RB1+1/(s*C1)+1/(s*C2)+1/(s*C5),-RB1-1/(s*C2),0 , -RT2 , 0 , 0 , 0 ], 51 | [-RM-1/(s*C3) , -RB1-1/(s*C2) ,RB1+RM+R2+1/(s*C2)+1/(s*C3)+1/(s*C4),-1/(s*C4), -R2 , 0 , 0 , 0 ], 52 | [ 0 , 0 , -1/(s*C4) , RB2+1/(s*C4) , -RB2 , 0 , 0 , 0 ], 53 | [ 0 , -RT2 , -R2 , -RB2 ,R2+RB2+RT2+RV1+RV2, -RV1 , -RV2 , 0 ], 54 | [ 0 , 0 , 0 , 0 , -RV1 , RV1+1/(s*C6) , 0 , 0 ], 55 | [ 0 , 0 , 0 , 0 , -RV2 , 0 , RV2+RL , 0 ], 56 | [ 0 , -RT1-1/(s*C5) , 0 , 0 , 0 , -1/(s*C6) ,-RL , 0 ] 57 | )$ 58 | Ib: determinant(%)$ 59 | Ia-Ib$ 60 | NUM_fs: factor(%)$ 61 | NUM_den: denom(NUM_fs)$ 62 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 63 | /* extract numerator coefficients in the powers of s to designated variables */ 64 | NUM_ZRe: coeff(pln,s,6); 65 | NUM_YIm: coeff(pln,s,5); 66 | NUM_XRe: coeff(pln,s,4); 67 | NUM_AIm: coeff(pln,s,3); 68 | NUM_BRe: coeff(pln,s,2); 69 | NUM_CIm: coeff(pln,s,1); 70 | NUM_DRe: coeff(pln,s,0); 71 | DEN_den; 72 | NUM_den; 73 | DEN_den/NUM_den; 74 | closefile(); 75 | 76 | -------------------------------------------------------------------------------- /maxima_files/eseries.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for E-series tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R2+1/(s*C3), -R2 , 0 , -1/(s*C3) , 0 ], 12 | [ -R2 ,R3+R2+RB1, -RB1 , -R3 , 0 ], 13 | [ 0 , -RB1 ,RB1+RB2+1/(s*C4), 0 , -RB2-1/(s*C4) ], 14 | [ -1/(s*C3) , -R3 , 0 ,RT1+R3+R5+1/(s*C2)+1/(s*C3), -R5 ], 15 | [ 0 , 0 , -RB2-1/(s*C4) , -R5 ,R5+RB2+RT2+1/(s*C1)+1/(s*C4)] 16 | )$ 17 | determinant(%)$ /* evaluates the determinant of the previous output % */ 18 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 19 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 20 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 21 | /* extract denominator coefficients in the powers of s to designated variables */ 22 | DEN_XRe: coeff(pld,s,4); 23 | DEN_AIm: coeff(pld,s,3); 24 | DEN_BRe: coeff(pld,s,2); 25 | DEN_CIm: coeff(pld,s,1); 26 | DEN_DRe: coeff(pld,s,0); 27 | 28 | /* matrix to solve Iout using Cramer's rule */ 29 | matrix( 30 | [RIN+R2+1/(s*C3), -R2 , 0 , -1/(s*C3) , 1 ], 31 | [ -R2 ,R3+R2+RB1, -RB1 , -R3 , 0 ], 32 | [ 0 , -RB1 ,RB1+RB2+1/(s*C4), 0 , 0 ], 33 | [ -1/(s*C3) , -R3 , 0 ,RT1+R3+R5+1/(s*C2)+1/(s*C3), 0 ], 34 | [ 0 , 0 , -RB2-1/(s*C4) , -R5 , 0 ] 35 | )$ 36 | determinant(%)$ 37 | NUM_fs: factor(%)$ 38 | NUM_den: denom(NUM_fs)*s*C1$ /* because of (1 + s*C1*RT2)/(s*C1) is the terminating impedance */ 39 | pln: expand((1 + s*C1*RT2)*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 40 | /* extract numerator coefficients in the powers of s to designated variables */ 41 | NUM_YIm: coeff(pln,s,5); 42 | NUM_XRe: coeff(pln,s,4); 43 | NUM_AIm: coeff(pln,s,3); 44 | NUM_BRe: coeff(pln,s,2); 45 | NUM_CIm: coeff(pln,s,1); 46 | NUM_DRe: coeff(pln,s,0); 47 | DEN_den; 48 | NUM_den; 49 | DEN_den/NUM_den; 50 | -------------------------------------------------------------------------------- /maxima_files/fender.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Fender tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+RM+1/(s*C3), -R1 , -1/(s*C3) , -RM ], 12 | [ -R1 ,R1+RT1+RT2+1/(s*C1)+1/(s*C2), -1/(s*C2) , -RT2 ], 13 | [ -1/(s*C3) , -1/(s*C2) ,RB+1/(s*C2)+1/(s*C3), -RB ], 14 | [ -RM , -RT2 , -RB ,RT2+RB+RM+RL] 15 | )$ 16 | determinant(%)$ /* evaluates the determinant of the previous output % */ 17 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 18 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 19 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 20 | /* extract denominator coefficients in the powers of s to designated variables */ 21 | DEN_AIm: coeff(pld,s,3); 22 | DEN_BRe: coeff(pld,s,2); 23 | DEN_CIm: coeff(pld,s,1); 24 | DEN_DRe: coeff(pld,s,0); 25 | 26 | /* matrix to solve Iout using Cramer's rule */ 27 | matrix( 28 | [RIN+R1+RM+1/(s*C3), -R1 , -1/(s*C3) ,1], 29 | [ -R1 ,R1+RT1+RT2+1/(s*C1)+1/(s*C2), -1/(s*C2) ,0], 30 | [ -1/(s*C3) , -1/(s*C2) ,RB+1/(s*C2)+1/(s*C3),0], 31 | [ -RM , -RT2 , -RB ,0] 32 | )$ 33 | determinant(%)$ 34 | NUM_fs: factor(%)$ 35 | NUM_den: denom(NUM_fs)$ 36 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 37 | /* extract numerator coefficients in the powers of s to designated variables */ 38 | NUM_AIm: coeff(pln,s,3); 39 | NUM_BRe: coeff(pln,s,2); 40 | NUM_CIm: coeff(pln,s,1); 41 | NUM_DRe: coeff(pln,s,0); 42 | DEN_den; 43 | NUM_den; 44 | DEN_den/NUM_den; 45 | 46 | 47 | -------------------------------------------------------------------------------- /maxima_files/framus.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Framus mid tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+1/(s*C1), -1/(s*C1) , -R1 ], 12 | [ -1/(s*C1) ,RM1+RM2+1/(s*C1)+1/(s*C2), -RM2-1/(s*C2) ], 13 | [ -R1 , -RM2-1/(s*C2) ,R1+RM2+1/(s*C2)+RL] 14 | )$ 15 | determinant(%)$ /* evaluates the determinant of the previous output % */ 16 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 17 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 18 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 19 | /* extract denominator coefficients in the powers of s to designated variables */ 20 | DEN_AIm: coeff(pld,s,3); 21 | DEN_BRe: coeff(pld,s,2); 22 | DEN_CIm: coeff(pld,s,1); 23 | DEN_DRe: coeff(pld,s,0); 24 | 25 | /* matrix to solve Iout using Cramer's rule */ 26 | matrix( 27 | [RIN+R1+1/(s*C1), -1/(s*C1) , 1 ], 28 | [ -1/(s*C1) ,RM1+RM2+1/(s*C1)+1/(s*C2), 0 ], 29 | [ -R1 , -RM2-1/(s*C2) , 0 ] 30 | )$ 31 | determinant(%)$ 32 | NUM_fs: factor(%)$ 33 | NUM_den: denom(NUM_fs)$ 34 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 35 | /* extract numerator coefficients in the powers of s to designated variables */ 36 | NUM_AIm: coeff(pln,s,3); 37 | NUM_BRe: coeff(pln,s,2); 38 | NUM_CIm: coeff(pln,s,1); 39 | NUM_DRe: coeff(pln,s,0); 40 | DEN_den; 41 | NUM_den; 42 | DEN_den/NUM_den; 43 | 44 | 45 | -------------------------------------------------------------------------------- /maxima_files/hiwatt.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Hiwatt tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | writefile("den.txt"); 10 | /* matrix obtained from current loops in the circuit */ 11 | matrix( 12 | [RIN+R1+1/(s*C1), -R1 , 0 , 0 , -1/(s*C1) , 0 ], 13 | [ -R1 ,R1+R2+R3+1/(s*C2)+1/(s*C3)+1/(s*C5), -R2 , -1/(s*C5) , -1/(s*C3) , -R3 ], 14 | [ 0 , -R2 ,R2+RT1+RT2+1/(s*C4), 0 , 0 , -RT2 ], 15 | [ 0 , -1/(s*C5) , 0 ,RM+1/(s*C5), 0 , -RM ], 16 | [ -1/(s*C1) , -1/(s*C3) , 0 , 0 ,RB+1/(s*C1)+1/(s*C3), -RB ], 17 | [ 0 , -R3 , -RT2 , -RM , -RB ,R3+R4+R5+RT2+RM+RB] 18 | )$ 19 | determinant(%)$ /* evaluates the determinant of the previous output % */ 20 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 21 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 22 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 23 | /* extract denominator coefficients in the powers of s to designated variables */ 24 | DEN_YIm: coeff(pld,s,5); 25 | DEN_XRe: coeff(pld,s,4); 26 | DEN_AIm: coeff(pld,s,3); 27 | DEN_BRe: coeff(pld,s,2); 28 | DEN_CIm: coeff(pld,s,1); 29 | DEN_DRe: coeff(pld,s,0); 30 | closefile(); 31 | 32 | /* matrix to solve Iout using Cramer's rule */ 33 | writefile("num.txt"); 34 | matrix( 35 | [RIN+R1+1/(s*C1), -R1 , 0 , 0 , -1/(s*C1) , 1 ], 36 | [ -R1 ,R1+R2+R3+1/(s*C2)+1/(s*C3)+1/(s*C5), -R2 , -1/(s*C5) , -1/(s*C3) , 0 ], 37 | [ 0 , -R2 ,R2+RT1+RT2+1/(s*C4), 0 , 0 , 0 ], 38 | [ 0 , -1/(s*C5) , 0 ,RM+1/(s*C5), 0 , 0 ], 39 | [ -1/(s*C1) , -1/(s*C3) , 0 , 0 ,RB+1/(s*C1)+1/(s*C3), 0 ], 40 | [ 0 , -R3 , -RT2 , -RM , -RB , 0 ] 41 | )$ 42 | determinant(%)$ 43 | NUM_fs: factor(%)$ 44 | NUM_den: denom(NUM_fs)$ /* because of (1 + s*C1*RT2)/(s*C1) is the terminating impedance */ 45 | pln: expand(R5*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 46 | /* extract numerator coefficients in the powers of s to designated variables */ 47 | NUM_YIm: coeff(pln,s,5); 48 | NUM_XRe: coeff(pln,s,4); 49 | NUM_AIm: coeff(pln,s,3); 50 | NUM_BRe: coeff(pln,s,2); 51 | NUM_CIm: coeff(pln,s,1); 52 | NUM_DRe: coeff(pln,s,0); 53 | DEN_den; 54 | NUM_den; 55 | DEN_den/NUM_den; 56 | closefile(); 57 | -------------------------------------------------------------------------------- /maxima_files/james.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for James tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+R2+RB1+RB2, -R1 , -RB1 , -RB2 , -R2 , 0 ], 12 | [ -R1 ,R1+R3+RT1+1/(s*CB1)+1/(s*CT1), -1/(s*CB1) , 0 , -R3 , 0 ], 13 | [ -RB1 , -1/(s*CB1) ,RB1+1/(s*CB1), 0 , 0 , 0 ], 14 | [ -RB2 , 0 , 0 ,RB2+1/(s*CB2), -1/(s*CB2) , 0 ], 15 | [ -R2 , -R3 , 0 , -1/(s*CB2) ,RL+R3+R2+1/(s*CB2), -RL ], 16 | [ 0 , 0 , 0 , 0 , -RL ,RL+RT2+1/(s*CT2)] 17 | )$ 18 | determinant(%)$ /* evaluates the determinant of the previous output % */ 19 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 20 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 21 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 22 | /* extract denominator coefficients in the powers of s to designated variables */ 23 | DEN_XRe: coeff(pld,s,4); 24 | DEN_AIm: coeff(pld,s,3); 25 | DEN_BRe: coeff(pld,s,2); 26 | DEN_CIm: coeff(pld,s,1); 27 | DEN_DRe: coeff(pld,s,0); 28 | 29 | /* matrix to solve Iout using Cramer's rule */ 30 | matrix( 31 | [RIN+R1+R2+RB1+RB2, -R1 , -RB1 , -RB2 , 1 , 0 ], 32 | [ -R1 ,R1+R3+RT1+1/(s*CB1)+1/(s*CT1), -1/(s*CB1) , 0 , 0 , 0 ], 33 | [ -RB1 , -1/(s*CB1) ,RB1+1/(s*CB1), 0 , 0 , 0 ], 34 | [ -RB2 , 0 , 0 ,RB2+1/(s*CB2), 0 , 0 ], 35 | [ -R2 , -R3 , 0 , -1/(s*CB2) , 0 , -RL ], 36 | [ 0 , 0 , 0 , 0 , 0 ,RL+RT2+1/(s*CT2)] 37 | )$ 38 | IIIII: determinant(%)$ 39 | matrix( 40 | [RIN+R1+R2+RB1+RB2, -R1 , -RB1 , -RB2 , -R2 , 1 ], 41 | [ -R1 ,R1+R3+RT1+1/(s*CB1)+1/(s*CT1), -1/(s*CB1) , 0 , -R3 , 0 ], 42 | [ -RB1 , -1/(s*CB1) ,RB1+1/(s*CB1), 0 , 0 , 0 ], 43 | [ -RB2 , 0 , 0 ,RB2+1/(s*CB2), -1/(s*CB2) , 0 ], 44 | [ -R2 , -R3 , 0 , -1/(s*CB2) ,RL+R3+R2+1/(s*CB2), 0 ], 45 | [ 0 , 0 , 0 , 0 , -RL , 0 ] 46 | )$ 47 | IIIIII: determinant(%)$ 48 | IIIII-IIIIII$ 49 | NUM_fs: factor(%)$ 50 | NUM_den: denom(NUM_fs)$ 51 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 52 | /* extract numerator coefficients in the powers of s to designated variables */ 53 | NUM_XRe: coeff(pln,s,4); 54 | NUM_AIm: coeff(pln,s,3); 55 | NUM_BRe: coeff(pln,s,2); 56 | NUM_CIm: coeff(pln,s,1); 57 | NUM_DRe: coeff(pln,s,0); 58 | DEN_den; 59 | NUM_den; 60 | DEN_den/NUM_den; 61 | -------------------------------------------------------------------------------- /maxima_files/james_2.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* Jarmo L. 14.9.2018 */ 5 | 6 | /* This variation of a James/Baxandall two-band shelving tone stack offers: */ 7 | /* - passive circuitry */ 8 | /* - one capacitor in the bass control */ 9 | /* - two capacitors in the treble control */ 10 | /* Charles Day 11.5.2021 */ 11 | 12 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 13 | ratmx: true$ /* matrix operations are performed in CRE */ 14 | /* matrix obtained from node analysis of the circuit */ 15 | matrix( 16 | [1/RIN+1/R1+s*CT1, -1/R1 , 0 , 0 , -s*CT1 , 0 , 0 ], 17 | [ -1/R1 ,1/R1+1/RB1+s*CB, -1/RB1 , -s*CB , 0 , 0 , 0 ], 18 | [ 0 , -1/RB1 ,1/RB1+1/RB2+1/R3, -1/RB2 , 0 , 0 , -1/R3 ], 19 | [ 0 , -s*CB , -1/RB2 ,1/RB2+1/R2+s*CB, 0 , 0 , 0 ], 20 | [ -s*CT1 , 0 , 0 , 0 ,1/RT1+s*CT1, 0 , -1/RT1 ], 21 | [ 0 , 0 , 0 , 0 , 0 ,1/RT2+s*CT2, -1/RT2 ], 22 | [ 0 , 0 , -1/R3 , 0 , -1/RT1 , -1/RT2 ,1/R3+1/RT1+1/RT2+1/RL] 23 | )$ 24 | determinant(%)$ /* evaluates the determinant of the previous output % */ 25 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 26 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 27 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 28 | /* extract denominator coefficients in the powers of s to designated variables */ 29 | DEN_ZRe: coeff(pld,s,6); 30 | DEN_YIm: coeff(pld,s,5); 31 | DEN_XRe: coeff(pld,s,4); 32 | DEN_AIm: coeff(pld,s,3); 33 | DEN_BRe: coeff(pld,s,2); 34 | DEN_CIm: coeff(pld,s,1); 35 | DEN_DRe: coeff(pld,s,0); 36 | 37 | /* matrix to solve Vout/Vin using Cramer's rule */ 38 | matrix( 39 | [ -1/R1 ,1/R1+1/RB1+s*CB, -1/RB1 , -s*CB , 0 , 0 ], 40 | [ 0 , -1/RB1 ,1/RB1+1/RB2+1/R3, -1/RB2 , 0 , 0 ], 41 | [ 0 , -s*CB , -1/RB2 ,1/RB2+1/R2+s*CB, 0 , 0 ], 42 | [ -s*CT1 , 0 , 0 , 0 ,1/RT1+s*CT1, 0 ], 43 | [ 0 , 0 , 0 , 0 , 0 ,1/RT2+s*CT2], 44 | [ 0 , 0 , -1/R3 , 0 , -1/RT1 , -1/RT2 ] 45 | )$ 46 | M1_7: determinant(%)$ 47 | NUM_fs: factor(%)$ 48 | NUM_den: denom(NUM_fs)$ 49 | /* expand to common denominator for numerator and denominator in Cramer's division */ 50 | pln: expand((1/RIN)*num(NUM_fs)*DEN_den/NUM_den)$ 51 | /* extract numerator coefficients in the powers of s to designated variables */ 52 | NUM_ZRe: coeff(pln,s,6); 53 | NUM_YIm: coeff(pln,s,5); 54 | NUM_XRe: coeff(pln,s,4); 55 | NUM_AIm: coeff(pln,s,3); 56 | NUM_BRe: coeff(pln,s,2); 57 | NUM_CIm: coeff(pln,s,1); 58 | NUM_DRe: coeff(pln,s,0); 59 | DEN_den; 60 | NUM_den; 61 | DEN_den/NUM_den; 62 | -------------------------------------------------------------------------------- /maxima_files/james_3.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* Jarmo L. 14.9.2018 */ 5 | 6 | /* This variation of a James/Baxandall two-band shelving tone stack offers: */ 7 | /* - active circuitry (opamp w/ negative feedback) */ 8 | /* - two capacitors in the bass control */ 9 | /* - two capacitors in the treble control */ 10 | /* Charles Day 14.5.2021 */ 11 | 12 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 13 | ratmx: true$ /* matrix operations are performed in CRE */ 14 | /* matrix obtained from node analysis of the circuit */ 15 | matrix( 16 | [1/RIN+1/R1+s*CT1, -1/R1 , 0 , 0 , -s*CT1 , 0 , 0 , 0 ], 17 | [ -1/R1 ,1/R1+1/RB1+s*CB1, -1/RB1-s*CB1 , 0 , 0 , 0 , 0 , 0 ], 18 | [ 0 , -1/RB1-s*CB1 ,1/RB1+1/RB2+1/R3+s*CB1+s*CB2, -1/RB2-s*CB2 , 0 , 0 , 0 , 0 ], 19 | [ 0 , 0 , -1/RB2-s*CB2 ,1/RB2+1/R2+s*CB2, 0 , 0 , -1/R2 , 0 ], 20 | [ -s*CT1 , 0 , 0 , 0 ,1/RT1+s*CT1, 0 , 0 , 0 ], 21 | [ 0 , 0 , 0 , 0 , 0 ,1/RT2+s*CT2, -s*CT2 , 0 ], 22 | [ 0 , 0 , 0 , -1/R2 , 0 , -s*CT2 ,1/R2+1/RF+s*CT2,-1/RF], 23 | [ 0 , 0 , -1/R3 , 0 , -1/RT1 , -1/RT2 , 0 , 0 ] 24 | )$ 25 | determinant(%)$ /* evaluates the determinant of the previous output % */ 26 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 27 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 28 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 29 | /* extract denominator coefficients in the powers of s to designated variables */ 30 | DEN_ZRe: coeff(pld,s,6); 31 | DEN_YIm: coeff(pld,s,5); 32 | DEN_XRe: coeff(pld,s,4); 33 | DEN_AIm: coeff(pld,s,3); 34 | DEN_BRe: coeff(pld,s,2); 35 | DEN_CIm: coeff(pld,s,1); 36 | DEN_DRe: coeff(pld,s,0); 37 | 38 | /* matrix to solve Vout/Vin using Cramer's rule */ 39 | matrix( 40 | [ -1/R1 ,1/R1+1/RB1+s*CB1, -1/RB1-s*CB1 , 0 , 0 , 0 , 0 ], 41 | [ 0 , -1/RB1-s*CB1 ,1/RB1+1/RB2+1/R3+s*CB1+s*CB2, -1/RB2-s*CB2 , 0 , 0 , 0 ], 42 | [ 0 , 0 , -1/RB2-s*CB2 ,1/RB2+1/R2+s*CB2, 0 , 0 , -1/R2 ], 43 | [ -s*CT1 , 0 , 0 , 0 ,1/RT1+s*CT1, 0 , 0 ], 44 | [ 0 , 0 , 0 , 0 , 0 ,1/RT2+s*CT2, -s*CT2 ], 45 | [ 0 , 0 , 0 , -1/R2 , 0 , -s*CT2 ,1/R2+1/RF+s*CT2], 46 | [ 0 , 0 , -1/R3 , 0 , -1/RT1 , -1/RT2 , 0 ] 47 | )$ 48 | M1_8: determinant(%)$ 49 | NUM_fs: factor(%)$ 50 | NUM_den: denom(NUM_fs)$ 51 | /* expand to common denominator for numerator and denominator in Cramer's division */ 52 | pln: expand((-1/RIN)*num(NUM_fs)*DEN_den/NUM_den)$ 53 | /* extract numerator coefficients in the powers of s to designated variables */ 54 | NUM_ZRe: coeff(pln,s,6); 55 | NUM_YIm: coeff(pln,s,5); 56 | NUM_XRe: coeff(pln,s,4); 57 | NUM_AIm: coeff(pln,s,3); 58 | NUM_BRe: coeff(pln,s,2); 59 | NUM_CIm: coeff(pln,s,1); 60 | NUM_DRe: coeff(pln,s,0); 61 | DEN_den; 62 | NUM_den; 63 | DEN_den/NUM_den; 64 | -------------------------------------------------------------------------------- /maxima_files/james_4.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* Jarmo L. 14.9.2018 */ 5 | 6 | /* This variation of a James/Baxandall two-band shelving tone stack offers: */ 7 | /* - active circuitry (opamp w/ negative feedback) */ 8 | /* - one capacitor in the bass control */ 9 | /* - two capacitors in the treble control */ 10 | /* Charles Day 13.5.2021 */ 11 | 12 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 13 | ratmx: true$ /* matrix operations are performed in CRE */ 14 | /* matrix obtained from node analysis of the circuit */ 15 | matrix( 16 | [1/RIN+1/R1+s*CT1, -1/R1 , 0 , 0 , -s*CT1 , 0 , 0 , 0 ], 17 | [ -1/R1 ,1/R1+1/RB1+s*CB, -1/RB1 , -s*CB , 0 , 0 , 0 , 0 ], 18 | [ 0 , -1/RB1 ,1/RB1+1/RB2+1/R3, -1/RB2 , 0 , 0 , 0 , 0 ], 19 | [ 0 , -s*CB , -1/RB2 ,1/RB2+1/R2+s*CB, 0 , 0 , -1/R2 , 0 ], 20 | [ -s*CT1 , 0 , 0 , 0 ,1/RT1+s*CT1, 0 , 0 , 0 ], 21 | [ 0 , 0 , 0 , 0 , 0 ,1/RT2+s*CT2, -s*CT2 , 0 ], 22 | [ 0 , 0 , 0 , -1/R2 , 0 , -s*CT2 ,1/R2+1/RF+s*CT2,-1/RF], 23 | [ 0 , 0 , -1/R3 , 0 , -1/RT1 , -1/RT2 , 0 , 0 ] 24 | )$ 25 | determinant(%)$ /* evaluates the determinant of the previous output % */ 26 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 27 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 28 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 29 | /* extract denominator coefficients in the powers of s to designated variables */ 30 | DEN_ZRe: coeff(pld,s,6); 31 | DEN_YIm: coeff(pld,s,5); 32 | DEN_XRe: coeff(pld,s,4); 33 | DEN_AIm: coeff(pld,s,3); 34 | DEN_BRe: coeff(pld,s,2); 35 | DEN_CIm: coeff(pld,s,1); 36 | DEN_DRe: coeff(pld,s,0); 37 | 38 | /* matrix to solve Vout/Vin using Cramer's rule */ 39 | matrix( 40 | [ -1/R1 ,1/R1+1/RB1+s*CB, -1/RB1 , -s*CB , 0 , 0 , 0 ], 41 | [ 0 , -1/RB1 ,1/RB1+1/RB2+1/R3, -1/RB2 , 0 , 0 , 0 ], 42 | [ 0 , -s*CB , -1/RB2 ,1/RB2+1/R2+s*CB, 0 , 0 , -1/R2 ], 43 | [ -s*CT1 , 0 , 0 , 0 ,1/RT1+s*CT1, 0 , 0 ], 44 | [ 0 , 0 , 0 , 0 , 0 ,1/RT2+s*CT2, -s*CT2 ], 45 | [ 0 , 0 , 0 , -1/R2 , 0 , -s*CT2 ,1/R2+1/RF+s*CT2], 46 | [ 0 , 0 , -1/R3 , 0 , -1/RT1 , -1/RT2 , 0 ] 47 | )$ 48 | M1_8: determinant(%)$ 49 | NUM_fs: factor(%)$ 50 | NUM_den: denom(NUM_fs)$ 51 | /* expand to common denominator for numerator and denominator in Cramer's division */ 52 | pln: expand((-1/RIN)*num(NUM_fs)*DEN_den/NUM_den)$ 53 | /* extract numerator coefficients in the powers of s to designated variables */ 54 | NUM_ZRe: coeff(pln,s,6); 55 | NUM_YIm: coeff(pln,s,5); 56 | NUM_XRe: coeff(pln,s,4); 57 | NUM_AIm: coeff(pln,s,3); 58 | NUM_BRe: coeff(pln,s,2); 59 | NUM_CIm: coeff(pln,s,1); 60 | NUM_DRe: coeff(pln,s,0); 61 | DEN_den; 62 | NUM_den; 63 | DEN_den/NUM_den; 64 | -------------------------------------------------------------------------------- /maxima_files/marshall.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Marshall tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+RM2+1/(s*C3), -R1 , -1/(s*C3) , -RM2 ], 12 | [ -R1 ,R1+RT1+RT2+1/(s*C1)+1/(s*C2), -1/(s*C2) , -RT2 ], 13 | [ -1/(s*C3) , -1/(s*C2) ,RB+RM1+1/(s*C2)+1/(s*C3), -RB-RM1 ], 14 | [ -RM2 , -RT2 , -RB-RM1 ,RT2+RB+RM1+RM2+RL] 15 | )$ 16 | determinant(%)$ /* evaluates the determinant of the previous output % */ 17 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 18 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 19 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 20 | /* extract denominator coefficients in the powers of s to designated variables */ 21 | DEN_AIm: coeff(pld,s,3); 22 | DEN_BRe: coeff(pld,s,2); 23 | DEN_CIm: coeff(pld,s,1); 24 | DEN_DRe: coeff(pld,s,0); 25 | 26 | /* matrix to solve Iout using Cramer's rule */ 27 | matrix( 28 | [RIN+R1+RM2+1/(s*C3), -R1 , -1/(s*C3) , 1 ], 29 | [ -R1 ,R1+RT1+RT2+1/(s*C1)+1/(s*C2), -1/(s*C2) , 0 ], 30 | [ -1/(s*C3) , -1/(s*C2) ,RB+RM1+1/(s*C2)+1/(s*C3), 0 ], 31 | [ -RM2 , -RT2 , -RB-RM1 , 0 ] 32 | )$ 33 | determinant(%)$ 34 | NUM_fs: factor(%)$ 35 | NUM_den: denom(NUM_fs)$ 36 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 37 | /* extract numerator coefficients in the powers of s to designated variables */ 38 | NUM_AIm: coeff(pln,s,3); 39 | NUM_BRe: coeff(pln,s,2); 40 | NUM_CIm: coeff(pln,s,1); 41 | NUM_DRe: coeff(pln,s,0); 42 | DEN_den; 43 | NUM_den; 44 | DEN_den/NUM_den; 45 | -------------------------------------------------------------------------------- /maxima_files/nevehilo.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* Jarmo L. 14.9.2018 */ 5 | 6 | /* This variation of a James/Baxandall two-band shelving tone stack offers: */ 7 | /* - active circuitry (opamp w/ negative feedback) */ 8 | /* - three capacitors in the bass control */ 9 | /* - three capacitors in the treble control */ 10 | /* - attenuation of higher highs via additional feedback capacitor (CF) */ 11 | /* Charles Day 23.08.2021 */ 12 | 13 | 14 | /* Report the starting time */ 15 | timedate(); 16 | 17 | /* Set maxima options */ 18 | showtime: true$ /* Show computation and elapsed time for each step */ 19 | stardisp: true$ /* Multiplication is displayed with an asterisk between operands */ 20 | ratmx: true$ /* Matrix operations are performed in CRE */ 21 | 22 | 23 | /* Matrix of coefficients obtained from nodes in the circuit */ 24 | A:matrix( 25 | [ Y1 , -1/R1 , 0 , 0 , -1/ZT1 , 0 , 0 , 0 ], 26 | [ -1/R1 , Y2 , -1/RB1 , 0 , 0 , 0 , -s*C1 , 0 ], 27 | [ 0 , -1/RB1 , Y3 , -1/RB2 , 0 , 0 , -s*C6 , 0 ], 28 | [ 0 , 0 , -1/RB2 , Y4 , 0 , -1/R2 , -s*C2 , 0 ], 29 | [ -1/ZT1 , 0 , 0 , 0 , Y5 , -1/ZT2 , 0 , 0 ], 30 | [ 0 , 0 , 0 , -1/R2 , -1/ZT2 , Y6 , 0 , -1/RF ], 31 | [ 0 , -s*C1 , -s*C6 , -s*C2 , 0 , 0 , Y7 , 0 ], 32 | [ 0 , 0 , -1/R3 , 0 , -s*C3 , 0 , 0 , Y8 ] 33 | )$ 34 | 35 | /* Solve for the transfer function via Cramer's rule */ 36 | (-1/RIN)*(determinant(minor(A,1,8))/determinant(A))$ 37 | 38 | /* Replace the simplified admittances and impedances with full expressions */ 39 | ratsubst(1/RIN+1/R1+1/ZT1 , Y1 , %)$ 40 | ratsubst(1/R1+1/RB1+s*C1 , Y2 , %)$ 41 | ratsubst(1/R3+1/RB1+1/RB2+s*C6, Y3 , %)$ 42 | ratsubst(1/R2+1/RB2+s*C2 , Y4 , %)$ 43 | ratsubst(1/ZT1+1/ZT2+s*C3 , Y5 , %)$ 44 | ratsubst(1/R2+1/ZT2+1/RF , Y6 , %)$ 45 | ratsubst(1/R6+s*C1+s*C2+s*C6 , Y7 , %)$ 46 | ratsubst(-s*CF , Y8 , %)$ 47 | ratsubst(R4+RT1+1/(s*C4) , ZT1, %)$ 48 | ratsubst(R5+RT2+1/(s*C5) , ZT2, %)$ 49 | 50 | /* Separate the transfer function's numerator from its denominator */ 51 | fs:factor(%)$ 52 | pld: expand(denom(fs))$ 53 | pln: expand(num(fs))$ 54 | 55 | 56 | /* 57 | * Given a polynomial, this function returns an array of its coefficients 58 | * in increasing powers of the specified variable. For example, if p is a 59 | * polynomial in s like: 60 | * 3 2 61 | * a3*s + a2*s + a1*s + a0 62 | * 63 | * then coeffs(p,s) would return [a0, a1, a2, a3]. 64 | * 65 | */ 66 | coeffs(p,x) := block([l], l : [], 67 | for i from hipow(p,x) thru 0 step -1 do 68 | (l : cons(coeff(p,x,i),l)), l)$ 69 | 70 | /* 71 | * This function factors each element of an array and returns the results 72 | * in a new array. 73 | */ 74 | factorarray(p) := block([l], l : [], 75 | for i from length(p) thru 1 step -1 do 76 | (l : cons(factor(p[i]),l)), l)$ 77 | 78 | /* Get the coefficients of the transfer function's denominator and numerator. */ 79 | facexpand: false$ /* Factor into recursive form, rather than expanded */ 80 | coeffs(pld,s)$ 81 | factorarray(%); 82 | coeffs(pln,s)$ 83 | factorarray(%); 84 | 85 | /* Report the finishing time */ 86 | timedate(); 87 | -------------------------------------------------------------------------------- /maxima_files/princeton_5e2.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for 5e2 tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 12.2.2021 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+RT1+RT2+1/(s*C1)+1/(s*C2), -RT1-1/(s*C1) , -RT2-1/(s*C2) , 0], 12 | [-RT1-1/(s*C1) , RT1+R1+1/(s*C1)+1/(s*C3), 0 , 0], 13 | [-RT2-1/(s*C2) , 0 , RV1+RV2+RT2+1/(s*C2), -RV2], 14 | [0 , 0 , -RV2 , RV2+RL] 15 | )$ 16 | determinant(%)$ /* evaluates the determinant of the previous output % */ 17 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 18 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 19 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 20 | /* extract denominator coefficients in the powers of s to designated variables */ 21 | DEN_AIm: coeff(pld,s,3); 22 | DEN_BRe: coeff(pld,s,2); 23 | DEN_CIm: coeff(pld,s,1); 24 | DEN_DRe: coeff(pld,s,0); 25 | 26 | /* matrix to solve Iout using Cramer's rule */ 27 | matrix( 28 | [RIN+RT1+RT2+1/(s*C1)+1/(s*C2), -RT1-1/(s*C1) , -RT2-1/(s*C2) , 1], 29 | [-RT1-1/(s*C1) , RT1+R1+1/(s*C1)+1/(s*C3), 0 , 0], 30 | [-RT2-1/(s*C2) , 0 , RV1+RV2+RT2+1/(s*C2), 0], 31 | [0 , 0 , -RV2 , 0] 32 | )$ 33 | determinant(%)$ 34 | NUM_fs: factor(%)$ 35 | NUM_den: denom(NUM_fs)$ 36 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 37 | /* extract numerator coefficients in the powers of s to designated variables */ 38 | NUM_AIm: coeff(pln,s,3); 39 | NUM_BRe: coeff(pln,s,2); 40 | NUM_CIm: coeff(pln,s,1); 41 | NUM_DRe: coeff(pln,s,0); 42 | DEN_den; 43 | NUM_den; 44 | DEN_den/NUM_den; 45 | -------------------------------------------------------------------------------- /maxima_files/princeton_5f2a.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for f52a tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 10.4.2020 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+RT2+1/(s*C1)+1/(s*C2), -RT2-1/(s*C2) , 0 , 0 ], 12 | [ -RT2-1/(s*C2) ,RT2+RV1+RV2+1/(s*C2), -RV1 , -RV2 ], 13 | [ 0 , -RV1 ,RV1+RT1+1/(s*C3), 0 ], 14 | [ 0 , -RV2 , 0 ,RV2+RL] 15 | )$ 16 | determinant(%)$ /* evaluates the determinant of the previous output % */ 17 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 18 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 19 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 20 | /* extract denominator coefficients in the powers of s to designated variables */ 21 | DEN_AIm: coeff(pld,s,3); 22 | DEN_BRe: coeff(pld,s,2); 23 | DEN_CIm: coeff(pld,s,1); 24 | DEN_DRe: coeff(pld,s,0); 25 | 26 | /* matrix to solve Iout using Cramer's rule */ 27 | matrix( 28 | [RIN+RT2+1/(s*C1)+1/(s*C2), -RT2-1/(s*C2) , 0 , 1 ], 29 | [ -RT2-1/(s*C2) ,RT2+RV1+RV2+1/(s*C2), -RV1 , 0 ], 30 | [ 0 , -RV1 ,RV1+RT1+1/(s*C3), 0 ], 31 | [ 0 , -RV2 , 0 , 0 ] 32 | )$ 33 | determinant(%)$ 34 | NUM_fs: factor(%)$ 35 | NUM_den: denom(NUM_fs)$ 36 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 37 | /* extract numerator coefficients in the powers of s to designated variables */ 38 | NUM_AIm: coeff(pln,s,3); 39 | NUM_BRe: coeff(pln,s,2); 40 | NUM_CIm: coeff(pln,s,1); 41 | NUM_DRe: coeff(pln,s,0); 42 | DEN_den; 43 | NUM_den; 44 | DEN_den/NUM_den; 45 | -------------------------------------------------------------------------------- /maxima_files/projunior.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for ProJunior tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 17.7.2020 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | writefile("den_junior.txt"); 10 | /* matrix obtained from current loops in the circuit */ 11 | matrix([RIN+R1+1/(s*C1)+1/(s*C2), -1/(s*C2) , -R1 , 0 , 0 , 0], 12 | [-1/(s*C2) , 1/(s*C2)+R2 , 0 , 0 , 0 , 0], 13 | [-R1 , 0 , R1+RT2+1/(s*C4), 0 , -1/(s*C4)-RT2 , 0], 14 | [0 , 0 , 0 , RV1+RT1+1/(s*C3), -RT1-1/(s*C3) , 0], 15 | [0 , 0 , -1/(s*C4)-RT2 , -RT1-1/(s*C3) , RV2+RT1+RT2+1/(s*C3)+1/(s*C4), -RV2], 16 | [0 , 0 , 0 , 0 , -RV2 , RV2+R3+RL ])$ 17 | determinant(%)$ /* evaluates the determinant of the previous output % */ 18 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 19 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 20 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 21 | /* extract denominator coefficients in the powers of s to designated variables */ 22 | DEN_YIm: coeff(pld,s,5); 23 | DEN_XRe: coeff(pld,s,4); 24 | DEN_AIm: coeff(pld,s,3); 25 | DEN_BRe: coeff(pld,s,2); 26 | DEN_CIm: coeff(pld,s,1); 27 | DEN_DRe: coeff(pld,s,0); 28 | closefile(); 29 | 30 | /* matrix to solve Iout using Cramer's rule */ 31 | writefile("num_junior.txt"); 32 | matrix([RIN+R1+1/(s*C1)+1/(s*C2), -1/(s*C2) , -R1 , 0 , 0 , 1], 33 | [-1/(s*C2) , 1/(s*C2)+R2 , 0 , 0 , 0 , 0], 34 | [-R1 , 0 , R1+RT2+1/(s*C4), 0 , -1/(s*C4)-RT2 , 0], 35 | [0 , 0 , 0 , RV1+RT1+1/(s*C3), -RT1-1/(s*C3) , 0], 36 | [0 , 0 , -1/(s*C4)-RT2 , -RT1-1/(s*C3) , RV2+RT1+RT2+1/(s*C3)+1/(s*C4), 0], 37 | [0 , 0 , 0 , 0 , -RV2 , 0 ])$ 38 | determinant(%)$ /* evaluates the determinant of the previous output % */ 39 | NUM_fs: factor(%)$ 40 | NUM_den: denom(NUM_fs)$ 41 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 42 | /* extract numerator coefficients in the powers of s to designated variables */ 43 | NUM_YIm: coeff(pln,s,5); 44 | NUM_XRe: coeff(pln,s,4); 45 | NUM_AIm: coeff(pln,s,3); 46 | NUM_BRe: coeff(pln,s,2); 47 | NUM_CIm: coeff(pln,s,1); 48 | NUM_DRe: coeff(pln,s,0); 49 | DEN_den; 50 | NUM_den; 51 | DEN_den/NUM_den; 52 | closefile(); 53 | -------------------------------------------------------------------------------- /maxima_files/swtc1.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for SWTC1 tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+RT1+1/(s*C1), -1/(s*C1) , 0 ], 12 | [ -1/(s*C1) , RT2+RV1+RV2+1/(s*C1), -RV2 ], 13 | [ 0 , -RV2 , RV2+RL ] 14 | )$ 15 | determinant(%)$ /* evaluates the determinant of the previous output % */ 16 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 17 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 18 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 19 | /* extract denominator coefficients in the powers of s to designated variables */ 20 | DEN_BRe: coeff(pld,s,2); 21 | DEN_CIm: coeff(pld,s,1); 22 | DEN_DRe: coeff(pld,s,0); 23 | 24 | /* matrix to solve Iout using Cramer's rule */ 25 | matrix( 26 | [RIN+R1+RT1+1/(s*C1), -1/(s*C1) , 1 ], 27 | [ -1/(s*C1) , RT2+RV1+RV2+1/(s*C1), 0 ], 28 | [ 0 , -RV2 , 0 ] 29 | )$ 30 | determinant(%)$ /* evaluates the determinant of the previous output % */ 31 | NUM_fs: factor(%)$ 32 | NUM_den: denom(NUM_fs)$ 33 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 34 | /* extract numerator coefficients in the powers of s to designated variables */ 35 | NUM_BRe: coeff(pln,s,2); 36 | NUM_CIm: coeff(pln,s,1); 37 | NUM_DRe: coeff(pln,s,0); 38 | DEN_den; 39 | NUM_den; 40 | DEN_den/NUM_den; 41 | 42 | 43 | -------------------------------------------------------------------------------- /maxima_files/swtc2.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for SWTC2 tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+RT1+RT2+RV1+RV2, -RT2 , -RV2 ], 12 | [ -RT2 , RT2+1/(s*C1) , 0 ], 13 | [ -RV2 , 0 , RV2+RL ] 14 | )$ 15 | determinant(%)$ /* evaluates the determinant of the previous output % */ 16 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 17 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 18 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 19 | /* extract denominator coefficients in the powers of s to designated variables */ 20 | DEN_BRe: coeff(pld,s,2); 21 | DEN_CIm: coeff(pld,s,1); 22 | DEN_DRe: coeff(pld,s,0); 23 | 24 | /* matrix to solve Iout using Cramer's rule */ 25 | matrix( 26 | [RIN+R1+RT1+RT2+RV1+RV2, -RT2 , 1 ], 27 | [ -RT2 , RT2+1/(s*C1) , 0 ], 28 | [ -RV2 , 0 , 0 ] 29 | )$ 30 | determinant(%)$ /* evaluates the determinant of the previous output % */ 31 | NUM_fs: factor(%)$ 32 | NUM_den: denom(NUM_fs)$ 33 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 34 | /* extract numerator coefficients in the powers of s to designated variables */ 35 | NUM_BRe: coeff(pln,s,2); 36 | NUM_CIm: coeff(pln,s,1); 37 | NUM_DRe: coeff(pln,s,0); 38 | DEN_den; 39 | NUM_den; 40 | DEN_den/NUM_den; 41 | 42 | 43 | -------------------------------------------------------------------------------- /maxima_files/swtc3.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for SWTC3 tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+RT2+1/(s*C1) , -1/(s*C1) , -RT2 , 0 ], 12 | [ -1/(s*C1) , R2+RT1+1/(s*C1) , -RT1 , 0 ], 13 | [ -RT2 , -RT1 , RT1+RT2+RV1+RV2 , -RV2 ], 14 | [ 0 , 0 , -RV2 , RV2+RL ] 15 | )$ 16 | determinant(%)$ /* evaluates the determinant of the previous output % */ 17 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 18 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 19 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 20 | /* extract denominator coefficients in the powers of s to designated variables */ 21 | DEN_BRe: coeff(pld,s,2); 22 | DEN_CIm: coeff(pld,s,1); 23 | DEN_DRe: coeff(pld,s,0); 24 | 25 | /* matrix to solve Iout using Cramer's rule */ 26 | matrix( 27 | [RIN+R1+RT2+1/(s*C1) , -1/(s*C1) , -RT2 , 1 ], 28 | [ -1/(s*C1) , R2+RT1+1/(s*C1) , -RT1 , 0 ], 29 | [ -RT2 , -RT1 , RT1+RT2+RV1+RV2 , 0 ], 30 | [ 0 , 0 , -RV2 , 0 ] 31 | )$ 32 | determinant(%)$ /* evaluates the determinant of the previous output % */ 33 | NUM_fs: factor(%)$ 34 | NUM_den: denom(NUM_fs)$ 35 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 36 | /* extract numerator coefficients in the powers of s to designated variables */ 37 | NUM_BRe: coeff(pln,s,2); 38 | NUM_CIm: coeff(pln,s,1); 39 | NUM_DRe: coeff(pln,s,0); 40 | DEN_den; 41 | NUM_den; 42 | DEN_den/NUM_den; 43 | 44 | 45 | -------------------------------------------------------------------------------- /maxima_files/swtc4.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for SWTC3 tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+1/(s*C1) , -1/(s*C1) , 0 , 0 ], 12 | [ -1/(s*C1) , RT2+RT1+1/(s*C1)+1/(s*C2) , -RT2-1/(s*C2) , 0 ], 13 | [ 0 , -RT2-1/(s*C2) , RT2+RV1+RV2+1/(s*C2) , -RV2 ], 14 | [ 0 , 0 , -RV2 , RV2+RL ] 15 | )$ 16 | determinant(%)$ /* evaluates the determinant of the previous output % */ 17 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 18 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 19 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 20 | /* extract denominator coefficients in the powers of s to designated variables */ 21 | DEN_BRe: coeff(pld,s,2); 22 | DEN_CIm: coeff(pld,s,1); 23 | DEN_DRe: coeff(pld,s,0); 24 | 25 | /* matrix to solve Iout using Cramer's rule */ 26 | matrix( 27 | [RIN+R1+1/(s*C1) , -1/(s*C1) , 0 , 1 ], 28 | [ -1/(s*C1) , RT2+RT1+1/(s*C1)+1/(s*C2) , -RT2-1/(s*C2) , 0 ], 29 | [ 0 , -RT2-1/(s*C2) , RT2+RV1+RV2+1/(s*C2) , 0 ], 30 | [ 0 , 0 , -RV2 , 0 ] 31 | )$ 32 | determinant(%)$ /* evaluates the determinant of the previous output % */ 33 | NUM_fs: factor(%)$ 34 | NUM_den: denom(NUM_fs)$ 35 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 36 | /* extract numerator coefficients in the powers of s to designated variables */ 37 | NUM_BRe: coeff(pln,s,2); 38 | NUM_CIm: coeff(pln,s,1); 39 | NUM_DRe: coeff(pln,s,0); 40 | DEN_den; 41 | NUM_den; 42 | DEN_den/NUM_den; 43 | 44 | 45 | -------------------------------------------------------------------------------- /maxima_files/tilt.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Tilt tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 21.1.2023 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | Z1: (1 + s*C1*R1)/(s*C1)$ 10 | Z2: (1 + s*C2*R2)/(s*C2)$ 11 | /* matrix obtained from current loops in the circuit */ 12 | matrix( 13 | [1/RIN+1/RF1+1/Z1 , -1/RF1 , -1/Z1 , 0 ], 14 | [ -1/RF1 , 1/RF1+1/RT1+1/Z2 , 0 , -1/Z2 ], 15 | [ 0 , - 1/RT1 , -1/RT2 , 0 ], 16 | [ -1/Z1 , 0 , 1/Z1+1/RT2+1/RF2 , -1/RF2 ] 17 | )$ 18 | determinant(%)$ /* evaluates the determinant of the previous output % */ 19 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 20 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 21 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 22 | /* extract denominator coefficients in the powers of s to designated variables */ 23 | DEN_AIm: coeff(pld,s,3); 24 | DEN_BRe: coeff(pld,s,2); 25 | DEN_CIm: coeff(pld,s,1); 26 | DEN_DRe: coeff(pld,s,0); 27 | 28 | /* matrix to solve Iout using Cramer's rule */ 29 | matrix( 30 | [1/RIN+1/RF1+1/Z1 , -1/RF1 , -1/Z1 , -1/RIN ], 31 | [ -1/RF1 , 1/RF1+1/RT1+1/Z2 , 0 , 0 ], 32 | [ 0 , - 1/RT1 , -1/RT2 , 0 ], 33 | [ -1/Z1 , 0 , 1/Z1+1/RT2+1/RF2 , 0 ] 34 | )$ 35 | determinant(%)$ 36 | NUM_fs: factor(%)$ 37 | NUM_den: denom(NUM_fs)$ 38 | pln: expand(num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 39 | /* extract numerator coefficients in the powers of s to designated variables */ 40 | NUM_AIm: coeff(pln,s,3); 41 | NUM_BRe: coeff(pln,s,2); 42 | NUM_CIm: coeff(pln,s,1); 43 | NUM_DRe: coeff(pln,s,0); 44 | DEN_den; 45 | NUM_den; 46 | DEN_den/NUM_den; 47 | 48 | 49 | -------------------------------------------------------------------------------- /maxima_files/vox.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for Vox tone control circuit as Vout/Vin */ 5 | /* Jarmo L. 14.9.2018 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | matrix( 11 | [RIN+R1+R2+1/(s*C3), -R1 , -1/(s*C3) , -R2 , 0 ], 12 | [ -R1 ,R1+RT1+RT2+1/(s*C1)+1/(s*C2), -1/(s*C2) , 0 , -RT2 ], 13 | [ -1/(s*C3) , -1/(s*C2) ,RB1+1/(s*C2)+1/(s*C3), 0 , -RB1 ], 14 | [ -R2 , 0 , 0 ,R2+RB2, -RB2 ], 15 | [ 0 , -RT2 , -RB1 , -RB2 ,RT2+RB1+RB2+RL] 16 | )$ 17 | determinant(%)$ /* evaluates the determinant of the previous output % */ 18 | DEN_fs: factor(%)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 19 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 20 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 21 | /* extract denominator coefficients in the powers of s to designated variables */ 22 | DEN_AIm: coeff(pld,s,3); 23 | DEN_BRe: coeff(pld,s,2); 24 | DEN_CIm: coeff(pld,s,1); 25 | DEN_DRe: coeff(pld,s,0); 26 | 27 | /* matrix to solve Iout using Cramer's rule */ 28 | matrix( 29 | [RIN+R1+R2+1/(s*C3), -R1 , -1/(s*C3) , -R2 , 1 ], 30 | [ -R1 ,R1+RT1+RT2+1/(s*C1)+1/(s*C2), -1/(s*C2) , 0 , 0 ], 31 | [ -1/(s*C3) , -1/(s*C2) ,RB1+1/(s*C2)+1/(s*C3), 0 , 0 ], 32 | [ -R2 , 0 , 0 ,R2+RB2, 0 ], 33 | [ 0 , -RT2 , -RB1 , -RB2 , 0 ] 34 | )$ 35 | determinant(%)$ 36 | NUM_fs: factor(%)$ 37 | NUM_den: denom(NUM_fs)$ 38 | pln: expand(RL*num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 39 | /* extract numerator coefficients in the powers of s to designated variables */ 40 | NUM_AIm: coeff(pln,s,3); 41 | NUM_BRe: coeff(pln,s,2); 42 | NUM_CIm: coeff(pln,s,1); 43 | NUM_DRe: coeff(pln,s,0); 44 | DEN_den; 45 | NUM_den; 46 | DEN_den/NUM_den; 47 | -------------------------------------------------------------------------------- /maxima_files/wah.txt: -------------------------------------------------------------------------------- 1 | /* Maxima batch file for solving circuit transfer function from matrix representation */ 2 | /* in symbolic form using Cramer's rule. The numerator and denominator expressions are */ 3 | /* evaluated separately as polynomial coefficients in powers of complex variable s. */ 4 | /* This example solves the coefficients for crybaby wah filter circuit as Vout/Vin */ 5 | /* Jarmo L. 9.8.2019 */ 6 | 7 | stardisp: true$ /* multiplication is displayed with an asterisk between operands */ 8 | ratmx: true$ /* matrix operations are performed in CRE */ 9 | /* matrix obtained from current loops in the circuit */ 10 | writefile("den_wah.txt"); 11 | matrix( 12 | [1/RI+s*CI, -s*CI , 0 , 0 , 0 , 0 , 0 , 0 , 0], 13 | [-s*CI , s*CI+1/rpi1+1/RF, 0 , 0 , 0 , 0 , -1/RF , 0 , 0], 14 | [0 , B1/rpi1 ,1/RC1+1/RB1+1/RB2+s*C2, -s*C2 , -1/RB2 , 0 , 0 , -1/RB1 , 0], 15 | [0 , 0 , -s*C2 ,s*C2+1/RG1, 0 , 0 , 0 , 0 , -1/RG1], 16 | [0 , 0 , -1/RB2 , 0 ,1/RB2+1/rpi2+s*C3, -1/rpi2 , 0 , 0 , -s*C3], 17 | [0 , 0 , 0 , 0 ,-B2/rpi2-1/rpi2 ,B2/rpi2+1/rpi2+1/RE2+s*C, -s*C , 0 , 0], 18 | [0 , -1/RF , 0 , 0 , 0 , -s*C ,s*C+1/(s*L)+1/RF+1/RQ,-1/RQ-1/(s*L) , 0], 19 | [0 , 0 , -1/RB1 , 0 , 0 , 0 ,-1/RQ-1/(s*L) ,1/RQ+1/(s*L)+1/RB1+1/RB12+s*CB1, 0], 20 | [0 , 0 , 0 , -1/RG1 , -s*C3 , 0 , 0 , 0 , s*C3+1/RG1+1/RG2] 21 | )$ 22 | det1: determinant(%)$ /* evaluates the determinant of the previous output % */ 23 | DEN_fs: factor(det1)$ /* expands the result and factors to common denominator, save to variable DEN_fs */ 24 | DEN_den: denom(DEN_fs)$ /* saves a variable DEN_den for denominator expression */ 25 | pld: num(DEN_fs)$ /* saves a variable pld for numerator expression */ 26 | /* extract denominator coefficients in the powers of s to designated variables */ 27 | DEN_ZRe: coeff(pld,s,6); 28 | DEN_YIm: coeff(pld,s,5); 29 | DEN_XRe: coeff(pld,s,4); 30 | DEN_AIm: coeff(pld,s,3); 31 | DEN_BRe: coeff(pld,s,2); 32 | DEN_CIm: coeff(pld,s,1); 33 | DEN_DRe: coeff(pld,s,0); 34 | closefile(); 35 | 36 | /* matrix to solve Iout using Cramer's rule */ 37 | writefile("num_wah.txt"); 38 | matrix( 39 | [-s*CI , s*CI+1/rpi1+1/RF, 0 , 0 , 0 , -1/RF , 0 , 0], 40 | [0 , B1/rpi1 ,1/RC1+1/RB1+1/RB2+s*C2, -1/RB2 , 0 , 0 , -1/RB1 , 0], 41 | [0 , 0 , -s*C2 , 0 , 0 , 0 , 0 , -1/RG1], 42 | [0 , 0 , -1/RB2 ,1/RB2+1/rpi2+s*C3, -1/rpi2 , 0 , 0 , -s*C3], 43 | [0 , 0 , 0 ,-B2/rpi2-1/rpi2 ,B2/rpi2+1/rpi2+1/RE2+s*C, -s*C , 0 , 0], 44 | [0 , -1/RF , 0 , 0 , -s*C ,s*C+1/(s*L)+1/RF+1/RQ,-1/RQ-1/(s*L) , 0], 45 | [0 , 0 , -1/RB1 , 0 , 0 ,-1/RQ-1/(s*L) ,1/RQ+1/(s*L)+1/RB1+1/RB12+s*CB1, 0], 46 | [0 , 0 , 0 , -s*C3 , 0 , 0 , 0 , s*C3+1/RG1+1/RG2] 47 | )$ 48 | Ib: (-1/RI)*determinant(%)$ 49 | NUM_fs: factor(%)$ 50 | NUM_den: denom(NUM_fs)$ 51 | pln: expand(num(NUM_fs)*DEN_den/NUM_den)$ /* expand to common denominator for numerator and denominator in Cramer's division */ 52 | /* extract numerator coefficients in the powers of s to designated variables */ 53 | NUM_ZRe: coeff(pln,s,6); 54 | NUM_YIm: coeff(pln,s,5); 55 | NUM_XRe: coeff(pln,s,4); 56 | NUM_AIm: coeff(pln,s,3); 57 | NUM_BRe: coeff(pln,s,2); 58 | NUM_CIm: coeff(pln,s,1); 59 | NUM_DRe: coeff(pln,s,0); 60 | DEN_den; 61 | NUM_den; 62 | DEN_den/NUM_den; 63 | closefile(); 64 | 65 | -------------------------------------------------------------------------------- /nevehilo_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/nevehilo_pic.png -------------------------------------------------------------------------------- /nouislider.css: -------------------------------------------------------------------------------- 1 | /*! nouislider - 10.0.0 - 2017-05-28 14:52:48 */ 2 | /* Functional styling; 3 | * These styles are required for noUiSlider to function. 4 | * You don't need to change these rules to apply your design. 5 | */ 6 | .noUi-target, 7 | .noUi-target * { 8 | -webkit-touch-callout: none; 9 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 10 | -webkit-user-select: none; 11 | -ms-touch-action: none; 12 | touch-action: none; 13 | -ms-user-select: none; 14 | -moz-user-select: none; 15 | user-select: none; 16 | -moz-box-sizing: border-box; 17 | box-sizing: border-box; 18 | } 19 | .noUi-target { 20 | position: relative; 21 | direction: ltr; 22 | } 23 | .noUi-base { 24 | width: 100%; 25 | height: 100%; 26 | position: relative; 27 | z-index: 1; 28 | /* Fix 401 */ 29 | } 30 | .noUi-connect { 31 | position: absolute; 32 | right: 0; 33 | top: 0; 34 | left: 0; 35 | bottom: 0; 36 | } 37 | .noUi-origin { 38 | position: absolute; 39 | height: 0; 40 | width: 0; 41 | } 42 | .noUi-handle { 43 | position: relative; 44 | z-index: 1; 45 | } 46 | .noUi-state-tap .noUi-connect, 47 | .noUi-state-tap .noUi-origin { 48 | -webkit-transition: top 0.3s, right 0.3s, bottom 0.3s, left 0.3s; 49 | transition: top 0.3s, right 0.3s, bottom 0.3s, left 0.3s; 50 | } 51 | .noUi-state-drag * { 52 | cursor: inherit !important; 53 | } 54 | /* Painting and performance; 55 | * Browsers can paint handles in their own layer. 56 | */ 57 | .noUi-base, 58 | .noUi-handle { 59 | -webkit-transform: translate3d(0, 0, 0); 60 | transform: translate3d(0, 0, 0); 61 | } 62 | /* Slider size and handle placement; 63 | */ 64 | .noUi-horizontal { 65 | height: 10px; 66 | } 67 | .noUi-horizontal .noUi-handle { 68 | width: 34px; 69 | height: 18px; 70 | left: -17px; 71 | top: -4px; 72 | } 73 | .noUi-vertical { 74 | width: 18px; 75 | } 76 | .noUi-vertical .noUi-handle { 77 | width: 28px; 78 | height: 34px; 79 | left: -6px; 80 | top: -17px; 81 | } 82 | /* Styling; 83 | */ 84 | .noUi-target { 85 | background: #FAFAFA; 86 | border-radius: 4px; 87 | border: 1px solid #D3D3D3; 88 | box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB; 89 | } 90 | .noUi-connect { 91 | background: #3FB8AF; 92 | border-radius: 4px; 93 | box-shadow: inset 0 0 3px rgba(51, 51, 51, 0.45); 94 | -webkit-transition: background 450ms; 95 | transition: background 450ms; 96 | } 97 | /* Handles and cursors; 98 | */ 99 | .noUi-draggable { 100 | cursor: ew-resize; 101 | } 102 | .noUi-vertical .noUi-draggable { 103 | cursor: ns-resize; 104 | } 105 | .noUi-handle { 106 | border: 1px solid #05B; 107 | border-radius: 3px; 108 | background: #08D; 109 | cursor: default; 110 | 111 | } 112 | .noUi-active { 113 | box-shadow: inset 0 0 1px #DDD, inset 0 1px 7px #FF, 0 3px 6px -3px #BBB; 114 | } 115 | /* Handle stripes; 116 | */ 117 | .noUi-handle:before, 118 | .noUi-handle:after { 119 | content: ""; 120 | display: block; 121 | position: absolute; 122 | height: 10px; 123 | width: 1px; 124 | background: #046; 125 | left: 14px; 126 | top: 3px; 127 | } 128 | .noUi-handle:after { 129 | left: 17px; 130 | } 131 | .noUi-vertical .noUi-handle:before, 132 | .noUi-vertical .noUi-handle:after { 133 | width: 14px; 134 | height: 1px; 135 | left: 6px; 136 | top: 14px; 137 | } 138 | .noUi-vertical .noUi-handle:after { 139 | top: 17px; 140 | } 141 | /* Disabled state; 142 | */ 143 | [disabled] .noUi-connect { 144 | background: #B8B8B8; 145 | } 146 | [disabled].noUi-target, 147 | [disabled].noUi-handle, 148 | [disabled] .noUi-handle { 149 | cursor: not-allowed; 150 | } 151 | /* Base; 152 | * 153 | */ 154 | .noUi-pips, 155 | .noUi-pips * { 156 | -moz-box-sizing: border-box; 157 | box-sizing: border-box; 158 | } 159 | .noUi-pips { 160 | position: absolute; 161 | color: #000; 162 | font-size: 12px; 163 | } 164 | /* Values; 165 | * 166 | */ 167 | .noUi-value { 168 | position: absolute; 169 | white-space: nowrap; 170 | text-align: center; 171 | } 172 | .noUi-value-sub { 173 | color: #ccc; 174 | font-size: 10px; 175 | } 176 | /* Markings; 177 | * 178 | */ 179 | .noUi-marker { 180 | position: absolute; 181 | background: #CCC; 182 | } 183 | .noUi-marker-sub { 184 | background: #AAA; 185 | } 186 | .noUi-marker-large { 187 | background: #AAA; 188 | } 189 | /* Horizontal layout; 190 | * 191 | */ 192 | .noUi-pips-horizontal { 193 | padding: 5px 0; 194 | height: 80px; 195 | top: 100%; 196 | left: 0; 197 | width: 100%; 198 | } 199 | .noUi-value-horizontal { 200 | -webkit-transform: translate3d(-50%, 50%, 0); 201 | transform: translate3d(-50%, 100%, 0); 202 | } 203 | .noUi-marker-horizontal.noUi-marker { 204 | margin-left: -1px; 205 | width: 2px; 206 | height: 5px; 207 | } 208 | .noUi-marker-horizontal.noUi-marker-sub { 209 | height: 5px; 210 | } 211 | .noUi-marker-horizontal.noUi-marker-large { 212 | height: 10px; 213 | } 214 | /* Vertical layout; 215 | * 216 | */ 217 | .noUi-pips-vertical { 218 | padding: 0 10px; 219 | height: 100%; 220 | top: 0; 221 | left: 100%; 222 | } 223 | .noUi-value-vertical { 224 | -webkit-transform: translate3d(0, 50%, 0); 225 | transform: translate3d(0, 50%, 0); 226 | padding-left: 25px; 227 | } 228 | .noUi-marker-vertical.noUi-marker { 229 | width: 5px; 230 | height: 2px; 231 | margin-top: -1px; 232 | } 233 | .noUi-marker-vertical.noUi-marker-sub { 234 | width: 10px; 235 | } 236 | .noUi-marker-vertical.noUi-marker-large { 237 | width: 15px; 238 | } 239 | .noUi-tooltip { 240 | display: block; 241 | position: absolute; 242 | border: 1px solid #D9D9D9; 243 | border-radius: 3px; 244 | background: #fff; 245 | color: #000; 246 | padding: 5px; 247 | text-align: center; 248 | white-space: nowrap; 249 | } 250 | .noUi-horizontal .noUi-tooltip { 251 | -webkit-transform: translate(-50%, 0); 252 | transform: translate(-50%, 0); 253 | left: 50%; 254 | bottom: 120%; 255 | } 256 | .noUi-vertical .noUi-tooltip { 257 | -webkit-transform: translate(0, -50%); 258 | transform: translate(0, -50%); 259 | top: 50%; 260 | right: 120%; 261 | } 262 | -------------------------------------------------------------------------------- /nouislider.min.css: -------------------------------------------------------------------------------- 1 | /*! nouislider - 10.0.0 - 2017-05-28 14:52:48 */.noUi-target,.noUi-target *{-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-ms-touch-action:none;touch-action:none;-ms-user-select:none;-moz-user-select:none;user-select:none;-moz-box-sizing:border-box;box-sizing:border-box}.noUi-target{position:relative;direction:ltr}.noUi-base{width:100%;height:100%;position:relative;z-index:1}.noUi-connect{position:absolute;right:0;top:0;left:0;bottom:0}.noUi-origin{position:absolute;height:0;width:0}.noUi-handle{position:relative;z-index:1}.noUi-state-tap .noUi-connect,.noUi-state-tap .noUi-origin{-webkit-transition:top .3s,right .3s,bottom .3s,left .3s;transition:top .3s,right .3s,bottom .3s,left .3s}.noUi-state-drag *{cursor:inherit!important}.noUi-base,.noUi-handle{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.noUi-horizontal{height:18px}.noUi-horizontal .noUi-handle{width:34px;height:28px;left:-17px;top:-6px}.noUi-vertical{width:18px}.noUi-vertical .noUi-handle{width:28px;height:34px;left:-6px;top:-17px}.noUi-target{background:#FAFAFA;border-radius:4px;border:1px solid #D3D3D3;box-shadow:inset 0 1px 1px #F0F0F0,0 3px 6px -5px #BBB}.noUi-connect{background:#3FB8AF;border-radius:4px;box-shadow:inset 0 0 3px rgba(51,51,51,.45);-webkit-transition:background 450ms;transition:background 450ms}.noUi-draggable{cursor:ew-resize}.noUi-vertical .noUi-draggable{cursor:ns-resize}.noUi-handle{border:1px solid #D9D9D9;border-radius:3px;background:#FFF;cursor:default;box-shadow:inset 0 0 1px #FFF,inset 0 1px 7px #EBEBEB,0 3px 6px -3px #BBB}.noUi-active{box-shadow:inset 0 0 1px #FFF,inset 0 1px 7px #DDD,0 3px 6px -3px #BBB}.noUi-handle:after,.noUi-handle:before{content:"";display:block;position:absolute;height:14px;width:1px;background:#E8E7E6;left:14px;top:6px}.noUi-handle:after{left:17px}.noUi-vertical .noUi-handle:after,.noUi-vertical .noUi-handle:before{width:14px;height:1px;left:6px;top:14px}.noUi-vertical .noUi-handle:after{top:17px}[disabled] .noUi-connect{background:#B8B8B8}[disabled] .noUi-handle,[disabled].noUi-handle,[disabled].noUi-target{cursor:not-allowed}.noUi-pips,.noUi-pips *{-moz-box-sizing:border-box;box-sizing:border-box}.noUi-pips{position:absolute;color:#999}.noUi-value{position:absolute;white-space:nowrap;text-align:center}.noUi-value-sub{color:#ccc;font-size:10px}.noUi-marker{position:absolute;background:#CCC}.noUi-marker-large,.noUi-marker-sub{background:#AAA}.noUi-pips-horizontal{padding:10px 0;height:80px;top:100%;left:0;width:100%}.noUi-value-horizontal{-webkit-transform:translate3d(-50%,50%,0);transform:translate3d(-50%,50%,0)}.noUi-marker-horizontal.noUi-marker{margin-left:-1px;width:2px;height:5px}.noUi-marker-horizontal.noUi-marker-sub{height:10px}.noUi-marker-horizontal.noUi-marker-large{height:15px}.noUi-pips-vertical{padding:0 10px;height:100%;top:0;left:100%}.noUi-value-vertical{-webkit-transform:translate3d(0,50%,0);transform:translate3d(0,50%,0);padding-left:25px}.noUi-marker-vertical.noUi-marker{width:5px;height:2px;margin-top:-1px}.noUi-marker-vertical.noUi-marker-sub{width:10px}.noUi-marker-vertical.noUi-marker-large{width:15px}.noUi-tooltip{display:block;position:absolute;border:1px solid #D9D9D9;border-radius:3px;background:#fff;color:#000;padding:5px;text-align:center;white-space:nowrap}.noUi-horizontal .noUi-tooltip{-webkit-transform:translate(-50%,0);transform:translate(-50%,0);left:50%;bottom:120%}.noUi-vertical .noUi-tooltip{-webkit-transform:translate(0,-50%);transform:translate(0,-50%);top:50%;right:120%} -------------------------------------------------------------------------------- /princeton2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/princeton2_pic.png -------------------------------------------------------------------------------- /princeton5e2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/princeton5e2_pic.png -------------------------------------------------------------------------------- /projunior2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/projunior2_pic.png -------------------------------------------------------------------------------- /rlc.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Objects to support text input of values using multipliers or RKM codes 3 | * ---------------------------------------------------------------------------- 4 | * 5 | * This script creates objects for parsing text into numeric values. RKM codes 6 | * and common multipliers like "k" (kilo) are interpreted and reflected in the 7 | * resulting value. Each of the objects has the same properties and methods. 8 | * 9 | * The base class, TSCValue, can validate and parse unitless values. All values 10 | * must be positive. 11 | * 12 | * Example format Integer Float 13 | * --------------- ------- ------- 14 | * Numeric only 2500 0.0005 15 | * With multiplier 2.5k 500n 16 | * RKM code 2K5 m5 17 | * 18 | * Derived classes TSCResistance, TSCCapacitance, and TSCInductance can parse 19 | * text representing ohms, farads, and henries. Note that for capacitance, if 20 | * the parsed text contains only a number, the unit is assumed to be pF. For 21 | * inductance, the unit is assumed to be mH. 22 | * 23 | * For convenience, each class has been instantiated in global variables 24 | * tscValue, tscResistance, tscCapacitance, and tscInductance. 25 | * 26 | * 27 | * -- Properties -- 28 | * 29 | * value: numeric value of the parsed text 30 | * 31 | * formatted: a cleaned-up version of the parsed text 32 | * 33 | * 34 | * -- Methods -- 35 | * 36 | * parse: Parses the given text, and sets the value and formatted 37 | * properties accordingly. Returns true for valid text, and 38 | * false otherwise. 39 | * 40 | * parseElement: Given a text input element, parses its text, updates its 41 | * text with a cleaned-up version, and returns the value. 42 | * 43 | * validateElement: Given a text input element, parses its text. Returns true 44 | * for valid text. Otherwise, sets a helpful message for the 45 | * user and returns false. 46 | * 47 | */ 48 | 49 | 50 | 51 | /* 52 | * TSCValue: Base class for parsing unitless values, and containing properties 53 | * and methods for inheritance by classes using units. 54 | */ 55 | function TSCValue () { 56 | // Derived classes can override these as needed. 57 | 58 | // The multipliers properties pairs characters to multiplication factors. 59 | this.multipliers = { 60 | p : 1e-12, 61 | P : 1e-12, 62 | n : 1e-9, 63 | N : 1e-9, 64 | u : 1e-6, 65 | U : 1e-6, 66 | \u00b5 : 1e-6, 67 | \u03bc : 1e-6, 68 | m : 1e-3, 69 | k : 1e3, 70 | K : 1e3, 71 | M : 1e6, 72 | g : 1e9, 73 | G : 1e9, 74 | t : 1e12, 75 | T : 1e12, 76 | }; 77 | 78 | 79 | // The patternDecimal property defines a regular expression used to 80 | // determine the allowable patterns for an integer or floating point 81 | // value followed by a multiplier. The first group must capture the 82 | // numeric portion, and the second group must capture the multiplier. 83 | 84 | // Allow all multipliers by default 85 | var mults = Object.keys(this.multipliers).join(""); 86 | this.patternDecimal = new RegExp("^(\\d*\\.\\d*|\\d+)([" + mults + "])$"); 87 | 88 | 89 | // The patternRKM property defines a regular expression used to determine 90 | // the allowable patterns for RKM codes not already covered by the 91 | // patternDecimal pattern. The integer portion(s) of the code must be 92 | // captured by the first and third groups. Although both of these groups 93 | // are specified as optional in the regular expression, the parsing code 94 | // will test to ensure that at least one of them is non-empty. The 95 | // multiplier must be captured by the second group. 96 | this.patternRKM = new RegExp("^(\\d+)?([" + mults + "])(\\d+)?$"); 97 | 98 | 99 | // The tip property defines text to show the user when invalid input is 100 | // detected. 101 | this.tip = "Enter a value"; 102 | 103 | 104 | // The prefilter property specifies an optional function to perform any 105 | // custom manipulation of the text prior to parsing. The text is passed 106 | // as the parameter, and the function must return the filtered version. 107 | this.prefilter = undefined; 108 | 109 | 110 | // The defaultMultiplier property specifies a multiplier character to use 111 | // by default if the text does not specify one. This property is optional. 112 | this.defaultMultiplier = null; 113 | }; 114 | 115 | 116 | TSCValue.prototype.parse = function(str) { 117 | 118 | // Set default results 119 | this.value = 0; 120 | this.formatted = "0"; 121 | 122 | // Fail immediately if not given a string 123 | if (typeof str != "string") return false; 124 | 125 | // Remove all spaces and leading plus, and unneeded decimal points 126 | str = str.replace(/ +?/g, "") 127 | .replace(/^[\+]/, "") 128 | .replace(/\.([^\d])/g, "$1"); 129 | 130 | // Do any custom filtering defined for this instance. 131 | if (this.prefilter) { 132 | str = this.prefilter(str); 133 | } 134 | 135 | // Empty strings are accepted as zero. 136 | if (!str) return true; 137 | 138 | // Reject leading negative sign 139 | if (str.charAt(0) == "-") return false; 140 | 141 | var multiplier; 142 | var match = str.match(this.patternDecimal); 143 | if (match) { 144 | // Integer or decimal point float, followed by a multiplier. 145 | // No commas allowed. 18k, 1.8u, etc 146 | this.value = parseFloat(match[1]); 147 | multiplier = match[2]; 148 | this.formatted = str.replace(/^\./, "0.") 149 | } else if ((match = str.match(this.patternRKM)) && (match[1] || match[3])) { 150 | // RKM codes not matched earlier, like R5, 10R2, 1K87, 25M5 151 | this.value = parseFloat((match[1] || "0") + "." + (match[3] || "0")); 152 | multiplier = match[2]; 153 | this.formatted = str; 154 | } else if (!isNaN(str)) { 155 | // Purely numeric 156 | 157 | this.value = parseFloat(str); 158 | this.formatted = this.value.toString(); 159 | if (this.defaultMultiplier) { 160 | multiplier = this.defaultMultiplier; 161 | this.formatted += multiplier; 162 | } 163 | } else { 164 | // Unrecognized format 165 | return false; 166 | } 167 | 168 | // Recognized format. Use its multiplier. 169 | if (this.multipliers[multiplier]) { 170 | this.value *= this.multipliers[multiplier]; 171 | } 172 | 173 | return true; 174 | } 175 | 176 | 177 | /* 178 | * Utility method for performing validity tests. Given some text, and whether 179 | * the text is expected to be valid, logs the test result to the console. 180 | */ 181 | TSCValue.prototype.test = function(str, expectedValidity = true) { 182 | var valid = this.parse(str); 183 | var passed = (valid == expectedValidity); 184 | console.log(this.constructor.name + " test " + (passed? "OK" : "FAIL"), 185 | str, this.formatted, this.value, valid); 186 | return passed; 187 | } 188 | 189 | 190 | TSCValue.prototype.parseElement = function(el) { 191 | // Parse the element text 192 | this.parse(el.value); 193 | 194 | if (this.formatted) { 195 | // Update the element with the formatted value 196 | el.value = this.formatted; 197 | } 198 | 199 | return this.value; 200 | } 201 | 202 | 203 | TSCValue.prototype.validateElement = function(el) { 204 | 205 | // Check for valid format 206 | if (this.parse(el.value)) { 207 | el.setCustomValidity(""); 208 | return true; 209 | } 210 | 211 | // Validation failed 212 | el.setCustomValidity(this.tip); 213 | //console.log("validateElement", "failed", el.validity.customError, this.tip); 214 | el.reportValidity(); 215 | return false; 216 | } 217 | 218 | 219 | 220 | /* 221 | * TSCResistance: Class containing all customizations for resistance values 222 | */ 223 | function TSCResistance() { 224 | TSCValue.call(this); 225 | 226 | this.prefilter = function(str) { 227 | // Remove any units 228 | str = str.replace(/ohm[s]?$/i, "") 229 | .replace(/\u2126$/, ""); 230 | 231 | // Capitalize mega or giga multipliers (and convert "meg" used in SPICE.) 232 | // It is assumed that "m" means mega, not milli. 233 | str = str.replace(/meg$/i, "M") 234 | .replace("m", "M") 235 | .replace("g", "G"); 236 | 237 | return str; 238 | } 239 | 240 | this.patternDecimal = /^(\d*\.\d*|\d+)([kmg])$/i; 241 | this.patternRKM = /^(\d+)?([rkmg])(\d+)?$/i; 242 | this.tip = "Enter a resistance value.\nExamples: 2200, 2.2k, 2K2"; 243 | } 244 | TSCResistance.prototype = Object.create(TSCValue.prototype); 245 | TSCResistance.prototype.constructor = TSCResistance; 246 | 247 | 248 | 249 | /* 250 | * TSCCapacitance: Class containing all customizations for capacitance values 251 | */ 252 | function TSCCapacitance() { 253 | TSCValue.call(this); 254 | 255 | this.prefilter = function(str) { 256 | // Simplify any unit to single letter 257 | str = str.replace(/(f)(arad)?s?$/i, "$1"); 258 | return str; 259 | } 260 | 261 | this.patternDecimal = /^(\d*\.\d*|\d+)([pPnNuU\u00b5\u03bcmMfF])[fF]?$/; 262 | this.patternRKM = /^(\d+)?([pPnNuU\u00b5\u03bcmMfF])(\d+)?$/ 263 | this.tip = "Enter a capacitance value.\nExamples: 2200p, 2.2n, 2N2"; 264 | 265 | // If no multiplier is given, assume pico. Use "F" for whole Farads. 266 | this.defaultMultiplier = "p"; 267 | this.multipliers.f = 1; 268 | this.multipliers.F = 1; 269 | 270 | // Capital "M" is acceptable but only means milli, never mega. 271 | this.multipliers.M = 1e-3; 272 | } 273 | TSCCapacitance.prototype = Object.create(TSCValue.prototype); 274 | TSCCapacitance.prototype.constructor = TSCCapacitance; 275 | 276 | 277 | 278 | /* 279 | * TSCInductance: Class containing all customizations for inductance values 280 | */ 281 | function TSCInductance() { 282 | TSCValue.call(this); 283 | 284 | this.prefilter = function(str) { 285 | // Simplify any units to single letter 286 | str = str.replace(/(h)(enry|enrie)?s?$/i, "$1"); 287 | return str; 288 | } 289 | 290 | this.patternDecimal = /^(\d*\.\d*|\d+)([uU\u00b5\u03bcmMhH])[hH]?$/; 291 | this.patternRKM = /^(\d+)?([uU\u00b5\u03bcmMhH])(\d+)?$/ 292 | this.tip = "Enter an inductance.\nExamples: 2200m, 2.2H, 2H2"; 293 | 294 | // If no multiplier is given, assume milli. Use "H" for whole Henries. 295 | this.defaultMultiplier = "m"; 296 | this.multipliers.h = 1; 297 | this.multipliers.H = 1; 298 | 299 | // Capital "M" is acceptable but only means milli, never mega. 300 | this.multipliers.M = 1e-3; 301 | } 302 | TSCInductance.prototype = Object.create(TSCValue.prototype); 303 | TSCInductance.prototype.constructor = TSCInductance; 304 | 305 | 306 | 307 | var tscValue = new TSCValue; 308 | var tscResistance = new TSCResistance; 309 | var tscCapacitance = new TSCCapacitance; 310 | var tscInductance = new TSCInductance; 311 | 312 | -------------------------------------------------------------------------------- /rlc_test.js: -------------------------------------------------------------------------------- 1 | /* 2 | * rlc_test.js: unit tests for rlc.js parsing objects 3 | */ 4 | 5 | /* Tests: values without units */ 6 | tscValue.test("1k5 "); // Trailing space 7 | tscValue.test(" 1K5"); // Leading space 8 | tscValue.test("1"); // Integer w/o multiplier 9 | tscValue.test("0.1"); // Float w/o multiplier 10 | tscValue.test("1."); // Float w/o fractional w/o multiplier 11 | tscValue.test("1.p"); // Float w/o fractional w/ multiplier 12 | tscValue.test(".1"); // Float w/o whole w/o multiplier 13 | tscValue.test(".1p"); // Float w/o whole w/ multiplier 14 | tscValue.test(".", false); // Decimal point w/o multiplier 15 | tscValue.test(".p", false); // Decimal point w/ multiplier 16 | tscValue.test("1p"); // Integer pico 17 | tscValue.test("1.5P"); // Float pico 18 | tscValue.test("1P5"); // RKM mid pico 19 | tscValue.test("p5"); // RKM leading pico 20 | tscValue.test("1n"); // Integer nano 21 | tscValue.test("1.5N"); // Float nano 22 | tscValue.test("1N5"); // RKM mid nano 23 | tscValue.test("n5"); // RKM leading nano 24 | tscValue.test("1u"); // Integer micro (u) 25 | tscValue.test("1\u00b5"); // Integer micro (micro symbol) 26 | tscValue.test("1\u03bc"); // Integer micro (mu) 27 | tscValue.test("1.5U"); // Float micro (u) 28 | tscValue.test("1.5\u00b5"); // Float micro (micro symbol) 29 | tscValue.test("1.5\u03bc"); // Float micro (mu) 30 | tscValue.test("1U5"); // RKM mid micro (u) 31 | tscValue.test("1\u00b55"); // RKM mid micro (micro symbol) 32 | tscValue.test("1\u03bc5"); // RKM mid micro (mu) 33 | tscValue.test("u5"); // RKM leading micro (u) 34 | tscValue.test("\u00b55"); // RKM leading micro (micro symbol) 35 | tscValue.test("\u03bc5"); // RKM leading micro (mu) 36 | tscValue.test("1m"); // Integer milli 37 | tscValue.test("1.5m"); // Float milli 38 | tscValue.test("1m5"); // RKM mid milli 39 | tscValue.test("m5"); // RKM leading milli 40 | tscValue.test("1k"); // Integer kilo 41 | tscValue.test("1.5K"); // Float kilo 42 | tscValue.test("1K5"); // RKM mid kilo 43 | tscValue.test("k5"); // RKM leading kilo 44 | tscValue.test("1M"); // Integer mega 45 | tscValue.test("1.5M"); // Float mega 46 | tscValue.test("1M5"); // RKM mid mega 47 | tscValue.test("M5"); // RKM leading mega 48 | tscValue.test("1g"); // Integer giga 49 | tscValue.test("1.5G"); // Float giga 50 | tscValue.test("1G5"); // RKM mid giga 51 | tscValue.test("g5"); // RKM leading giga 52 | tscValue.test("1t"); // Integer tera 53 | tscValue.test("1.5T"); // Float tera 54 | tscValue.test("1T5"); // RKM mid tera 55 | tscValue.test("t5"); // RKM leading tera 56 | 57 | /* Tests: resistors */ 58 | tscResistance.test("1k5 ohms"); // Unit w/o multiplier (ohms) 59 | tscResistance.test("1k5 Ohm"); // Unit w/o multiplier (Ohm) 60 | tscResistance.test("1"); // Integer w/o multiplier 61 | tscResistance.test("1."); // Float w/o multiplier 62 | tscResistance.test("0.1"); // Float w/o multiplier 63 | tscResistance.test(".1"); // Float w/o multiplier 64 | tscResistance.test(".", false); // Float w/o multiplier 65 | tscResistance.test("R1"); // RKM leading R 66 | tscResistance.test("1R"); // RKM trailing R 67 | tscResistance.test("1R1"); // RKM mid R 68 | tscResistance.test("1m"); // Integer milli as mega 69 | tscResistance.test("1.5m"); // Float milli as mega 70 | tscResistance.test("1m5"); // RKM mid milli as mega 71 | tscResistance.test("m5"); // RKM leading milli as mega 72 | tscResistance.test("1k"); // Integer kilo 73 | tscResistance.test("1.5K"); // Float kilo 74 | tscResistance.test("1K5"); // RKM mid kilo 75 | tscResistance.test("k5"); // RKM leading kilo 76 | tscResistance.test("1M"); // Integer mega (M) 77 | tscResistance.test("1meg"); // Integer mega (meg) 78 | tscResistance.test("1.5M"); // Float mega (M) 79 | tscResistance.test("1.5Meg"); // Float mega (Meg) 80 | tscResistance.test("1M5"); // RKM mid mega 81 | tscResistance.test("M5"); // RKM leading mega 82 | tscResistance.test("1g"); // Integer giga 83 | tscResistance.test("1.5G"); // Float giga 84 | tscResistance.test("1G5"); // RKM mid giga 85 | tscResistance.test("g5"); // RKM leading giga 86 | 87 | /* Tests: capacitors */ 88 | tscCapacitance.test("1.5 farad"); // Unit w/o multiplier (farad) 89 | tscCapacitance.test("1.5 Farads"); // Unit w/o multiplier (Farads) 90 | tscCapacitance.test("1.5 F"); // Unit w/o multiplier (F) 91 | tscCapacitance.test("1F"); // Integer w/o multiplier as x1 92 | tscCapacitance.test("1.F"); // Float w/o multiplier as x1 93 | tscCapacitance.test("0.1F"); // Float w/o multiplier as x1 94 | tscCapacitance.test(".1F"); // Float w/o multiplier as x1 95 | tscCapacitance.test(".F", false); // Float w/o multiplier as x1 96 | tscCapacitance.test("1F5"); // RKM mid x1 97 | tscCapacitance.test("f5"); // RKM leading x1 98 | tscCapacitance.test("1"); // Integer w/o multiplier as pico 99 | tscCapacitance.test("1."); // Float w/o multiplier as pico 100 | tscCapacitance.test("0.1"); // Float w/o multiplier as pico 101 | tscCapacitance.test(".1"); // Float w/o multiplier as pico 102 | tscCapacitance.test(".", false); // Float w/o multiplier as pico 103 | tscCapacitance.test("1p"); // Integer pico 104 | tscCapacitance.test("1pF"); // Integer pico 105 | tscCapacitance.test("1.5P"); // Float pico 106 | tscCapacitance.test("1.5PF"); // Float pico 107 | tscCapacitance.test("1P5"); // RKM mid pico 108 | tscCapacitance.test("p5"); // RKM leading pico 109 | tscCapacitance.test("1n"); // Integer nano 110 | tscCapacitance.test("1nF"); // Integer nano 111 | tscCapacitance.test("1.5N"); // Float nano 112 | tscCapacitance.test("1.5NF"); // Float nano 113 | tscCapacitance.test("1N5"); // RKM mid nano 114 | tscCapacitance.test("n5"); // RKM leading nano 115 | tscCapacitance.test("1u"); // Integer micro (u) 116 | tscCapacitance.test("1uF"); // Integer micro (u) 117 | tscCapacitance.test("1\u00b5"); // Integer micro (micro symbol) 118 | tscCapacitance.test("1\u00b5F"); // Integer micro (micro symbol) 119 | tscCapacitance.test("1\u03bc"); // Integer micro (mu) 120 | tscCapacitance.test("1\u03bcF"); // Integer micro (mu) 121 | tscCapacitance.test("1.5U"); // Float micro (u) 122 | tscCapacitance.test("1.5UF"); // Float micro (u) 123 | tscCapacitance.test("1.5\u00b5"); // Float micro (micro symbol) 124 | tscCapacitance.test("1.5\u00b5F"); // Float micro (micro symbol) 125 | tscCapacitance.test("1.5\u03bc"); // Float micro (mu) 126 | tscCapacitance.test("1.5\u03bcF"); // Float micro (mu) 127 | tscCapacitance.test("1U5"); // RKM mid micro (u) 128 | tscCapacitance.test("1\u00b55"); // RKM mid micro (micro symbol) 129 | tscCapacitance.test("1\u03bc5"); // RKM mid micro (mu) 130 | tscCapacitance.test("u5"); // RKM leading micro (u) 131 | tscCapacitance.test("\u00b55"); // RKM leading micro (micro symbol) 132 | tscCapacitance.test("\u03bc5"); // RKM leading micro (mu) 133 | tscCapacitance.test("1m"); // Integer milli 134 | tscCapacitance.test("1mF"); // Integer milli 135 | tscCapacitance.test("1.5m"); // Float milli 136 | tscCapacitance.test("1.5mF"); // Float milli 137 | tscCapacitance.test("1m5"); // RKM mid milli 138 | tscCapacitance.test("m5"); // RKM leading milli 139 | tscCapacitance.test("1M"); // Integer mega as milli 140 | tscCapacitance.test("1MF"); // Integer mega as milli 141 | tscCapacitance.test("1.5M"); // Float mega as milli 142 | tscCapacitance.test("1.5MF"); // Float mega as milli 143 | tscCapacitance.test("1M5"); // RKM mid mega as milli 144 | tscCapacitance.test("M5"); // RKM leading mega as milli 145 | 146 | /* Tests: inductors */ 147 | tscInductance.test("1.5 Henries"); // Unit w/o multiplier (Henries) 148 | tscInductance.test("1.5 henry"); // Unit w/o multiplier (henry) 149 | tscInductance.test("1.5 H"); // Unit w/o multiplier (H) 150 | tscInductance.test("1H"); // Integer w/o multiplier as x1 151 | tscInductance.test("1.H"); // Float w/o multiplier as x1 152 | tscInductance.test("0.1H"); // Float w/o multiplier as x1 153 | tscInductance.test(".1H"); // Float w/o multiplier as x1 154 | tscInductance.test(".H", false); // Float w/o multiplier as x1 155 | tscInductance.test("1H5"); // RKM mid x1 156 | tscInductance.test("h5"); // RKM leading x1 157 | tscInductance.test("1"); // Integer w/o multiplier as milli 158 | tscInductance.test("1."); // Float w/o multiplier as milli 159 | tscInductance.test("0.1"); // Float w/o multiplier as milli 160 | tscInductance.test(".1"); // Float w/o multiplier as milli 161 | tscInductance.test(".", false); // Float w/o multiplier as milli 162 | tscInductance.test("1u"); // Integer micro (u) 163 | tscInductance.test("1uH"); // Integer micro (u) 164 | tscInductance.test("1\u00b5"); // Integer micro (micro symbol) 165 | tscInductance.test("1\u00b5H"); // Integer micro (micro symbol) 166 | tscInductance.test("1\u03bc"); // Integer micro (mu) 167 | tscInductance.test("1\u03bcH"); // Integer micro (mu) 168 | tscInductance.test("1.5U"); // Float micro (u) 169 | tscInductance.test("1.5UH"); // Float micro (u) 170 | tscInductance.test("1.5\u00b5"); // Float micro (micro symbol) 171 | tscInductance.test("1.5\u00b5H"); // Float micro (micro symbol) 172 | tscInductance.test("1.5\u03bc"); // Float micro (mu) 173 | tscInductance.test("1.5\u03bcH"); // Float micro (mu) 174 | tscInductance.test("1U5"); // RKM mid micro (u) 175 | tscInductance.test("1\u00b55"); // RKM mid micro (micro symbol) 176 | tscInductance.test("1\u03bc5"); // RKM mid micro (mu) 177 | tscInductance.test("u5"); // RKM leading micro (u) 178 | tscInductance.test("\u00b55"); // RKM leading micro (micro symbol) 179 | tscInductance.test("\u03bc5"); // RKM leading micro (mu) 180 | tscInductance.test("1m"); // Integer milli 181 | tscInductance.test("1mH"); // Integer milli 182 | tscInductance.test("1.5m"); // Float milli 183 | tscInductance.test("1.5mH"); // Float milli 184 | tscInductance.test("1m5"); // RKM mid milli 185 | tscInductance.test("m5"); // RKM leading milli 186 | tscInductance.test("1M"); // Integer mega as milli 187 | tscInductance.test("1MH"); // Integer mega as milli 188 | tscInductance.test("1.5M"); // Float mega as milli 189 | tscInductance.test("1.5MH"); // Float mega as milli 190 | tscInductance.test("1M5"); // RKM mid mega as milli 191 | tscInductance.test("M5"); // RKM leading mega as milli 192 | -------------------------------------------------------------------------------- /swtc1_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/swtc1_pic.png -------------------------------------------------------------------------------- /swtc2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/swtc2_pic.png -------------------------------------------------------------------------------- /swtc3_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/swtc3_pic.png -------------------------------------------------------------------------------- /swtc4_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/swtc4_pic.png -------------------------------------------------------------------------------- /tilt2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/tilt2_pic.png -------------------------------------------------------------------------------- /tsc.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: 'Raleway', sans-serif; 3 | font-size: 14px; 4 | -webkit-text-size-adjust: 100%; 5 | } 6 | 7 | .tonestack-layout { 8 | margin: 0 auto; 9 | } 10 | 11 | a:visited { 12 | 13 | } 14 | 15 | a.disabled { 16 | pointer-events: none; 17 | cursor: default; 18 | } 19 | 20 | .navbar { 21 | border-bottom: 2px solid #3D9FDE; 22 | font-size: 13px; 23 | background-color: white; 24 | } 25 | 26 | .navbar a { 27 | text-decoration: none; 28 | } 29 | 30 | .navbar-stack { 31 | float: left; 32 | } 33 | 34 | .navbar-info { 35 | float: right; 36 | } 37 | 38 | .navbar-menu-item { 39 | margin: 5px; 40 | color: #999; 41 | } 42 | 43 | .navbar-menu-item.disabled { 44 | color: #000; 45 | } 46 | 47 | .navbar-menu-item-icon { 48 | display: inline-block; 49 | vertical-align: middle; 50 | height: 16px; 51 | width: 16px; 52 | opacity: 0.5; 53 | } 54 | 55 | .navbar-menu-item.disabled .navbar-menu-item-icon { 56 | opacity: 1; 57 | } 58 | 59 | .dropdown { 60 | position: relative; 61 | display: inline-block; 62 | margin: 0; 63 | padding: 0; 64 | } 65 | 66 | .dropdown button { 67 | margin: 0; 68 | padding: 0 2px; 69 | color: inherit; 70 | background-color: inherit; 71 | border: none; 72 | font-size: 13px; 73 | font-family: inherit; 74 | } 75 | 76 | .dropdown-content { 77 | position: absolute; 78 | display: none; 79 | min-width: 80px; 80 | background-color: #f1f1f1; 81 | box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); 82 | z-index: 3; 83 | } 84 | 85 | .dropdown-content a { 86 | display: block; 87 | padding: 6px 12px; 88 | color: black; 89 | text-decoration: none; 90 | white-space: nowrap; 91 | } 92 | 93 | .dropdown-content a.disabled { 94 | color: white; 95 | background-color: #007dc1; 96 | } 97 | 98 | .dropdown:hover { 99 | color: white; 100 | background-color: #007dc1; 101 | } 102 | 103 | .dropdown:hover .dropdown-content { 104 | display: block; 105 | } 106 | 107 | .dropdown:hover .navbar-menu-item-icon { 108 | opacity: 1; 109 | filter: invert(100%); 110 | } 111 | 112 | .dropdown-content a:hover { 113 | background-color: #ddd; 114 | } 115 | 116 | .toggle { 117 | -webkit-appearance: none; 118 | -moz-appearance: none; 119 | appearance: none; 120 | width: 32px; 121 | height: 22px; 122 | display: inline-block; 123 | position: relative; 124 | vertical-align: middle; 125 | border-radius: 50px; 126 | overflow: hidden; 127 | outline: none; 128 | border: none; 129 | cursor: pointer; 130 | background-color: #007dc1; 131 | } 132 | 133 | .toggle:before { 134 | content: ""; 135 | display: block; 136 | position: absolute; 137 | z-index: 2; 138 | width: 18px; 139 | height: 18px; 140 | background: #fff; 141 | left: 2px; 142 | top: 2px; 143 | border-radius: 50%; 144 | } 145 | 146 | .toggle:checked:before { 147 | left: 12px; 148 | } 149 | 150 | .tonestack-info { 151 | max-width: 1264px; 152 | padding: 5px; 153 | border: 1px solid #ddd; 154 | } 155 | 156 | .tonestack-image { 157 | width: 414px; 158 | padding-top: 5px; 159 | margin-right: 1px; 160 | border: 1px solid #ddd; 161 | vertical-align: top; 162 | text-align: center; 163 | } 164 | 165 | .tonestack-values { 166 | width: 152px; 167 | vertical-align: top; 168 | padding-top: 5px; 169 | margin: 0 2px 2px 2px; 170 | border: 1px solid #ddd; 171 | } 172 | 173 | .tonestack-values-table { 174 | width: 100%; 175 | border-collapse: collapse; 176 | margin-bottom: 10px; 177 | } 178 | 179 | .tonestack-value-th-part { 180 | text-align: left; 181 | font-size: 12px; 182 | } 183 | 184 | .tonestack-value-th-value { 185 | font-size: 12px; 186 | } 187 | 188 | .tonestack-value-th-unit { 189 | font-size: 12px; 190 | } 191 | 192 | .tonestack-value-label { 193 | border-top: 1px solid #ddd; 194 | border-bottom: 1px solid #ddd; 195 | font-size: 12px; 196 | font-weight: bold; 197 | } 198 | 199 | .tonestack-value-value { 200 | border-top: 1px solid #ddd; 201 | border-bottom: 1px solid #ddd; 202 | } 203 | 204 | .tonestack-value-input { 205 | width: 95%; 206 | text-align: right; 207 | background-color: white; 208 | } 209 | 210 | .tonestack-value-input:read-only { 211 | background-color: #ebebe4; 212 | } 213 | 214 | .tonestack-value-unit { 215 | text-align: center; 216 | border-top: 1px solid #ddd; 217 | border-bottom: 1px solid #ddd; 218 | font-size: 12px; 219 | } 220 | 221 | .tonestack-values-button { 222 | -moz-box-shadow:inset 0px 1px 0px 0px #54a3f7; 223 | -webkit-box-shadow:inset 0px 1px 0px 0px #54a3f7; 224 | box-shadow:inset 0px 1px 0px 0px #54a3f7; 225 | background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #007dc1), color-stop(1, #08D)); 226 | background:-moz-linear-gradient(top, #007dc1 5%, #08D 100%); 227 | background:-webkit-linear-gradient(top, #007dc1 5%, #08D 100%); 228 | background:-o-linear-gradient(top, #007dc1 5%, #08D 100%); 229 | background:-ms-linear-gradient(top, #007dc1 5%, #08D 100%); 230 | background:linear-gradient(to bottom, #007dc1 5%, #08D 100%); 231 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#007dc1', endColorstr='#08D',GradientType=0); 232 | background-color:#007dc1; 233 | -moz-border-radius:3px; 234 | -webkit-border-radius:3px; 235 | border-radius:3px; 236 | border:1px solid #124d77; 237 | display:inline-block; 238 | cursor:pointer; 239 | color:#ffffff; 240 | font-family:Arial; 241 | font-size:12px; 242 | padding:3px 5px; 243 | text-decoration:none; 244 | text-shadow:0px 1px 0px #154682; 245 | } 246 | 247 | .tonestack-values-buttonhover { 248 | bbackground:-moz-linear-gradient(top, #08D 5%, #007dc1 100%); 249 | background:-webkit-linear-gradient(top, #08D 5%, #007dc1 100%); 250 | background:-o-linear-gradient(top, #08D 5%, #007dc1 100%); 251 | background:-ms-linear-gradient(top, #08D 5%, #007dc1 100%); 252 | background:linear-gradient(to bottom, #08D 5%, #007dc1 100%); 253 | filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#08D', endColorstr='#007dc1',GradientType=0); 254 | background-color:#08D; 255 | } 256 | 257 | .tonestack-values-button:active { 258 | position:relative; 259 | top:1px; 260 | } 261 | 262 | .tonestack-sliders { 263 | margin: 2px 2px 0 0; 264 | border: 1px solid #ddd; 265 | vertical-align: top; 266 | } 267 | 268 | .tonestack-slider-label { 269 | display: inline-block; 270 | width: 150px; 271 | margin: 0; 272 | text-align: center; 273 | } 274 | 275 | .tonestack-slider-input { 276 | display: inline-block; 277 | width: 300px; 278 | margin: 0 auto 0px; 279 | } 280 | 281 | .tonestack-slider-value { 282 | display: inline-block; 283 | width: 70px; 284 | margin: 0; 285 | text-align: center; 286 | } 287 | 288 | .tonestack-stats { 289 | margin: 2px 2px 0 0; 290 | border: 1px solid #ddd; 291 | padding: 5px; 292 | } 293 | 294 | .tonestack-graph-panel { 295 | width: 694; 296 | margin-left:2px; 297 | border: 1px solid #ddd; 298 | vertical-align: top; 299 | text-align: center; 300 | } 301 | 302 | .tonestack-bar { 303 | width: 100%; 304 | overflow: hidden; 305 | } 306 | 307 | .tonestack-graph-toggle { 308 | float: left; 309 | padding-left: 4px; 310 | } 311 | 312 | .tonestack-graph-button { 313 | float: right; 314 | margin-left: 4px; 315 | } 316 | 317 | .tonestack-graph-container { 318 | height: 550px; 319 | padding: 0 27px; 320 | } 321 | 322 | .tonestack-graph { 323 | display: block; 324 | height: 480px; 325 | width: 640px; 326 | } 327 | 328 | .tonestack-graph.hidden { 329 | display: none; 330 | } 331 | 332 | .tonestack-graph-value { 333 | width: 640px; 334 | margin-top: 20px; 335 | margin-bottom: 20px; 336 | font-size: 18px; 337 | font-weight: bold; 338 | } 339 | 340 | .tonestack-graph-line { 341 | 342 | } 343 | 344 | .tonestack-graph-axis { 345 | 346 | } 347 | 348 | 349 | .tonestack-select-pot { 350 | font-family: 'Raleway', sans-serif; 351 | font-size: 12px; 352 | border: none; 353 | border-radius: 1px; 354 | background-color: #FFFFFF; 355 | } 356 | -------------------------------------------------------------------------------- /vox2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/vox2_pic.png -------------------------------------------------------------------------------- /wah2_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jatalahd/tsc/c93c791324e41d50aba1c9a141c9929a3a200a88/wah2_pic.png --------------------------------------------------------------------------------