Here’s a demonstration of metronome using HTML5.
http://demo.agektmr.com/metronome/
I’ve confirmed it works on Chrome12, Firefox4, Safari5, Opera10. iOS4 Safari and browser on Android2.3 also works without sound.
HTML5 technologies used:
- Application Cache
- CSS3 transform, transition, box-shadow
- Web Audio API
- Audio Element
- Drag
- WebFonts
No images used. For Chrome12, I recommend to turn Web Audio API on. Type about:flags on Ominibox on Chrome and enter, then relaunch Chrome after enabling Web Audio API. It should work better than without the flag on. If it’s disabled, the program falls back to use Audio element, but is not as stable as with Web Audio API apparently.
The trick is very simple. CSS3 transform and transition enables movement of the bar in specific intervals. When the bar flipping back, Web Audio API or Audio element makes sound of click.
You can start / stop by either clicking on the button or pressing space bar. You can change interval by moving the weight on the bar.
Enjoy!
Comments
Powered by Facebook Comments

HTML5でメトロノームを作ってみた http://ff.im/-AIGP0
久々にブログ書きました | HTML5でメトロノームを作ってみた http://devlog.agektmr.com/ja/archives/721
久々にブログ書きました | HTML5でメトロノームを作ってみた http://goo.gl/GI2Pd
RT @agektmr: 久々にブログ書きました | HTML5でメトロノームを作ってみた http://goo.gl/GI2Pd
Web Audio API とは粋ですね。 RT @agektmr: 久々にブログ書きました | HTML5でメトロノームを作ってみた http://goo.gl/GI2Pd
RT @futomi: Web Audio API とは粋ですね。 RT @agektmr: 久々にブログ書きました | HTML5でメトロノームを作ってみた http://goo.gl/GI2Pd
RT @agektmr: 久々にブログ書きました | HTML5でメトロノームを作ってみた http://goo.gl/GI2Pd
HTML5でメトロノームを作ってみた http://bit.ly/f75GU8
@hkato193 @poohneko 私がビックリ&感動したのは、この2つ http://bit.ly/kqnGHy http://bit.ly/j8vcHk 。同期とはシンクロするものなり。2人ともミュージシャンだし。しかも、汎用OS上で作る難しさに挑むのは技術屋っぽい。