Equalizer extension for google chrome. Equalizers for VKontakte

  • Tutorial

There were already several articles on the Web Audio API on the hub: creating a visualizer, vocoder and piano in 30 24 lines. Search all over the Internet for the request equalizer stubbornly gave out tutorials on creating spectrograms. (If the title of this article confused you or you still bought the picture :) and were expecting audio visualization - you should go here or here). But I haven’t come across just an equalizer (although I’m sure it exists somewhere). Perhaps this is such a simple task that it’s not worth writing about. But, in that case, why not make it even simpler?

What did you want to get?
Suppose we already have some kind of player. In the simplest case, it is a bare audio element.

I wish we could attach an equalizer to it
var audio = document.getElementById("audio"); equalize(audio); // somehow so that you don’t have to think and it still wouldn’t affect the operation of the player itself.
But let's start from the beginning.

API

Any work with the Web Audio API begins with creating a context:
window.AudioContext = window.AudioContext || window.webkitAudioContext; var context = new AudioContext();
What is important is that there should be only one such object. First, in order for all related objects to work together, they must be created in the same context. Secondly, if you create several contexts (according to observations - 3-4), the browser will crash :)

(UPD: as of 09/21/15, when creating more contexts, the error Uncaught NotSupportedError: Failed to construct "AudioContext": The number of hardware contexts provided (6) is greater than or equal to the maximum bound (6) occurs. That is Chrome allows you to create up to six contexts at the same time)

The first thing we need is to create a wrapper for HTMLMediaElement , which we will work with:
var source = context.createMediaElementSource(audio);

