This Gist was automatically created by Carbide, a free online programming environment.
Last active
August 25, 2016 02:01
-
-
Save antimatter15/f2ff5e917d93b484488bd5b9335548ad to your computer and use it in GitHub Desktop.
Tiny Music
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default new AudioContext(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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