Tonejs / Tone.js

A Web Audio framework for making interactive music in the browser.
https://tonejs.github.io
MIT License
13.56k stars 989 forks source link

Tone.Signal generator should be a looped BufferSourceNode #24

Closed tambien closed 10 years ago

tambien commented 10 years ago

The constant signal generator at the heart of Tone.Signal is currently an Oscillator through a WaveShaper, but it could be simplified to just be a Buffer where the output is always 1 set to loop.

tambien commented 10 years ago

This doesn't seem to have an effect on performance for any of the platforms that i tested it on.

but then again, it's very difficult to performance test Web Audio...

cwilso commented 10 years ago

Note that looping a cycle buffer is actually worse, because it won't band-limit, and you'll get aliasing artifacts.

tambien commented 10 years ago

thanks. that's good to know.

Do you have any suggestions or references for how to do performance tests / comparisons with Web Audio?

cwilso commented 10 years ago

Not really. You need to track the impact of the audio thread.