Responsive image

Alternatives to Lookahead Audio Scheduling

Joe Sullivan
The scheduling of web audio events occurs in the UI thread, which is optimized to respond to user input and to provide visual feedback. The setTimeout and setInterval interfaces provide an imprecise method of scheduling, and in background tabs the UI thread virtually ceases. Lookahead scheduling (à la “A Tale of Two Clocks”) is an established audio scheduling strategy, though it relies on the UI thread running continually. This talk surveys alternative scheduling strategies, including all-at-once scheduling and the pre-rendering of audio using the OfflineAudioContext (as described in “A Tale of No Clocks”), which tie the burden on the UI thread closely to user interactions. I discuss the general pattern pre-rendering implies through a demonstration of a proof-of-concept implementation, and explore the range of applications that suit pre-rendering, including the smallest of loop-based web tools (e.g. metronomes) and large-scale DAW projects where pre-rendering provides the added benefit of reducing computational demand during playback.
            
@inproceedings{2016_EA_69,
  abstract = {The scheduling of web audio events occurs in the UI thread, which is optimized to respond to user input and to provide visual feedback. The setTimeout and setInterval interfaces provide an imprecise method of scheduling, and in background tabs the UI thread virtually ceases. Lookahead scheduling (à la “A Tale of Two Clocks”) is an established audio scheduling strategy, though it relies on the UI thread running continually. This talk surveys alternative scheduling strategies, including all-at-once scheduling and the pre-rendering of audio using the OfflineAudioContext (as described in “A Tale of No Clocks”), which tie the burden on the UI thread closely to user interactions. I discuss the general pattern pre-rendering implies through a demonstration of a proof-of-concept implementation, and explore the range of applications that suit pre-rendering, including the smallest of loop-based web tools (e.g. metronomes) and large-scale DAW projects where pre-rendering provides the added benefit of reducing computational demand during playback.},
  address = {Atlanta, GA, USA},
  author = {Sullivan, Joe},
  booktitle = {Proceedings of the International Web Audio Conference},
  editor = {Freeman, Jason and Lerch, Alexander and Paradis, Matthew},
  month = {April},
  pages = {},
  publisher = {Georgia Tech},
  series = {WAC '16},
  title = {Alternatives to Lookahead Audio Scheduling},
  year = {2016},
  ISSN = {2663-5844}
}