For Guitars
Well hey I'm really not that smart in electronics at all, but I have repaired a few electric guitars, and I have had this same sort of problem. Even when you aren't playing there is an annoying sort of hum. At first I didn't know how to cure it either, but when I did some research I easily found the problem.
Ok, there is something covering the entirety of the cavity(the part of the guitar carved out to hold electronics and pickups) of the guitar. It is like aluminum foil, but at Home Depot you can buy something better and more proffesional called Aluminum Tape, which does the same thing except better. You cover the cavity with this tape, and it blocks out all the other frequencies, so there is no hum when you aren't even playing. Completely covering your electronics work in this way is called "shielding" and I'm not sure it would work for you but you could try.
So In a nutshell you might want to use this shielding technique on your projects to block out the hum or noise from other things.
:arrow: Remember: I'm not sure of this, It only works for guitars as far as I know.