chrome – Parerga und Paralipomena http://www.michelepasin.org/blog At the core of all well-founded belief lies belief that is unfounded - Wittgenstein Sun, 19 Jun 2011 20:23:52 +0000 en-US hourly 1 https://wordpress.org/?v=5.2.11 13825966 Enabling web-audio in Chrome http://www.michelepasin.org/blog/2011/06/19/enabling-web-audio-in-chrome/ Sun, 19 Jun 2011 20:23:52 +0000 http://www.michelepasin.org/blog/?p=1028 I haven’t realized that Chrome has a whole bunch of invisible experimental settings that you can turn on just by going to “about:flags“.

 

Chrome about:flags options view

 

Some of them will open up the musical capabilities of html5, which are pretty cool. Example, once you switch on the ‘web-audio‘ setting on Chrome, if you use a suitable musical musical library you could play a note just by issuing these javascript commands:


var n = Note.fromLatin('A4'); 

var freq = n.frequency(); // returns 440 
var name = n.latin(); // returns "A" 
var octave = n.octave(); // returns 4

 

The full example (with sound, if you’ve turned on the Web Audio setting as mentioned above) can be seen here: musicjs demo.

More info about web audio and related stuff can be found on this blog post: http://pixelist.info/web-audio-it-is-finally-almost-here/

]]>
1028