Beepbox
Note: This package was originally called beepbox
, but I've renamed it as beepbox-lite
to give access to the rightful owner of Beepbox!
A simple library for playing beepbox songs. This library is a more polished version of what I made for my 2018 JS13kGames entry!
This is an open source project under the MIT license, see LICENSE.md for additional information.
Usage
Create an audio context and load a song
import Audio from 'beepbox';
import song from './song.json';
const player = new Audio(song);
Play a beepbox song (once)
player.play();
Loop a beepbox song (infinitely)
player.loop();
Play a single note
player.note(freq, len, off, type, gain);
Example
'use strict';
import Audio from 'beepbox';
import song from './song.json';
const player = new Audio(song);
player.play();
Contact