Code Monkey home page Code Monkey logo

birdman's Introduction

#Recreating the Birdman opening credits with HTML5 Web Audio APIs

See the demo here

The opening credits to the 2014 Best Picture Birdman was exceptionally creative. The music is composed primarily of a standard jazz drum set, and for each beat or loud hit of the cymbal, letters would appear on the screen, slowly filling out sentences.

This is my attempt to recreate that effect using the Web Audio APIs available in most modern browsers.

To do this, we download an .mp3 and pass it through a filter to better isolate the louder drum and cymbal hits. Then we loop through the channel data, and based on an arbitrary threshold (for this project it was 0.22), we make a note of when that beat occured in the track (1.445 seconds, for example).

Finally, after we have an array containing the timing of all the sound "peaks", we simply set a series of window.setTimeouts, each with a callback to update the UI.

Note: If this were a more Javascript intensive application, you might want to find something more precise than window.setTimeout.

Two great links to learn more about this approach:

  1. Intro To WebAudio
  2. Beat Detection with WebAudio

The copyright to the track 'Get Ready' by Antonio Sanchez belongs to Antonio Sanchez

birdman's People

Contributors

markmarkoh avatar szkl avatar

Stargazers

Abel Trujillo avatar

Watchers

James Cloos avatar Abel Trujillo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.