News for hackers. Stuff that matters.
Re:Accoustic weapon in JavaScript by drgath on Thursday May 12, 2011 @11:05AM (#2540790)
If you were like... "Whoa! OMG, I didn't know browsers could do this?" It's a relatively newly implemented API.

Spec: https://chromium.googlecode.com/svn/trunk/samples/audio/spec... Mozilla API: https://wiki.mozilla.org/Audio_Data_API

Re:Accoustic weapon in JavaScript by robinduckett on Thursday May 12, 2011 @12:26PM (#2541141)
Shame it doesn't work on Linux.
Re:Accoustic weapon in JavaScript by rwaldron on Thursday May 12, 2011 @02:07PM (#2541631)
Re:Accoustic weapon in JavaScript by rwaldron on Thursday May 12, 2011 @01:02PM (#2541317)
Hey everyone! I wrote this little toy... I'm glad you're all enjoying it.

NOTE: OSX, Chrome dev channel (12.0.733.0 dev is the version I wrote this in) w/ Web Audio API enabled is the only way this is going to work for you. Everyone else will have to wait until the API is implemented in your OS of choice.

Lastly, there are very _real_ dangers of exposure to high frequencies such as: hearing loss, nausea, dizziness and vertigo (to name a few). Running this code is your choice, so handle with care!

Re:Accoustic weapon in JavaScript by ChuckMcM on Thursday May 12, 2011 @05:20PM (#2542366)
Having done actual experimentation with weaponized acoustics in college I can assure you that no amount of noise generation on a web page is going to cause harm. Annoyance, yes, harm no.

Now if you're on your gaming rig and you have a 300 - 400 watt subwoofer hooked up, I've got a couple of sound files that can give you cramps :-)

Re:Accoustic weapon in JavaScript by rwaldron on Friday May 13, 2011 @02:21PM (#2545589)
You have the "brown note" on sound files? Nice!
Re:Accoustic weapon in JavaScript by peregrine on Thursday May 12, 2011 @11:36AM (#2540908)
http://jsfiddle.net/ktsum/

Here is a jsFiddle with the code.

Re:Accoustic weapon in JavaScript by robinduckett on Thursday May 12, 2011 @11:50AM (#2540977)
http://jsfiddle.net/RffRn/

Here is a jsFiddle with the code that actually works, or it would, if I had a browser that supported this that didn't crash the second I tried to do anything with it.

Re:Accoustic weapon in JavaScript by peregrine on Thursday May 12, 2011 @12:01PM (#2541034)
My bad.
Re:Accoustic weapon in JavaScript by drgath on Thursday May 12, 2011 @11:52AM (#2540985)
<script src="audio-test.js"></script>

Doesn't actually point to anything in your fiddle.

Re:Accoustic weapon in JavaScript by gmaster1440 on Thursday May 12, 2011 @11:01AM (#2540775)
In Chrome, navigate to "about:flags" and enable Web Audio.

Restart browser and it should work!

Re:Accoustic weapon in JavaScript by robinduckett on Thursday May 12, 2011 @11:21AM (#2540862)
Yeah doesn't work in Chrome 11
Re:Accoustic weapon in JavaScript by mkopinsky on Thursday May 12, 2011 @12:54PM (#2541274)
Yeah, I don't have a Web Audio flag in about:flags in Chrome 11 on Linux.
Re:Accoustic weapon in JavaScript by giberson on Thursday May 12, 2011 @11:30AM (#2540891)
This may seem like a silly question, but is it safe to try at home? [especially if you live alone]

IE, is there a potential that upon activating the demo to become instantly incapacitated and unable to stop it?

Re:Accoustic weapon in JavaScript by drgath on Thursday May 12, 2011 @11:51AM (#2540981)
I ran it on JSFiddle (http://jsfiddle.net/BGW5u/) a few minutes ago, and everything went fine. Though, I now strangely have a craving of human brains for breakfast.

So, yeah, it's safe.

braaaaaaiiiinnsssss

Re:Accoustic weapon in JavaScript by rwaldron on Thursday May 12, 2011 @01:40PM (#2541502)
Hahaha, nice!
Re:Accoustic weapon in JavaScript by BoppreH on Thursday May 12, 2011 @01:01PM (#2541309)
Tested with Chrome 11.0.696 (couldn't find the Web Audio flag), Opera 11.10, Firefox 6.0a1 and even Internet Explorer 9. No sound at all.

Can someone give a description of what's supposed to happen?

Re:Accoustic weapon in JavaScript by rwaldron on Thursday May 12, 2011 @01:03PM (#2541325)
Doesn't work in Firefox, Opera or IE9. It's written with the Web Audio API available in Chrome on OSX (about:flags to enable)

All it does is emits an adjustable frequency sine-tone.

Re:Accoustic weapon in JavaScript by BoppreH on Thursday May 12, 2011 @01:06PM (#2541333)
People have said it many times before, but there's no such flag in this version of Chrome (11.0.696). Is it OSX specific?
Re:Accoustic weapon in JavaScript by paulirish on Thursday May 12, 2011 @01:12PM (#2541364)
It's not available in the stable release. You need to use developer channel Chrome, go to about:flags, enable Web Audio there. Then you can restart and begin abusing your eardrums. :)
Re:Accoustic weapon in JavaScript by rwaldron on Thursday May 12, 2011 @01:34PM (#2541471)
Re:Accoustic weapon in JavaScript by coleGillespie on Thursday May 12, 2011 @01:12PM (#2541362)
read rWaldons comment below...
Re:Accoustic weapon in JavaScript by robinduckett on Thursday May 12, 2011 @11:37AM (#2540915)
Tried it in Chrome 13, the tab crashes immediately. Commented out the "new webkitAudioContext()" and the page loaded. :( I did enable the Web Audio in the flags.
Re:Accoustic weapon in JavaScript by bherms on Thursday May 12, 2011 @10:58AM (#2540763)
"Can't find variable webkitAudioContext" error in chrome, ff, and safari for me.
Re:Accoustic weapon in JavaScript by jarin on Thursday May 12, 2011 @12:01PM (#2541035)
I got the same thing, but enabling Web Audio in about:flags fixed it.
Re:Accoustic weapon in JavaScript by CaptainLurk on Thursday May 12, 2011 @11:30AM (#2540889)
Sounds like birds chirping and a stream. Am I missing something?
Re:Accoustic weapon in JavaScript by rwaldron on Thursday May 12, 2011 @02:50PM (#2541835)
change the hz value... the higher you go, the more dangerous it is.
Re:Accoustic weapon in JavaScript by kaichanvong on Thursday May 12, 2011 @11:16AM (#2540844)
Try putting in 1 and just adding 0's :) Wonderful!
Re:Accoustic weapon in JavaScript by QQexe on Thursday May 12, 2011 @03:40PM (#2542012)
works fine on winXP with Chrome 13 (Canary)
Re:Accoustic weapon in JavaScript by ltamake on Thursday May 12, 2011 @12:57PM (#2541289)
Creepy.