Charles Devereaux wrote:
The noise is created by switching between states.
I expect that the noise comes from power supply circuitry.
Use an oscilloscope in clever ways to find the source.
I don't have an oscilloscope, however I created the following script following glugglug suggestion - it fixes the noise
I'm afraid it doesn't fix anything.
You've treated the symptom instead of investigating what the cause is.
All I'm left is with a very small crackling noise,
Right, you've treated the more obvious symptom and are left with a smaller symptom.
The problem unfortunately remains.
//Peter