I hacked on this a while ago, and the best libraries I found were one called Wad for playing notes and applying effects, and another called Teoria for building chords and intervals and so on.
I was hindered by not having any idea what I was doing but here's what I came up with:
I was hindered by not having any idea what I was doing but here's what I came up with:
http://www.aphall.com/random/audio-test/ (clicks weirdly in firefox, no idea why.)
Libraries:
Wad: https://github.com/rserota/wad
Teoria: https://github.com/saebekassebil/teoria