Cover image for Web Audio API

Book Description

Go beyond HTML5’s Audio tag and boost the audio capabilities of your web application with the Web Audio API. Packed with lots of code examples, crisp descriptions, and useful illustrations, this concise guide shows you how to use this JavaScript API to make the sounds and music of your games and interactive applications come alive.

Table of Contents

  1. Dedication
  2. Special Upgrade Offer
  3. Preface
    1. Structure of This Book
    2. Conventions Used in This Book
    3. Using Code Examples
    4. Safari® Books Online
    5. How to Contact Us
    6. Thanks!
  4. 1. Fundamentals
    1. A Brief History of Audio on the Web
    2. Games and Interactivity
    3. The Audio Context
    4. Initializing an Audio Context
    5. Types of Web Audio Nodes
    6. Connecting the Audio Graph
    7. Power of Modular Routing
    8. Loading and Playing Sounds
    9. Putting It All Together
  5. 2. Perfect Timing and Latency
    1. Timing Model
    2. Precise Playback and Resume
    3. Scheduling Precise Rhythms
    4. Changing Audio Parameters
    5. Gradually Varying Audio Parameters
    6. Custom Timing Curves
  6. 3. Volume and Loudness
    1. Equal Power Crossfading
    2. Using Meters to Detect and Prevent Clipping
    3. Dynamics Compression
  7. 4. Pitch and the Frequency Domain
    1. Pitch and playbackRate
    2. Multiple Sounds with Variations
    3. Oscillator-Based Direct Sound Synthesis
  8. 5. Analysis and Visualization
    1. Frequency Analysis
    2. Animating with requestAnimationFrame
    3. Visualizing Sound
  9. 6. Advanced Topics
    1. Adding Effects via Filters
    2. Procedurally Generated Sound
    3. Room Effects
    4. Spatialized Sound
    5. Audio Processing with JavaScript
  10. 7. Integrating with Other Technologies
    1. Setting Up Background Music with the <audio> Tag
    2. Live Audio Input
    3. Page Visibility and Audio Playback
  11. 8. Conclusion
  12. A. Deprecation Notes
  13. B. Glossary
  14. About the Author
  15. Colophon
  16. Special Upgrade Offer
  17. Copyright