lamejs will encode audio.
-
motor.js is a step sequencer library
-
old school sequencing example from a MIDI player.
-
alternatively, one can use DSP as a sequencer, as with tone.js, which attempts to guarantee strong timing.
There are too many resources online to list. Start here
accessing microphone getusermedia examples
-
phonegap/appcelerator + libpd?