
Frequency-shaped background noise generators - ivank
http://mynoise.net/noiseMachines.php
======
audiosampling
Hi Guys! I am the developer of the myNoise website and just want to say that
all your comments are a great source of inspiration today: many suggestions
for further improvements will be taken into account! Although I did entirely
code the website by my own using a simple text editor, I am not a programmer,
in the sense that I never learned how to program efficiently and beautifully.
Multiplatform issues, and mobile browsers in particular, are driving me crazy
;-) And yes... I feel a bit "naked" now as some of you are digging into my
website code with much expertise. Please be indulgent! ;-) Cheers, Stephane

~~~
calibwam
Thanks for doing this, I'm going to use this page a lot, I think. But have you
thought about open sourcing some, if not all of the code? With the source code
out on for instance github, a lot of people could help you out wherever you
feel your own skills come to short.

~~~
kintamanimatt
If it were me, I'd not open source this. Common tools that are used to build
other things generally are, such as a compiler or VCS, but an actual finished
product, not so much. Open sourcing this would be like Github open sourcing
github.com, rather than just a handful of common tools they built to create
github that might be useful to others.

Open source has a time and a place, but some things, like finished websites,
are best left proprietary. There's a lot of thinking that's gone into this
site. I think the #1 thing that would happen as a result of open sourcing it
is that other people would just take the her work and creating clones, eroding
her ability to make money from it (if she so chooses).

Choosing to open source something should be done only with a compelling
rationale, and the downsides should always be carefully considered.

~~~
audiosampling
You made many valid points! Thanks for sharing these.

~~~
kintamanimatt
Sorry, I misread your name as Stephanie instead of Stephane---I didn't mean to
call you a she instead of a he!

