.PS
# AudioAmp
#RE Graf "Amplifier Circuits"
cct_init
iflatex(`command "{\scriptsize\sf"')

define(`MTP8P10',`[
 Q: mosfet(,`$1',dMdPyEDSQdBO,)
 S: Q.tr_xy(-9, 0); line from Q.tr_xy(-2, 0) to S
 D: Q.tr_xy( 7, 0); line from Q.tr_xy(2, 0) to D
 G: Q.G
 C: circle rad 5*dimen_/10 at Q.tr_xy(0,1) ]')

define(`MTM25N10',`[
 Q: mosfet(,`$1',dMuPyEDSQuBO,)
 S: Q.tr_xy(-5, 0); line from Q.tr_xy(-2, 0) to S
 D: Q.tr_xy( 5, 0); line from Q.tr_xy(2, 0) to D
 G: Q.G
 C: circle rad 5*dimen_/10 at Q.tr_xy(0,1) ]')

  del = dimen_/4
  down_
 Q7: MTP8P10(R); "Q7" at Q7.C.sw below rjust
 Q8: MTP8P10(R) with .w at Q7.e+(del,0); "Q8" at Q8.C.sw below rjust
  foreach_(`XX',`patsubst(XX,`\.'): dot(at XX)',Q8.D,Q8.S,Q7.D,Q7.S)
 Q9: MTP8P10(R) with .w at Q8.e+(del,0); "Q9" at Q9.C.sw below rjust
  line from Q9.D to Q7.D; line from Q8.G to (Q8.G.x,Q8.S.y-del); Q8G: dot
  line from Q9.G to (Q9.G,Q8G) then to (Q7.G,Q8G) then to Q7.G; dot
  line from Q7.S up_ del*0
  {`"3 X MTP8P10"' at Q8D.s below}
 Rail1: dot
  reversed(`diode',up_ 2*del); reversed(`diode',up_ 2*del from Here+(0,-del))
  {"D3" at last [].se ljust "D4" ljust}
 P45: dot
  dot(at P45-(dimen_*2.2,0)); line to (Here,Rail1)
 R10: resistor(down_ to (Here,Q7.G)); rlabel(,"R10" rjust "100"); dot
 { line to Q7.G }
 R11: resistor(down_ R10.len); rlabel(,"R11" rjust "330")
 Q5: bi_tr(up_ dimen_*0.6,,,E) with .C at R11.end
  rlabel(,"Q5" ljust "D40D7")
 R12: resistor(down_ R11.len from Q5.E); llabel(,"R12" ljust "10"); dot
 R13: resistor(down_ R11.len); llabel(,"R13" ljust "10")
 Q6: bi_tr(down_ dimen_*0.6,R,P,E) with .E at R13.end
  llabel(,"Q6" ljust "D41D7")
  line left_ 2*del from Q5.B
 Q3: bi_tr(up_ dimen_*0.6,,,E) with .C at Here
  "Q3" ljust at Q3.nw+(-del,del*1.2) "D40D7" ljust
 Q4: bi_tr(up_ dimen_*0.6+2*del,,,E) with .E at (Q3.E,Q6.B)
  "Q4" ljust at Q4.A1.ne+(0,del*3/4) "D40D7" ljust
 Q4C: dot(at (0.5 between Q3.E and (Q4.C-(0,del))))
  line from Q4.B left_ del/2; continue to (Here,Q4C) then to Q4C
  line from Q4.C to Q3.E
  dot(at Q4.E)
  up_
 Q10: MTM25N10 with .D at (Q7.D,Q6.C-(0,3/2*del))
  { "Q10" at Q10.e above ljust `"MTM25N10"' ljust }
  line from Q10.D to Q7.D
  line from Q6.C down_ del
 Gnd: Here
  { line right_ dimen_ from R12.end then down_ (R12.end.y-Gnd.y); dot }
 R14: resistor(from Gnd down_ to (Gnd,Q10.G)); rlabel(,"R14" rjust "330"); dot
  line to Q10.G
  line down_ 3*del from Q10.S
 Rail2: dot
  diode(down_ 2*del); diode(down_ 2*del from Here+(0,del))
  {"D5" at 2nd last [].se ljust "D6" ljust}
 PM45: dot
 R15: resistor(from R14.end to (R14,Rail2)); rlabel(,"R15" rjust "100")
  line to (Here,PM45); dot
 Q3B: dot(at Q3.B+(-3*del,0))
 {line to (Here.x,Rail1.y-R10.len)
 R7: resistor(up_ to (Here,Rail1)); llabel(,"R7"rjust "4.7`$\,$'k"); dot }
  line to (Here,Q3.E)
 R8: potentiometer(down_ Q3.E.y-Q6.B.y,,,-3/2*del) with .Start at Here
  llabel(,"R8" ljust "1`$\,$'k")
  dot(at R8.End+(0,del)); line to (R8.T1,Here) then to R8.T1
  line from R8.End to (R8.End,Q4.E); dot; line to (Here.x,Rail2.y+R15.len)
 R9: resistor(down_ to (Here,Rail2)); rlabel(,"R9" rjust "4.7`$\,$'k"); dot
  line from Q6.B to (R8.End.x-3*del,Q6.B.y) then up Q3.B.y-R12.len-Q6.B.y
 C2: reversed(`capacitor',down_ to (Here,Q3.B),C); llabel(,"C2" ljust "0.1")
  dot; dot(at (C2.x-2*del,Rail2.y))
 R6: resistor(up_ R9.len); llabel(,"R6" rjust "2.2`$\,$'k"); dot
 D2: diode(up_ to (Here,Gnd),Z); llabel(,"D2" rjust "15`$\,$'V"); dot
  dot(at Here+(2*del,0))
 C3: capacitor(down_ D2.len,C); llabel(,"C3" ljust "0.01"); line to D2.start
  line from R6.top to D2.s-(3*del,0); down_
 Q2: bi_tr(,,P,E) with .B at Here; "Q2" at Q2.w rjust 
 R4: resistor(down_ from Q2.C to (Q2.C,Rail2)); rlabel(,"R4" rjust "1`$\,$'k")
  {line right_ to Rail2}
 U1: opamp(,,,,P) with .C at (Here,C2.top); "U1" at U1.C
  "4" at (U1.V2,U1.S) ljust "MC1741SC" ljust
  "7" at U1.V1 ljust; "6" at U1.E ljust above
  line from U1.V2 to Q2.E 
  line from U1.In1 left_ del
 IT: dot
  R1: resistor(left_ R10.len)
  { "R1" at last [].sw +(0,-del) ljust "10`$\,$'k" ljust }
  Input: dot(,,1); "INPUT" at (Input.w,2nd last [].n) above ljust
  line from U1.In2 to (IT,U1.In2)
 R2: resistor(down_ to (Here,Gnd)); rlabel(,"R2" rjust "10`$\,$'k"); dot
  dot(at (Input,Gnd),,1); line to (Q9.e,Here) chop dotrad_ chop 0; dot(,,1)
  { "GROUND" above rjust }
  line from D2.top to (D2.x,U1.Out.y+del); dot
 D1: diode(up_ D2.len-del/2,Z); llabel(,"D1" rjust "15`$\,$'V"); dot
  { line right_ 2*del
   C1: capacitor(down_ D1.len,C); llabel(,"C1" ljust "0.01")
   line to D1.s }
  line from U1.Out to Q3.B
  line from U1.V1 up_ to (U1.V1.x,D1.top.y-(Q2.E.y-Q2.B.y))
 Q1: bi_tr(,R,,E) with .E at Here; "Q1" at Q1.w rjust
  line from Q1.B to D1.top
  line to (Here,R7.bot)
 R5: resistor(up_ to (Here,Rail1)); llabel(,"R5" rjust "2.2`$\,$'k"); dot
  line from Q1.C to (Q1.C,R5.start)
 R3: resistor(up_ to (Here,Rail1)); llabel(,"R3" rjust "1`$\,$'k")
  line to Q9.S
  line from (Input,PM45) to (Q9.e,PM45); "$-$45`$\,$'V" above rjust
  line from (Input,P45) to (Q9.e,P45); "$+$45`$\,$'V" above rjust
  dot(at (Q8.D,R12.bot)); {RL: resistor(to (Here,Gnd)); rlabel(,"R LOAD"); dot}
  dot(at (Q7.D,Here)); {line to (Q9.e,Here); dot(,,1) }
 R16: resistor(left_ Q7.D.x-Q7.G.x+del);
  {"R16" at last [].s+(0,-del) "100`$\,$'k"}
  { dot(at R16.end+(0,2*del)); C4: capacitor(to (R16.start,Here))
   { "C4" "3.3`$\,$'pF" at last [].n+(0,del)}; dot }
  line to (Here,Rail1+(0,del)) then to (IT,Rail1+(0,del)) then to IT

  iflatex(`command "}%"')
.PE
