I'm writing an 10-band equalizer with HTML5 Audio API and JavaScript. From what I researched online, the 10 bands can be created as BiquadFilterNode and connected one after another for the final effect:
var AudioContext = new AudioContext();
var filter = context.createBiquadFilter(); // create the filter node
filter.type = 'peaking';
filter.gain.value = 0; // Default gain value
filter.Q.value = 1;
filter.frequency.value = 60; // and 170, 310, 600, 1000, 3000, 6000, 12000, 14000, 16000 for the rest 9 bands
(A very similar set up can be seen here).
So far so good. But now I'm stuck at the so-called "preamp" that's always seen on a standard equalizer. For example, this is Winamp's:
This is VOX's:
This is VLC's:
etc. you get the idea. My question is: What exactly does this "preamp" do, and how would I program it into my application?