------
JonnieCache
Also fun: loads of real field recordings on
[http://freesound.org](http://freesound.org)

Use the geotag browser and listen to the wilderness of your choice!
[http://freesound.org/browse/geotags/](http://freesound.org/browse/geotags/)

~~~
JonnieCache
Just realised: these are all under various CC licenses, so OP you could easily
integrate them into mynoise.net

------
ewoodrich
Fantastic. I tend to not like rain sound simulators, but the sliders let me
pick one that seemed believable and familiar. I loved how the darker end of
the spectrum let me simulate a visit to the Oregon coast.

(After which, I wished there was actually a storm right now, until I walked
out onto my balcony and realized it was raining.)

"Too much internet for me" as they say.

------
p1mrx
I wrote an Android app based on a similar concept, although it uses a PRNG and
Fourier transform, with no recorded samples:

[https://chromadoze.googlecode.com/](https://chromadoze.googlecode.com/)

------
backprojection
Someone posted ambient warp-core sound from Star Trek on Reddit earlier today,
maybe you could add this.

[http://www.reddit.com/r/startrek/comments/1nwzd6/ambient_war...](http://www.reddit.com/r/startrek/comments/1nwzd6/ambient_warpcore_enginesound_great_for_when_youre/)

~~~
sspiff
An old Linux command line trick to generate the engine sound:

> play -n -c1 synth whitenoise band -n 100 20 band -n 50 20 gain +25 fade h 1
> 864000 1

I used this as a background noise muting sound when I was a kid.

~~~
shmerl
Here is a softer variant:

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

~~~
outworlder
This is the warp core idling.

I'm trying to add a slow warp to it, and after some experiment I got
something. That's the first time I've used sox to generate audio, didn't even
know it could. I'll play with it some more.

play -c2 -n synth whitenoise band -n 100 24 band -n 300 100 gain +20 phaser
0.5 0.3 2 0.8 0.5 -t

~~~
shmerl
Sox can be pretty handy. For example it's easy to use it for musical
instruments tuning (instead of buying some expensive electrical device).

For example for mandolin layout:

4 (G):

    
    
        while true; do play -n synth pluck G3 fade 0 3 vol 0.4; sleep 1; done
    

3 (D):

    
    
        while true; do play -n synth pluck D4 fade 0 3 vol 0.4; sleep 1; done
    

2 (A):

    
    
        while true; do play -n synth pluck A4 fade 0 3 vol 0.4; sleep 1; done
    

1 (E):

    
    
        while true; do play -n synth pluck E5 fade 0 3 vol 0.4; sleep 1; done

------
hobs
Interesting idea and cool presentation, I like the sliders and that I can play
around with it.

I will probably use this at work.

edit: This is really good, I just accidentally left it on and had completely
forgotten I was listening to the same thing. Very much works as advertised.

~~~
bengotow
Agreed - not only is this cool, but the audio samples are pretty high quality.
Great example of HTML5, too. A few years ago, this would have required Flash
;-)

~~~
mistercow
I think you could have hacked it together with bgsound before HTML5, but it
would be less reliable.

------
filereaper
I really like this.

I use simplynoise's noise generators to drown out noise at work (oscillating
brown noise usually)

But I like having an equalizer.

I've opened up multiple tabs and superimposed the noises, it downs everything
out. Hope you can spare the traffic.

~~~
rcthompson
Does it actually generate the sound server-side and send it over the network,
or does it generate it client-side? (i.e. does it actually use much
bandwidth?)

~~~
lost-theory
It loads 20 or so ogg audio files like this:
[http://mynoise.net/Data/OSMOSIS/7a.ogg](http://mynoise.net/Data/OSMOSIS/7a.ogg)

Then I'm guessing the EQ controls the volume. So no it doesn't generate /
stream anything to you server-side.

~~~
theatraine
Right, the EQ controls the volume of each of the 10 (each one corresponds to a
slider) sounds. (Every sound has been previously decomposed into its frequency
components.) The Web Audio API is used for browsers that have it present, else
HTML5 audio elements are used. The slider just adjusts the volume of the sound
(exponentially of course!), leading to an equalizer effect with no filtering
required. (Garnered from looking at the code.)

Interestingly, this could be done using one file (rather than ten) using a Web
Audio API filter node. This would limit the site to only Web Audio API
compatible browsers. Unfortunately, at this time, that's only newer versions
of Chrome, Safari, and I believe FF nightly (slight API variations). However
there is some mobile support through recent Chrome and Safari implementations.

~~~
kaoD
You could filter it yourself with a bit of DSP knowledge. I've seen this
approach working effectively in Firefox without Web Audio API.

Impulse filters are easy to implement, e.g. an averaging low pass filter (or
at least I think so, I'm no DSP expert):

    
    
      out(t) = 1/sum(a) * (a_1 * in(t) + a_2 * in(t-1) + ... + a_n * in(t-n+1))
    

Where "a" is a vector of constant coefficents.

You could even use FFT to modulate the bands separately, e.g.:

    
    
      Sample -> FFT -> Filtering -> FFTi -> Output

~~~
theatraine
Sure, you could pre-calculate your filter coefficients and use a bandpass for
each frequency band then do the math in Javascript however it's slower, and
more involved. Also, unless you're going to be using WAVs, there's going to be
some overhead for the decoding of the sound. Also, the filter won't be very
high order since you're going to be doing at least n*44100 operations per
second (at the standard sampling rate). (Web Audio API filter nodes are only
2nd order but you can cascade them.) Do you have examples of the above working
in Firefox? I'd be curious to see the implementation.

~~~
kaoD
> it's slower

It's slower, but... does it matter if it's not just "slow"? Slower than "so
fast" is still "fast".

> and more involved

That's right.

> Also, unless you're going to be using WAVs, there's going to be some
> overhead for the decoding of the sound.

If I recall correctly, Firefox's Audio Data API does the decoding for you and
provides the final PCM samples even when loading non-WAV formats.

> Also, the filter won't be very high order since you're going to be doing at
> least n 44100 operations per second

If the effect computation is a problem, you can pre-render it in a buffer.

Anyways, n*44100 operations per second is not that much. You actually operate
on buffers, which makes caching useful for the slow part (memory access).
Summing, multiplying, etc. is a piece of cake for your CPU in JIT-compiled
code.

Check this JSFiddle I threw in a couple minutes:
[http://jsfiddle.net/9LpKd/2/](http://jsfiddle.net/9LpKd/2/) (please mind the
awful effect and the fact that it's not audio... I'm not very experienced with
Audio Data API and that would take me a bit more to fiddle with!)

44000 pixel updates, up to 60 times a second, with pretty expensive operations
(sines, cosines and even square roots!), updating DOM values... JavaScript is
fast enough for this.

I can see the problem in mobile devices though, but I'm not even sure Firefox
provides Audio Data API in mobile devices.

>Do you have examples of the above working in Firefox? I'd be curious to see
the implementation.

The only web implementing it that I can remember is
[http://websdr.ewi.utwente.nl:8901/](http://websdr.ewi.utwente.nl:8901/) (you
have to check the HTML5 audio radio button).

Unfortunately the code is minified and it takes a bit to make sense of it
after Beautifying.

------
grn
I use [http://simplynoise.com](http://simplynoise.com) to put my daughter to
sleep. It's _much_ easier when the noise is playing. I also use
[http://rainymood.com](http://rainymood.com) to isolate myself from the
environment when I'm working.

------
conflagration
The sounds are great by themselves, but I had the most fun layering different
generators by opening several tabs. I played around with the EQ and made
something sounding very close to Biosphere with 4 parallel tabs. It really
felt like the tracks were synchronized to fit into each other. Great work!

~~~
samstave
Having a single page where you can add in any filter you wanted would be
awesome.

------
j2kun
How does this work mathematically? Do you take, e.g., a waterfall track and
manipulate its frequency spectrum? Or is it completely synthetically
generated? If it's the latter, then I'm quite impressed that I can't tell the
difference.

~~~
audiosampling
Both. Let's call it re-synthesis ;-)

------
crazygringo
First of all -- awesome concept and execution, and great sound samples. Well-
done.

> Mobile Safari iOS 6 on iPad 2+, iPhone 4GS+

But... not working on my 4S/iOS6. :(

Anyone got it working to play in the background, even when your phone's screen
is off? I also wonder about battery life as HTML5 audio, vs if it were an app.

The creators clearly want to support HTML-only, according to the FAQ, but this
calls for an app if anything ever did -- you want it to run, providing sound
in the background, while you do other stuff (whether on or off your phone).

~~~
gabemart
I don't really understand how it runs on iOS devices at all - to the best of
my knowledge, it simply isn't possible to control device audio volume from
javascript on iOS [1]. Or at least, that seemed to be the consensus last time
I attempted to.

[1]
[https://developer.apple.com/library/safari/documentation/Aud...](https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-
SpecificConsiderations/Device-SpecificConsiderations.html) \- "On iOS devices,
the audio level is always under the user’s physical control. The volume
property is not settable in JavaScript."

~~~
mcpherrinm
You can always reduce the volume in software before sending it to whatever API
plays your sounds. This is especially easy if you're synthesizing the sound
with the desired output volume known.

~~~
JonnieCache
It should be noted that this operation (digital gain staging) reduces
headroom/resolution, although in practice this doesn't really matter.
Especially not with ambient rain sounds.

------
NatW
Nice!! A request: Can you add Pink Noise?:
[http://en.wikipedia.org/wiki/Pink_noise](http://en.wikipedia.org/wiki/Pink_noise)
One (of various youtube examples) here:
[http://www.youtube.com/watch?v=ZXtimhT-
ff4](http://www.youtube.com/watch?v=ZXtimhT-ff4)

~~~
audiosampling
Pink noise can be found under White Noise (because all myNoise noise
generators are spectrally-tunable, there is no reason to have different color
noise generators: the white noise generator can be shaped to any imaginable
color, and a pink noise preset is already provided for you).

~~~
dhimes
This is really great. I listen to sounds like this alot as I find they help me
focus. I've used environmental recordings of rain, storms, and ocean waves for
years (decades, actually) and I usually loop them in Banshee while I work.
I've seen a few of these noise generators in the past but never really came
back to them because they weren't superior to my recordings.

Your generator, however, is exceptional.

One request: when we make a selection, say a preset, would it be possible to
have an indicator that shows what we had set? I find myself selecting
something, then working a while, then coming back and being a bit forgetful!

~~~
audiosampling
Your request has been implemented...

------
kintamanimatt
One strange thing I noticed about this is with the cabin sound, listening to
it for a prolonged period tends to cause ringing in my ears like I've been
listening to loud music, except I'm listening to this at low volumes. This
isn't something I've experienced for low-volume stuff before.

~~~
audiosampling
First time this is reported to me. Please check the last slider. It produces
sonic content above 16 kHz. You may have pushed that slider to the max because
of a possible hearing loss. Although the sound you hear is quiet, the acoustic
pressure may be higher. This is the only reason I can think of...

~~~
kintamanimatt
Actually I did -- well, to about 80% max. My calibrated profile looked a
little like an inverted bell curve.

~~~
JonnieCache
[https://en.wikipedia.org/wiki/Fletcher%E2%80%93Munson_curves](https://en.wikipedia.org/wiki/Fletcher%E2%80%93Munson_curves)

------
msluyter
Great, now I have to keep another dozen Chrome tabs open... ;) Seriously, this
is pretty nice. I currently have rain, fan, ocean, Indian Drone, Tibetan
meditation, and Bamboo running concurrently.

A way to combine sounds without opening a new tab would be be an obvious
improvement. Adding a feature that randomly (very slowly) raises and lowers
volume of a sound from set of subcomponents could be interesting -- it'd give
the sense that the sounds are changing slowly over time and relieve some of
the stasis.

Edit: just noticed the babble generator. This is genius, and exactly what I
need to mask background conversations.

------
LeChuck
This is great. I especially like the cabin noise. I work on ships and for the
first week or so after I get home I need some background noise to help me
sleep. This one sounds quite close to what one might hear on a ship.

------
FYI
Yeah, very cool. Saves people money as well (up to $200):
[http://www.sharperimage.com/si/view/product/Sound-Soother-
Wh...](http://www.sharperimage.com/si/view/product/Sound-Soother-White-Noise-
Machine/201102)

You could stream example outputs 24/7 as net radio channels so they are also
available on other devices / STBs (Roku) / Consoles / Smart TVs etc..

------
guscost
For mobile devices I've been using the WhiteNoise app:

[https://itunes.apple.com/us/app/white-
noise/id289894882?mt=8](https://itunes.apple.com/us/app/white-
noise/id289894882?mt=8)

[https://play.google.com/store/apps/details?id=com.tmsoft.whi...](https://play.google.com/store/apps/details?id=com.tmsoft.whitenoise.full&hl=en)

------
hcarvalhoalves
Oh this is beautiful. Those textures are better than music at times. Loved
playing around with the ocean waves [1], I was able to get close to the sound
that used to make me fall asleep as a kid.

[1]
[http://mynoise.net/NoiseMachines/oceanNoiseGenerator.php](http://mynoise.net/NoiseMachines/oceanNoiseGenerator.php)

------
groundCode
Great resource thanks! I love the Tibetan chanting. Would love something that
subtley changes the sliders over time.

~~~
audiosampling
Hey, this is what the "Motion" buttons does, although the slider do not move
in a visible way.

~~~
ikurei
That's an amazin feature!

I didn't notice it at first either. May be its explanation could be more
visible, or it could be made more obvious...

------
matrix
This site is awesome! A feature request, if I may: on the calibration page, it
would be helpful to have the ability to mute all the sliders except the one
you are calibrating. Or perhaps, like slider in a color tool, have a text box
with a number representing that volume that slider is set to.

~~~
audiosampling
It does! As soon as you move one slider, it mutes all others ;-)

------
onurgu
This reminds me of Aporee Maps:

[http://aporee.org/maps/](http://aporee.org/maps/)

You can just listen to high quality sounds recorded by sound artists around
the world.

It feels like you are in that place. I don't know if it's only me but I recall
hours of me listening to this site.

------
shmerl
Interesting, on Linux, PulseAudio shows many channels in the mixer (for ALSA
plugin in Firefox), when the noise page is opened.

By the way the site mentions using OGG (I guess Vorbis) playback. How does it
work in crippled browsers like mobile Safari, which don't support Vorbis?

------
newsmaster
Don't know why but I find the babble noise really creepy.
[http://mynoise.net/NoiseMachines/babbleNoiseGenerator.php](http://mynoise.net/NoiseMachines/babbleNoiseGenerator.php)

~~~
obitoo
It is rather spooky at first, but once I got over that its excellent for
blocking background office noise.

Now what would amuse me _NO END_ would be if once, (and just once) after a few
hours, it was coded to fade out and play a distinct voice along the lines of
"You're going to die today". I'd love to do that to someone!

------
agladlad
This is fantastic! Love the throat singing and the ability to play with
different presets. I was using the TNG engine noise on youtube before the
24-hour version was taken down, but this is my new jam.

------
sparkman55
These types of sounds are absolutely wonderful for soothing angry babies!

------
gadders
Needs Birdsong:
[http://www.bbc.co.uk/news/magazine-22298779](http://www.bbc.co.uk/news/magazine-22298779)

Everything feels better when listening to the Dawn Chorus.

~~~
audiosampling
There is something like this currently under development. There is a problem
though: my noise generators are supposedly active across the whole hearing
range, from 20Hz to 20kHz. And birds are only producing frequencies above
1000Hz. So, I need to fill up the bottom sliders with other sounds, or find...
really big birds! ;-)

~~~
rpwverheij
perhaps a combination of birds and ocean waves, or frogs, or yes, big birds :)
... It'll be a little puzzle, but +1 for more nature sounds! .. and perhaps
one of my favourites: tibetan gongs!

~~~
audiosampling
Your favourite here :
[http://mynoise.net/NoiseMachines/windchimesGenerator.php](http://mynoise.net/NoiseMachines/windchimesGenerator.php)

------
technojunkie
Oh, this is wonderful! I love Simplynoise but this is even more fun. I hope
they can decrease load times and make this a webapp rather than taking 2 steps
to load the various noises.

------
rsync
Any chance you can make this a sonos-accessible station ?

------
hawkharris
This is a very useful, well designed app. I think I'll use it to help myself
go to sleep and stop procrastinating with HN. :)

------
defen
Wow, really cool app. It really reminded me of how much I miss the sound of
rain and wind.

------
shmerl
Great idea and implementation.

------
matude
Heh, thought it was CSS-based website background noise texture generator…

------
kaoD
Nice job! Being able to share custom presets would be cool.

~~~
audiosampling
It's possible. Just follow the link "Save Your Current Slider Settings" then
the URL. I should make it more obvious though, you are right.

~~~
kaoD
Oh, nice! I'd put it closer to the sliders and make it clear you can share the
saved settings.

I'd also let the user edit it without clicking anywhere. Right now clicking
edit resets the sliders too :(

------
tama
This is really nice. Using it at work now. Thanks!

------
Shtirlic
Tonal Drones are great, iPad application needed.

------
galapago
A (humble) request: Vacuum cleaner sound.

------
rpwverheij
wow, thank you! I think I'll be visiting this site often when in need for
precise brain tuning support

------
tinyzor
Thank you (I have tinnitus).

------
glassdoor
It is working for a highly Hackernews Distracted person, except I have to
write this comment!

~~~
glassdoor
Attention Deficiet Hackernews Disorder

~~~
glassdoor
ADHD

