

Show HN: Mixable ambient sounds to help you concentrate - gabemart
http://asoftmurmur.com/

======
gabemart
This is the first thing I've ever 'coded' (if you can call it that), so it's
pretty rough around the edges.

It's pretty similar to RainyMood [1] and Coffitivity [2] but with the added
feature that you can play more than one type of sound at the same time and
adjust the volume of each to find a mix that suits you. I was inspired to make
this because that's something I ended up doing manually quite a bit.

It's HTML5 with jquery and jquery-mobile, mainly for the slider elements
(which I didn't know how to make myself). I wish I could have avoided using
jquery-mobile because it was quite a headache trying to deactivate a bunch of
the default features and just use the slider.

It uses the standary HTML5 audio player. When the play button is pressed, all
the audio streams play. When the value of each slider is changed, the volume
for that player is updated with JS.

iOS devices don't support changing the volume via javascript in any fashion,
so this won't work on any iOS device. I don't see a way of getting around
that. It should work in most other modern browsers. Seems to work in IE10, FF,
Chrome and the stock Android browser.

The only slightly tricky thing was getting seamless looping for the audio
samples. The HTML5 audio player has a "loop" setting, but in every browser I
tried it in there was an audible gap between the end and start of playback.
Very annoying in this kind of application. To get around that, each audio
track fades in and out at the beginning and end. When the player reaches the
beginning of the "fade out" section of the main track, about 10 seconds before
the end, it triggers a 25s "glue" track to start playing, which fades in as
the main track fades out. When the glue track begins to fade out, it triggers
the main track to fade in again at the beginning. The end result is something
approaching a seamless loop with constant volume. I think it works quite well
for ambeint noise, but it obviously wouldn't work for anything with a beat.

The sounds are all CC licensed samples from freesound.org [3][4] that I did my
best to mix and clean up. In the unlikely event this ever became popular, I'd
love to make some field recordings myself to get a bigger range of sounds in
higher quality, but that's a bit of a pipe dream.

    
    
        [1] http://www.rainymood.com/
        [2] http://coffitivity.com/
        [3] http://www.freesound.org/
        [4] http://asoftmurmur.com/info.html

