6 ms·
In case you need it, a static page which will give you an infinite amount of white/pink/waterfall noise: https://www.quaxio.com/noise.html https://www.quaxio.co
by amenghra 3y ago
In case you need it, a static page which will give you an infinite amount of white/pink/waterfall noise: https://www.quaxio.com/noise.html https://www.quaxio.com/noise.html
No tracking and no ads, ever.
Uses WebAudio API. Based on the code from https://noisehack.com/generate-noise-web-audio-api/ https://noisehack.com/generate-noise-web-audio-api/, but for some reason, the code wasn't working as-is in today's browsers. So tweaked things for a couple minutes.
- gumby 3y agoCan it be used as a good source of random numbers or is the noise not truly “white”?
- sethhochberg 3y agoUnder the hood it’s just making calls to Math.random(), so the white noise generated is exactly as reliable a source of randomness as the system as the system could give you directly.
- travisjungroth 3y agoIt’s at at most as good of a source but almost certainly worse. Lots of entropy dropped and biases introduced.
- sethhochberg 3y agoVery fair point. Transforming the randomness to fit it into the audible spectrum would certainly have side effects
- yura 3y ago>as reliable a source of randomness as the system as the system could give you directly Not sure what you mean by this. Which system?
- gumby 3y agoI thought that was the point GP’s comment is making, but a reply to a parallel comment to yours suggests otherwise.
- fragmede 3y agoThe combination of the operating system (Linux/MacOS/Windows) and the particular hardware it has access to. With different hardware, /dev/(u)random has different qualities of entropy.
- masklinn 3y agoJS’s Math.random is not a system (or CS) RNG, and a few years back it was barely an RNG at all: https://medium.com/@betable/tifu-by-using-math-random-f1c308c4fd9d# https://medium.com/@betable/tifu-by-using-math-random-f1c308... So no, Math.random is very much not > as reliable a source of randomness as the system
- adgjlsfhk1 3y agothat's horrifying. I do slightly disagree with the final thoughts and works say that one of the xoshiro 256 generators is probably better than the 1024 ones. 256 bits of state is plenty to give you a longer cycle length than you will ever need (even considering birthday paradox) and the reduced state means it fits in a single cache line
- masklinn 3y agoAfter the linked article as well as https://jandemooij.nl/blog/math-random-and-32-bit-precision/ https://jandemooij.nl/blog/math-random-and-32-bit-precision/ which follows from it, the main three browsers (Chrome[0], Firefox[1], Safari[2]) actually switched to Xorshift128+. So these days Math.random is nowhere near as horrifying as it was back then, however it's still not a system or a userland CSPRNG, for that you need `crypto.getRandomValues()` (https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getR...). [0] https://v8.dev/blog/math-random https://v8.dev/blog/math-random [1] https://bugzilla.mozilla.org/show_bug.cgi?id=322529#c99 https://bugzilla.mozilla.org/show_bug.cgi?id=322529#c99 [2] https://bugs.webkit.org/show_bug.cgi?id=151641 https://bugs.webkit.org/show_bug.cgi?id=151641
- moritzwarhier 3y agoMath.random() is a pragmatic PRNG with no strong guarantees and implementations vary. Focus on speed. OS can give more entropy if that's what matters https://v8.dev/blog/math-random https://v8.dev/blog/math-random
- messe 3y agoI've seen visual demonstrations of PRNG bias before, but are the biases of typical implementations of Math.random "above the noise threshold" (pun intended) where humans could distinguish them from truly random streams of audio?
- moritzwarhier 3y agoI don't think so, no. The way I understood op was to use the generated audio itself as a source of entropy, which would be a bad idea if not using a CSPRNG perfectly tuned to the sampling rate and lossless audio I think :) but I'm just guessing there regarding the effects of quality.
- amenghra 3y agoIt calls Math.random() which is NOT truly random. crypto.getRandomValues() is what you would use if you wanted truly random noise.
- tiffanyg 3y agoOh. I just sample from my own brain if I want truly random noise. Ba-dum-tisss...
- TeMPOraL 3y agoSo the question now is, if it were calling `crypto.getRandomValues()` instead, would it sound different? EDIT: This is not a 100% joke question. I'd expect both versions to sound the same, but at the same time, there's a threshold on the RNG spectrum between "getRandomNumber() { return 4; }" and some truly random quantum source, where if you feed the RNG to audio output, people will be able to distinguish between "bad RNGs" (left of threshold), and "good RNGs" (right of threshold). I wonder where that threshold falls.
- pravus 3y ago> would it sound different? I don't believe it would. While there can be pretty bad PRNGs, they are typically implemented to produce a particular statistical distribution which would be identical to a real random source for the purposes of white noise. This is due to the fact that audio is a superposition of frequencies which takes time and multiple samples to cohere. PRNGs can be bad for things like crypto because each individual generated value has significant implications for the entire set of operations.
- esnard 3y agoIt wouldn't sound different, even if you have absolute pitch, whatever the "speed" of the random sounds would be. Both algorithms will generate sufficiently random values from a human perspective. Unless you carefully look into them, with a very specific mathematics / crypto knowledge, you wouldn't even be able to tell which one is pseudo-random, and which one is random: and if you somehow are able to, then it would just mean that the underlying RNG is very, very bad.
- toomim 3y agoGood point. You're much better off playing a podcast of white noise, which repeats the exact same sequence of bits each time you hit play.
- nomel 3y agoI’ve used Spotify because I can adjust the EQ to get the tone I want. There’s no system wide EQ on iPhone.
- maxander 3y agoI’d recommend mynoise.net ; most of the sounds are for-pay but white noise and a few others are free, and it includes an equalizer (and some presets for pink noise and etc.) An app, though, not a website.
- JumpCrisscross 3y agoThe article describes shows playing “various noises like crashing waves or bird sounds on repeat.” That is different from pure white noise.
- Cthulhu_ 3y agoAnother one is https://mynoise.net/ https://mynoise.net/, which has a neat mode where the sliders will very slowly move on their own, so you get slowly adjusting soundscapes. I don't know if it works offline though, and probably not when your phone is locked. They also published recordings on spotify though; some are an hour long, others you can probably download them and loop them though. https://open.spotify.com/artist/1gRJBUyCeihBrgcCtDdEfv?si=yLTD_bBcTbuICQsGXQgPiA https://open.spotify.com/artist/1gRJBUyCeihBrgcCtDdEfv?si=yL...
- rezonant 3y agoWorks fine in background and while locked on Android. Only works when the tab is visible on iOS.
- TedDoesntTalk 3y agoAnd iOS will stop playing it after the screen locks, unlike Spotify.
- wruza 3y agoThey have an app for ios.
- klondike_klive 3y agoThis website quite possibly saved my sanity when renting a tiny one bed flat in London with my partner and newborn baby. The traffic noise was unbearable, it was the hottest summer on record and he was a terrible sleeper.
- Tao3300 3y agoAlso, if you donate to mynoise you get some download credits that you can use to get an mp3 of your preferred slider settings. Great option for using it offline and it helps keep the lights on.
- jachee 3y ago> …probably not when your phone is locked. If you’re using iOS, there’s a built-in system for Background Sounds[0] that has quite a few options, and is built into the OS, which means it definitely still works while your phone is locked, or even otherwise engaged. It even gets out of the way for other audio and comes back very gradually. A real hidden gem. 0: https://support.apple.com/en-us/HT212775 https://support.apple.com/en-us/HT212775
- ticoombs 3y agoThis is great! Might I suggest to add an X button to go back to the menu select. As if you accidentally select one on your phone, you have to refresh instead of hitting back. My baby will love this
- TaylorAlexander 3y agoHeads up this doesn’t seem to work on my iPhone 12. I confirmed audio on other apps works for me (I’m not accidentally streaming to an earbud or something) but this page doesn’t play any audio.
- InvaderFizz 3y agoTurn off silence/vibrate only mode on your phone. I leave mine in vibrate mode 99% of the time, so I expect this to happen occasionally.
- TaylorAlexander 3y agoOh that’s weird! My phone will play other audio in silent mode so it never occurred to me that this website would require that to be turned off.
- Slow_Hand 3y agoRecently iOS included a native noise generator that bypasses the need for external services like Spotify or websites. It offers six different kinds of noise to listen to on your phone. It’s in the iPhone control center under the ear icon (which you may have to enable). The feature is called ‘background sounds’.
- Aaron2222 3y agomacOS as well. Though it's not exactly a 'generator'. Even for white/pink noise it's just playing an audio file.
- mrklol 3y agoI wouldn’t recommend using it, if it’s really looping. At some point you notice the loop point and wait till it happens.
- Aaron2222 3y agoIt's not really the kind of audio that you'd be able to notice looping. The white/pink/brown noise files are each a minute long, and the stream/ocean/rain sounds are comprised of 17-20 sound files between 1-3 minutes long (and I'm guessing it randomizes the playback order).
- Pxtl 3y agoIirc Google Assistant has similar.
- 3abiton 3y agoUnfortunately, people don't want to stray away from familiar apps, Spotify is just too convenient.