Web music API
March 25, 2009 Leave a comment
Just some random ideas for now, but there’s interesting stuff happening now with Flash 10… it has a Sound API that basically allows you to make synthesisers and effects processors in Actionscript.
The project that seems to have the big jump on this is Hobnox AudioTool. Really impressive!
It’s kind of all-encompassing though. I’ve been thinking about something much simpler. For example, say you could play a MIDI file with Flash? (actually, you can…) but how about if you could play it using Flash Sound API ‘instruments’ rather than whatever sounds are in your soundcard?
At the moment I’m not sure exactly what the requirements of an instrument would be. But it’d be something like: a .swf file in standardised form, that maybe contains a single object that implements an ‘Instrument’ actionscript interface. It’d have a method for accepting music data to play and some way of advertising which playback features it supported (eg polyphony, velocity, after-touch etc).
MIDI is an obvious standard to use, but the files are a binary format which isn’t much fun.
I’ve been thinking about maybe a JSON-style version of MIDI. Something more or less human-readable and fairly simple to begin.