Hacker News new | past | comments | ask | show | jobs | submit login
What Does Perlin Noise Sound Like? (gpfault.net)
81 points by 10098 on May 13, 2017 | hide | past | favorite | 31 comments



Running it through a FFT, the noise looks similar to blue noise, but with a lowpass at 1000 Hz


Unfortunately, the audio clips do not play in Safari mobile.



Why does Safari struggle to open files in common and free formats?


AFAIK iOS (and tvOS) devices only support playing formats+codecs with native hardware decoder support; they don't have any pure-CPU decoding implementations.

This, from what I recall, was an intentional choice to disincentivize developers from making the "easy choice" to ship assets in the same format+codec for all devices, where such a format would burn the iOS device's battery doing CPU decoding. Instead, most developers will choose to separately encode their assets for iOS, so that they can use the iOS media frameworks—which coincidentally means that they'll be using the efficient hardware encoding and not burning much battery at all.

However, you can ship custom CPU decoding in your app if you want (e.g. VLC.ipa).

Websites, obviously, aren't (usually) built for single architectures, though, so it's a bit of a pain for them. Larger web video providers (most porn sites, for example) keep iOS-specific encodings on their CDN and try to detect the browser's user agent to decide which version to deliver. Other providers just give up on the concept and build specific iOS-specific apps in order to ensure the correct media is delivered (this being why there are more "video-sharing site" apps for iOS than for Android.)


When iOS was first released everybody and his dog was still running their own proprietary movie (container) format. Microsoft was pushing .wmv, websites used Flash, illegal sources were using .avi files.

Apple forced these sites to provide their streams in a standardized format, MP4.

It might not be the standard you want because it isn't patent free but at least it is a standard, it's not controlled by Apple and it works on just about any device and works pretty well.


I have VLC installed and Messages refused to save/play .ogg's even though it shows up with a VLC cone (including 3D touch "hard press" menu).


Won't play in desktop Safari, either.


Played fine in Safari on my iPad mini 2. Fully upgraded OS.


safari does not play ogg files, i'm surprised he/she didn't just upload a wav file.


This sound kind of reminds me of one of these "Space Engine Sounds" on youtube, especially the Firefly/Serenity themed track.

I used to love it for sleeping, it's rather relaxing.


To me the first sample sounded like some subway passing by but when you're still far away yet.

That said, after about 15 to 30s of attentive, continuous listening, it started making me increasingly uneasy, as I perceived the sound as being extremely oppressive and ominous, in a very chthonian way. I'm not going to try to listen to that any longer because I'm half sure that could almost turn into a panic attack of sorts or something. Really unsettling.

The second, fractal one didn't produce that effect unless I turned the volume way up, and even then, not as much.


The concept of getting a panic attack in response to listening to some audio is completely foreign to me. Is it normal to have that reaction? It sure seems like it wouldn't be.


IIRC there's some evidence that very low-frequency sounds may cause feelings of anxiety and fear in human subjects. Very low frequency sounds may occur prior to catastrophic events like earthquakes, and some animals have been known to react to it. It's plausible that humans have evolved a similar protection mechanism which has gradually atrophied. That being said, I'm talking about sub-20 Hz frequencies here. I don't think these recordings contain that and I don't think it would be possible to reproduce on regular headphones anyway...


Missing funtamentals are a thing though.

[0]: https://en.wikipedia.org/wiki/Missing_fundamental


Professional headphones can reach 3hz and subwoofers about 0.5hz.


Constant, uniform stimuli for extended periods of time can produce weird effects on the mind. Think about stuff like sensory deprivation, staring at oneself in a mirror, anechoic chambers... And if someone can find a given sound soothing it's not out of this world to think that another sound could have the opposite effect.


I can't remember where I found it, but I rather enjoy this version:

play -c2 -n synth whitenoise band -n 100 24 band -n 300 100 gain +20


My initial reaction was like "Oh, like white noise!"

I could not have been more wrong. There is very clear structure in Perlin Noise. Great write-up and I learned something.


The article doesn't adjust for the inherent lowpass/highpass/aliasing behavior of function parameter rate vs sample rate, which is responsible for most of the audible difference, especially the similarities to real life low-passed-noise situations (airplane cabin, high building) noted by the author. Still, I agree, you can hear some residual tones!

