This disclosure describes techniques for processing audio files that
comply with the musical instrument digital interface (MIDI) format. In
particular, various tasks associated with MIDI file processing are
delegated between software operating on a general purpose processor,
firmware associated with a digital signal processor (DSP), and dedicated
hardware that is specifically designed for MIDI file processing.
Alternatively, a multi-threaded DSP may be used instead of a general
purpose processor and the DSP. In one aspect, this disclosure provides a
method comprising parsing MIDI files and scheduling MIDI events
associated with the MIDI files using a first process, processing the MIDI
events using a second process to generate MIDI synthesis parameters, and
generating audio samples using a hardware unit based on the synthesis
parameters.