Origined from https://gist.github.com/tily/1116803 # JaSound