A music composer interface for the Web Audio API supporting rhythms, multiple instruments, repeating sections, and complex time signatures.
Band.js is a JavaScript library that acts as a music composer interface for the Web Audio API. It enables developers to programmatically create, sequence, and play music in web browsers by providing abstractions for instruments, rhythms, time signatures, and song structure. It solves the problem of managing low-level Web Audio API nodes and timing manually.
Web developers and creative coders who want to integrate dynamic music generation, game soundtracks, or interactive audio experiences into their web applications without deep audio engineering expertise.
Developers choose Band.js for its intuitive API that mirrors music notation, its support for complex musical structures like repeating sections and custom tunings, and its flexibility through loadable packs. It strikes a balance between high-level composition and low-level Web Audio control.
Band.js - Music composer interface for the Web Audio API.
The API mirrors traditional music concepts, allowing notes to be added with rhythms like 'quarter' and pitches like 'C4', making composition straightforward for developers familiar with music theory, as shown in the get-started example.
Supports loading custom instrument, rhythm, and tuning packs via Conductor.loadPack(), enabling extensibility beyond default oscillators and noises, with detailed data formats provided in the API documentation.
Includes support for repeating sections with repeatStart() and repeat(), complex time signatures, and multiple instrument tracks, facilitating structured song creation for web-based games or tutorials.
Allows saving and loading complete compositions in a structured JSON format, making it easy to persist and share songs, as detailed in the 'Loading Songs with JSON' section.
The setTimeSignature method only allows bottom numbers of 2, 4, or 8, restricting complex musical meters that might require other denominators, a limitation noted in the API table.
The note buffer length setting can cause browser crashes if increased too high, as warned in the setNoteBufferLength documentation, posing a risk for long or dense compositions.
Creating custom instrument packs requires implementing a specific function that returns AudioNodes, demanding deeper Web Audio API knowledge and can be error-prone, as hinted in the loadPack examples.
A plugin for recording/exporting the output of Web Audio API nodes
Library to simplify the way you create and manipulate sounds with the Web Audio API.
A JavaScript library for real-time audio synthesis and composition from within the browser
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.