I have been wanting to fix this buzz in my guitar for a while now. None of the guides on the net have a solution. I think it some electrical problem, I don't know how to fix it or where to start.

I hear the buzz only when I play a string and using an amp. When not playing, I hear no buzz.
It's not the amp, I tested it with a keyboard(piano) and it was clean.
Not the wires as the keyboard would have buzzed.
It is not fret buzz as I don't hear anything when not using an amp.
The buzz is on all strings/frets.
When I touch a metal bit, the buzz is still there.
Changing the volume, tone, or pickup reduces the buzz a little.
I have tightened up the bolt on the jack input.
It sounds worse with bass strings.
I don't have distortion or overdrive on.