* Z:\home\khalils\Downloads\files\data\raw_asc\e953e69cf486_clipping_waveshape.asc
* Generated by LTspice 26.0.1 for Windows.
; model from Norman Koren
; http://www.normankoren.com/Audio/index.html
; http://www.normankoren.com/Audio/Tubemods.zip
+ PARAMS: MU=100 EX=1.4 KG1=1060 KP=600 KVB=300 RGI=2000
+ CCG=2.3P CGP=2.4P CCP=.9P ; ADD .7PF TO ADJACENT PINS; .5 TO OTHERS.
+{V(1,3)/KP*LOG(1+EXP(KP*(1/MU+V(2,3)/SQRT(KVB+V(1,3)*V(1,3)))))}
V4 N001 0 300
V1 in 0 PWL(0 -10 1 10) AC 1
R6 follower 0 100k
D1 N003 0 NSCW100
R4 N004 0 1Meg
E1 7 0 VALUE=
XU2 N001 N002 follower 12ax7 ;pnba Plate)Grid)Cathode
C2 2 1 {CGP} ; GRID=PLATE
D2 0 N003 NSCW100
D3 5 3 DX ; FOR GRID CURRENT
RCP 1 3 1G ; TO AVOID FLOATING NODES IN MU-FOLLOWER
C3 1 3 {CCP} ; CATHODE-PLATE
RE1 7 0 1G
R5 N001 N002 100k
R2 N004 N003 22k
G1 1 3 VALUE={(PWR(V(7),EX)+PWRS(V(7),EX))/KG1}
XU1 N002 N004 N005 12ax7 ;pnba Plate)Grid)Cathode
R1 N003 in 2.7k
C1 2 3 {CCG} ; CATHODE-GRID
R3 N005 0 1k
R1 2 5 {RGI} ; FOR GRID CURRENT
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.dc V1 {Vstart} {Vend} {Vstep}
.SUBCKT 12AX7 1 2 3 ; P G C; NEW MODEL
.MODEL DX D(IS=1N RS=1 CJO=10PF TT=1N)
.ENDS
.param Vstart=-10 Vend=10 Npoints=100
.param Vstep={(Vstart - Vend)/(Npoints - 1)}
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 2148 680
WIRE 480 -192 336 -192
WIRE 640 -192 480 -192
WIRE 336 -176 336 -192
WIRE 640 -112 640 -192
WIRE 480 -80 480 -192
WIRE 336 -32 336 -96
WIRE 432 -32 336 -32
WIRE 336 32 336 -32
WIRE -144 80 -304 80
WIRE 16 80 -64 80
WIRE 64 80 16 80
WIRE 128 80 64 80
WIRE 240 80 208 80
WIRE 288 80 240 80
WIRE 448 112 448 16
WIRE -304 128 -304 80
WIRE 16 128 16 80
WIRE 64 128 64 80
WIRE 240 176 240 80
WIRE 304 176 304 128
WIRE 448 176 448 112
WIRE -304 272 -304 208
WIRE -160 272 -304 272
WIRE 16 272 16 192
WIRE 16 272 -160 272
WIRE 64 272 64 192
WIRE 64 272 16 272
WIRE 240 272 240 256
WIRE 240 272 64 272
WIRE 304 272 304 256
WIRE 304 272 240 272
WIRE 448 272 448 256
WIRE 448 272 304 272
WIRE -160 304 -160 272
SYMBOL voltage -304 112 R0
WINDOW 123 24 124 Left 2
WINDOW 39 0 0 Left 2
SYMATTR Value2 AC 1
SYMATTR InstName V1
SYMATTR Value PWL(0 -10 1 10)
SYMBOL voltage 640 -128 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V4
SYMATTR Value 300
SYMBOL LED 32 192 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D2
SYMATTR Value NSCW100
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res -48 64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R1
SYMATTR Value 2.7k
SYMBOL res 320 -192 R0
SYMATTR InstName R5
SYMATTR Value 100k
SYMBOL Misc\\triode 336 80 R0
SYMATTR InstName U1
SYMATTR Value 12ax7
SYMBOL res 432 160 R0
SYMATTR InstName R6
SYMATTR Value 100k
SYMBOL res 256 160 M0
SYMATTR InstName R4
SYMATTR Value 1Meg
SYMBOL res 224 64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R2
SYMATTR Value 22k
SYMBOL res 288 160 R0
SYMATTR InstName R3
SYMATTR Value 1k
SYMBOL Misc\\triode 480 -32 R0
SYMATTR InstName U2
SYMATTR Value 12ax7
SYMBOL LED 48 128 R0
SYMATTR InstName D1
SYMATTR Value NSCW100
SYMATTR Description Diode
SYMATTR Type diode
FLAG -160 304 0
FLAG 640 -32 0
FLAG 448 112 follower
FLAG -304 80 in
TEXT -288 -144 Left 2 !.dc V1 {Vstart} {Vend} {Vstep}
TEXT 800 -192 Left 2 !; model from Norman Koren\n; http://www.normankoren.com/Audio/index.html\n; http://www.normankoren.com/Audio/Tubemods.zip\n \n.SUBCKT 12AX7 1 2 3  ; P G C;  NEW MODEL\n+ PARAMS: MU=100 EX=1.4 KG1=1060 KP=600 KVB=300 RGI=2000 \n+ CCG=2.3P  CGP=2.4P CCP=.9P  ; ADD .7PF TO ADJACENT PINS; .5 TO OTHERS. \nE1 7 0 VALUE=\n+{V(1,3)/KP*LOG(1+EXP(KP*(1/MU+V(2,3)/SQRT(KVB+V(1,3)*V(1,3)))))}\nRE1 7 0 1G\nG1 1 3 VALUE={(PWR(V(7),EX)+PWRS(V(7),EX))/KG1}\nRCP 1 3 1G    ; TO AVOID FLOATING NODES IN MU-FOLLOWER\nC1 2 3 {CCG}  ; CATHODE-GRID\nC2 2 1 {CGP}  ; GRID=PLATE\nC3 1 3 {CCP}  ; CATHODE-PLATE\nD3 5 3 DX     ; FOR GRID CURRENT\nR1 2 5 {RGI}  ; FOR GRID CURRENT\n.MODEL DX D(IS=1N RS=1 CJO=10PF TT=1N)\n.ENDS
TEXT -288 -224 Left 2 !.param Vstart=-10 Vend=10 Npoints=100
TEXT -288 -176 Left 2 !.param Vstep={(Vstart - Vend)/(Npoints - 1)}