Grab the code or contribute to the project at GitHub.
What is it?
Instrument samples are created using a modified version of the super-tiny ZzFX sound generator by Frank Force.
ZzfxM was developed to create music for size-limited productions (i.e. js13k Games). The song format is loosely based on the tracker MOD format, using sequences of repeating patterns to create long songs from small chunks of music data.
Songs are highly compressible. Once gzipped they're tiny — typically, a few hundred bytes.
Playing a song
Audio samples are compiled by passing instrument, pattern and sequence data to zzfxM(). The function returns a pair of arrays containing sample data for the left and right stereo channels.
To play the rendered song, call zzfxP() using the generated sample data. The zzfxM function returns a AudioBufferSourceNode, which you can use to control the song (stop it, looping etc.).
 The modifications allow ZzFX to create an array of audio data without immediately playing it.
I am back
ZzFXM has an online tracker/sequencer for composing songs and creating instruments.
The repository also contains a song convertor, allowing you can use tools such as MilkyTracker or the browser based Bassoon Tracker to compose your songs (in M.K. MOD format) and then convert them to ZzFXM. Once the song data is converted you only need to create and assign your instruments. All the example songs on this page were created using this method.
You could also forego the authoring tools and generate songs procedurally. See the README for details about the song format.
 Because of it's tiny footprint ZzFXM doesn't support many of the effect codes used by these trackers. See the README for more details.
The ZzFXM repository contains a tool for converting songs from other formats into ZzFXM. Right now, there's only a convertor for ProTracker MOD (M.K.) format. I hope to add more in the future.
The ZzFXM repository contains a song compression tool, which can be used to create compact versions of your songs.
Bonus: ZzFX Sound Caching
The original ZzFX library provides a single function to generate and play sounds. For ZzFXM to be able to create and mix instrument samples, this function had to be split into a separate generator (zzfxG) and player (zzfxP). As a result you can now pre-build and cache ZzFX sounds and play them later, saving the CPU cost of regenerating the sample every time a sound is played. If you need to, you can still call zzfx() directly.