Skip to content

Instantly share code, notes, and snippets.

@carbide-public
Created June 29, 2017 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save carbide-public/f1b2fb14a40178058e1475ac2d6b32c7 to your computer and use it in GitHub Desktop.
Save carbide-public/f1b2fb14a40178058e1475ac2d6b32c7 to your computer and use it in GitHub Desktop.
Tiny Music
export default new AudioContext();
import TinyMusic from 'tinymusic';
import ac from './ac.js'
// set the playback tempo (120 beats per minute)
var tempo = 120;
// create a new sequence
var sequence = new TinyMusic.Sequence( ac, tempo, [
'G3 q',
'E4 q',
'C4 h'
]);
// disable looping
sequence.loop = false;
sequence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment