Home

Awesome

sharp11-web-audio

A Sharp11 plugin for playing notes, scales, and chords with Web Audio.

Introduction

This module is designed for use with the Sharp11 library. It comes with a piano soundfont and a simple loader that exposes functions for playing notes, scales, and chords from Sharp11.

Install

npm install sharp11-web-audio

Usage

var s11 = require('sharp11');
var audio = require('sharp11-web-audio');

audio.init(function (err, fns) {
	// Your code here
});

fns.play(obj, start, duration, callback)

Chords and arrays of notes are played all at once. Scales are played in succession, with the duration applying to each note individually.

fns.arpeggiate(obj, start, duration, callback)

Scales, chords and arrays of notes are played in succession, with the duration applying to each note individually.

fns.stop()

Stops all objects scheduled to be played in the future and their callbacks.