Filter creation code:
var createFilter = function (frequency) ( var filter = context.createBiquadFilter(); filter.type = "peaking"; // filter type filter.frequency.value = frequency; // frequency filter.Q.value = 1; // Q-factor filter.gain.value = 0; return filter);
The only parameter in this case is frequency. The remaining parameters are the same for all filters or change while the program is running. This:

  • type- filter type. Can take one of the following values: lowpass, highpass, bandpass, lowshelf, highshelf, peaking, notch, allpass. We only need a peaking filter - it allows you to selectively emphasize or attenuate a limited band of the audio spectrum.
  • Q - quality factor- changes the bandwidth of the frequencies that the filter affects.
  • gain- the strength with which the filter affects the frequency band.
It is necessary to create filters for the entire set of frequencies. For a 10-band equalizer, these can be 60, 170, 310, 600, 1000, 3000, 6000, 12000, 14000 and 16000 Hz (values ​​copied from Winamp).
var createFilters = function () ( var frequencies = , filters; // create filters filters = frequencies.map(createFilter); // chain them sequentially. // Each filter, except the first, is connected to the previous one. // It’s lucky that reduce without the initial value, it just skips the first element. filters.reduce(function (prev, curr) ( prev.connect(curr); return curr; ));
It is very important to connect the filters in series. When I wrote the first version, my filters were connected in parallel, and the output was nothing but a terrible roar. The cure was not found immediately (mainly because the answer marked as “solution” is not correct).

All that remains is to tie it all together:
window.AudioContext = window.AudioContext || window.webkitAudioContext; var context = new AudioContext(), audio = document.getElementById("audio"); var createFilter = function (frequency) ( var filter = context.createBiquadFilter(); filter.type = "peaking"; // filter type filter.frequency.value = frequency; // frequency filter.Q.value = 1; // Q-factor filter.gain.value = 0; return filter); var createFilters = function () ( var frequencies = , filters = frequencies.map(createFilter); filters.reduce(function (prev, curr) ( prev.connect(curr); return curr; )); return filters; ); var equalize = function (audio) ( var source = context.createMediaElementSource(audio), filters = createFilters(); // the source is connected to the first filter source.connect(filters); // and the last filter is connected to the output filters.connect( context.destination); equalize(audio);
Like this. Equalizer in 30 lines. Then the next step is to bind the controls, but this is an elementary task.

Something like this

// schematically var bindEvents = function (inputs) ( inputs.forEach(function (item, i) ( item.addEventListener("change", function (e) ( filters[i].gain.value = e.target.value; ), false);


Here, in fact, is a demo where an ogg file is streamed and passed through our equalizer, But Only Google Chrome users will be able to enjoy it, while users of other browsers will have to work hard to open a local file, and not just any . Because…

Moment of disappointment

Having assembled the first version of the player, I decided to attach soundcloud to it. It's great to stream songs from the cloud through an equalizer. In the end, everything started up... but only in chrome - the mozilla stubbornly refused to reproduce the stream. But local files at the same time it launched with a bang. And then something terrible became clear:
To prevent this , a MediaElementAudioSourceNode must output silence instead of the normal output of the HTMLMediaElement if it has been created using an HTMLMediaElement for which the execution of the fetch algorithm labeled the resource as CORS-cross-origin. (

The quality of sound playback in Windows 7 depends not only on the cost speaker system and sound chip, but also on the correctness of the settings software. The latter includes an equalizer, which is quite easy to configure in all existing audio players. However, few people know that the equalizer is preinstalled in Windows 7 itself.

Where is the equalizer in Windows 7 and how do I configure it?

To turn on the equalizer in operating system Windows 7 should do the following:

  • Click “Start”, “Control Panel”, set the viewing mode to “Large icons” and look for the “Sound” section.
  • A new window will open. In the "Playback" tab double click open the “Speakers” icon.

There is also a separate equalizer for the sound card. To open and configure it, you should perform the following steps:

  • On the panel Windows tasks Click on the arrow and select “Realtek Manager”.

  • We choose the type of sound according to the style of the musical direction. However, we recommend that you simply turn on audiobooks or radio, and then set the equalizer types in order. This is the only way to choose the right equalizer.

Once upon a time, when I was still using windows XP with all my might, I needed it on a computer, or more precisely on a Lenovo laptop good sound, though not for music, but that doesn’t change the essence.

One of the programs that can improve it is the sound equalizer. I started searching. I had to search for a long time.

I definitely wanted it in Russian, but everyone came across it in English. It was difficult, but I found it translated by enthusiasts, and it fit perfectly onto the laptop desktop.

It's called foobar2000, and you can download it for free, without registration at the end of the post.

Then, I installed it for Vista, for Windows 7, for Windows 8, Windows 8.1 and now I installed it for Windows 10 64 bit.

At first, I really thought about using a gadget or plugin, but they didn’t suit me - the foobar2000 bass equalizer turned out to be better, including for headphones.

  • By the way, you can use not only an equalizer, but a whole musical combine (free in Russian) -

A brief description of the sound settings equalizer which you can download here

This is a simple equalizer for a computer or laptop. There is a small graphical rhythm/spectrum indicator at the top.

Perhaps for some it will not be super best, or as many want professional, but it is good app to adjust the sound.

It's not too pretty, but its simplicity will fit on any screen and give your music the effect you customize.

This stereo music equalizer is multi-band, parametric, for low and high frequencies, and can be easily used for vocals.

Although it is virtual, it can replace a regular one quite well. By the way, if you need an equalizer amplifier, then I recommend

Then get the most powerful system equalizer to enhance and customize your sound.

Yes one more thing. To improve the sound you can also download it for free. With its help you can remove interference.

How to download and configure equalizer foobar2000

Portable (you can carry it with you on a flash drive) and regular - the choice is yours. The Russian language will appear immediately. Enjoy listening to music.

Developer:
Microsoft

OS:
XP, Windows 10, 7, 8, Vista

Interface:
Russian

Yandex sometimes does good things. It is the leader among the number of services Russian companies. Some (especially those that compete with Google), including search and browser, are much worse. Some have no analogues (train schedule, vacancy aggregator, real estate aggregator, market). Music is not analogue Google Music, since it involves free listening even to what you haven’t downloaded. Yes, and it seemed to appear earlier.

Among other things, it does not require registration and installation of plugins and other garbage into the system. This cannot but please me, especially me. A lot has changed since the service was in beta. However, there is still something missing - an equalizer.

Of course, if you have music playing from a laptop with built-in speakers, this does not matter. But if there is good headphones or speakers, then why not? The intercepted url of the song plays much more pleasantly in the native players. But you can’t always do this... And the rules prohibit it.

This is what it looks like for me to always lose

And he also has

It looks like the developers overworked themselves while working on the player and did not master this little detail. But the service is free, it’s a sin to blame Yandex. They already have good service.

pulseaudio-equalizer will come to our aid; it can control the audio stream of the entire system, including from the browser. It may not be as convenient that it affects everything at once, but it works. And it weighs little. You can download the file or in your repository.

Now the sound has really gotten better. You can continue to enjoy music from the browser

Share