Below is an LTSpice simulation of two attempts at a Mosfet bilateral switch or 'transmission gate'. The plot shows the switch (onoff) going from 0 to 5v (in blue) and a sine wave audio signal being moved up or down by the two circuits.
What I was hoping to see is the sine wave, only between the blue lines, and nothing either side.
Can anyone tell me what is wrong with these two circuits?
I know that I can use a CD4066 etc., or a relay, but now I've become obsessed with getting a working bilateral switch circuit.