A long time ago, I heard of a program that did something
very simple: it played the sound of a storm, and used the
screen to simulate lightning.
I could not find any trace of this program, so I decided to write it myself. The code attached here will play any file (ideally, storm sounds) and will use the screen to simulate lightning. I could give you a long, detailed explanation, but I think a video might be better:
The script takes up to two arguments:
- A filename for the .mp3 that contains the sound of the rain. If you don't have one, you can download this one.
- (Optional) How many times should the script loop. By default, the script runs once and ends.
This code is released under the MIT License.