This Gist was automatically created by Carbide, a free online programming environment.
You can view a live, interactive version of this Gist here.(http://alpha.trycarbide.com/anonymous/f1b2fb14a40178058e1475ac2d6b32c7).
This Gist was automatically created by Carbide, a free online programming environment.
You can view a live, interactive version of this Gist here.(http://alpha.trycarbide.com/anonymous/f1b2fb14a40178058e1475ac2d6b32c7).
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 |