wmstatus: add an audible noise generator
Subjectively, white noise seems to be harsh, pink and brown[ian] overall tolerable.
https://github.com/alsa-project/alsa-utils/blob/master/speaker-test/pink.c (± identical)
Considering the apparent complexity, the best solution might be simply:
popen("sox --null -t raw -e unsigned-integer -r 44100 -c 2 - synth brownnoise")
Investigate the properties of the apparently trivial brown noise algorithm at
which appears to integrate white noise but is not leaky and rather retries with new random numbers, in hope that the problem will fix itself. The constants appear to be meaningful. See how often it triggers the clipping measure. Try to understand what the Wikipedia-suggested "leaky integrator" actually means. See if multiplicative "leaking" of the accumulator is worth anything, and what the "y[t] = f·y[t–1] + (1–f)·white" thing does to the spectrum when we toy around with parameters—it seems that the "(1-f)·" thing is unnecessary or arbitrary (why should the increment be related in size to the rate of leaking?)
Findings: leaky integrators (multiplicative) change the frequency spectrum, attenuating the lower end. The method of retrying with another random number produces accurate brownian noise, as seen in Audacity's analysis--ten times the frequency means 20 dB weaker, as Wikipedia wants it. These two approaches can be combined, as excess rumbling can be unpleasant. Integrated random drift does occur with
Try to compare the spectrum based on parameters.
Use the existing libpulse connection to play noise, switchable by a global hotkey. Consider making C-VolUp/Down increase or decrease a noise timer by an hour. Make note of this in the status like "Noise H:MM".
It might be a good idea to create a standalone program to either generate noise data or even directly play it.
Deleting a branch is permanent. It CANNOT be undone. Continue?