Spectra of the 3 noise samples: http://imgur.com/a/gaiVm

I haven't read up on perlin noise recently enough to know whether that's inherent to its structure or whether there's a more mundane explanation like distortion or encoding tomfoolery.


Thanks for the spectrograms! I'm not exactly sure which aliasing you're referring to... I'm trying to adjust the sampling rate of the noise function so that it maps to "real" seconds in a way that makes sense. By looking at the waveform in the audio editor, it looks exactly like a visual representation of 1D perlin noise to me (http://imgur.com/a/bM4tn). Looking at your spectrograms though, I'm seeing something in the higher-frequencies (and I think I can hear those as well), but I actually have no explanation for where those could have come from.


That's a completely reasonable thing to do, especially because it might allow you to pick up distortion due to interpolation.

However, you should do the same thing to the white noise [1] if you are going to compare them. If we write the white noise's continuous reconstruction [2] as a function of time, w(t), we could stretch out w(t) until it wiggles at about the same rate as the perlin noise, p(t), and then sample them together at a rate several times higher than that at which they wiggle. Both waveforms would then have the same "muffled roar" sound you get in airplanes, buildings, underwater, etc.

Another mundane explanation for the bands is that they might be "JPEG artifacts" for ogg's compression. Amplitude is logarithmic, so they're probably not as important as they look.

[1] To be pedantic we should call it band-limited white noise, because the sampling+reconstruction process limits the bandwidth, and infinite bandwidth white noise can't actually exist, because it has finite energy per bandwidth * infinite bandwidth = infinite energy. This isn't a theoretical problem. Oscilloscopes have fatter "no-signal" traces in proportion to their bandwidth, the resolution bandwidth ("RBW") of spectrum analyzers lifts the noise floor at higher settings, the field of thermodynamics fell apart in the "ultraviolet catastrophe" before we understood how quantum mechanics effectively limits the bandwidth of thermal radiation, etc.

[2] w(float t) rather than w(int n), obtained by interpolation. Sinx/x interpolation is the interpolation that gives 0 distortion and produces no higher spectral content. It's the time domain equivalent of doing a Fourier Transform, scaling the spectrum, and doing an Inverse Fourier Transform. IIRC Perlin noise is a spline, not sinx/x, so I'd expect its interpolation to produce higher harmonics. By applying perlin-like (spline?) interpolation and sinx/x interpolation to the white noise, you could isolate the audio effects due to the randomization vs the interpolation of the perlin noise. If you were so inclined :)


The code does explicitly assign a frequency of 440 Hz to the parameter rate in the first case and 110, 220, 440 Hz in the second. The second, fractal noise example might have been more interesting to compare to the first one if the author had kept the "fundamental" at 440 Hz and added higher-frequency overtones.


Perlin noise was explicitly designed to give a smooth, "natural" noise pattern; its spectral energy distribution is by design completely different from white noise. Makes sense that it sounds very different as well :)


I've heard this before! In some Nine Inch Nails tracks. I always thought it was white noise + bandpass + clipping or distortion.


> I always thought it was white noise + bandpass

That would be equivalent to this approach, right?


Didn't really understand how he got to it, but would be interesting to hear this noise source across the larger spectrum (not just the low freqs)

It might sound/be more natural/fractal than pure white noise (+LPF), I can't tell. But it won't work to drown out office chatter because its the high freqs there that matter.


It might be interesting to use Perlin noise to craft a melody by mapping the reals onto a musical scale.

In particular, it seems like it would have some nice properties for melodies since it will keep the melody in a comfortable range and won't throw in a bunch of large leaps.


To me it sounds like the ships background noise in Star Trek.


Does this use Perlin noise to generate the PCM values?

If so, what would it look like to use Perlin noise as the input to an inverse FFT function?


LOL. I just finished putting up a pergola with a clear polycarbonate roof. The recommendation is to apply a foam adhesive tape to the purlins (battens) to prevent noise caused by movement of the sheets from thermal expansion. Ihttps://www.bunnings.com.au/suntuf-access-25mm-x-20m-purlin-... - I thought it was a strange topic for HN ;-)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: