audioMotion.js icon indicating copy to clipboard operation
audioMotion.js copied to clipboard

1/3 octave classic graphic eq bands

Open jonathan-annett opened this issue 3 years ago • 8 comments

i'm wondering how closely the bands of an "old school classic graphic equalizer" can be displayed.

https://www.engineeringtoolbox.com/octave-bands-frequency-limits-d_1602.html

i've tried plugging various values into octave-bands-viewer.html in the tools folder, but can't find any settings that work. is it possible to manually define an array of custom bands?

i'm hoping to make a simple tool to assist in tuning a room, which engineers can load up in their web browser, either on a laptop with a reasonable external usb sound card, or on a phone for less acurate measurement (phone mics are not that great)

jonathan-annett avatar Mar 14 '22 23:03 jonathan-annett

Hello Jonathan!

The analyzer bands are created using the equal temperament scale, based on the 440Hz pitch (A4) standard - see reference frequency table here. Using the equal temperament scale has the advantage to allow the visualization of individual musical notes when using the 1/12th octave bands, where each band corresponds to a piano key.

On the other hand, the standard octave and third-octave bands are based on a central 1000Hz frequency, which lies somewhere between B5 and C6, so the frequencies of all bands are slightly different from those of the equal temperament scale.

That being said, your question made me realize that I'm using what should be the center frequency for the band as its lower edge frequency, and that's why the values reported by the viewer tool seem even more distant from the standard bands.

I tried a different approach to generate the frequency bands and this is what the 1/3rd octave bands should look with the new code:

image

I plan to work more on this during the weekend, to implement the changes in the analyzer module.

Do you think that would better meet your needs?

hvianna avatar Mar 17 '22 22:03 hvianna

Hi

I appreciate that from a purist point of view, the frequencies of a classic graphic eq don't perfectly align with the actual music notes /harmonics

However

What I'm attempting to do is create a tool that shows those (impure) bands as they actually are.

In other words I'd like to display the area of the spectrum that will be directly affected by each physical slider on the device.

It appears that its possible to just call getEnergy() with upper and lower band limits. Is that a possible way to go? ( I'd just make my own hardcoded const array and loop around getEnergy() myself. )

Or if you are making changes to allow specifying the centre freq, my array can just define those instead

On Fri, 18 Mar 2022, 9:06 am Henrique Vianna, @.***> wrote:

Hello Jonathan!

The analyzer bands are created using the equal temperament scale, based on the 440Hz pitch (A4) standard - see reference frequency table here https://pages.mtu.edu/~suits/notefreqs.html. Using the equal temperament scale has the advantage to allow the visualization of individual musical notes when using the 1/12th octave bands, where each band corresponds to a piano key.

On the other hand, the standard octave and third-octave bands are based on a central 1000Hz frequency, which lies somewhere between B5 and C6, so the frequencies of all bands are slightly different from those of the equal temperament scale.

That being said, your question made me realize that I'm using what should be the center frequency for the band as its lower edge frequency, and that's why the values reported by the viewer tool seem even more distant from the standard bands.

I tried a different approach to generate the frequency bands and this is what the 1/3rd octave bands should look with the new code:

[image: image] https://user-images.githubusercontent.com/1033735/158900583-7dd72ad1-43fb-4286-bfd5-0643e1d3dc69.png

I plan to work more on this during the weekend, to implement the changes in the analyzer module.

Do you think that would better meet your needs?

— Reply to this email directly, view it on GitHub https://github.com/hvianna/audioMotion.js/issues/28#issuecomment-1071602733, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGSBMHNGX4VXAGYHWX4NODVAOUFJANCNFSM5QW7D6JQ . You are receiving this because you authored the thread.Message ID: @.***>

jonathan-annett avatar Mar 17 '22 22:03 jonathan-annett

@jonathan-annett

In other words I'd like to display the area of the spectrum that will be directly affected by each physical slider on the device.

Ah, I see! I believe getEnergy() should indeed work for you, then. Please let me know how it goes.

I'll look into allowing users to specify the bands center frequency in a future release.

Cheers!

hvianna avatar Mar 18 '22 17:03 hvianna

ok, i had a first pass at this

codepen here https://codepen.io/sophtwhere/pen/qBpRdOJ

cloned copy of codepen debug mode (ie single page full screen)

https://audiogeek.1mb.site/

I'd appreciate any comments on how i am using the audioMotion code - is this a efficient way to do it?

also, i couldn't seem to stop it calling the callback function even after the device is closed. i got around it by saving a flag, however i suspect this is not the ideal way to do it (search for "running" and you will see what i mean)

jon

On Sat, Mar 19, 2022 at 4:34 AM Henrique Vianna @.***> wrote:

@jonathan-annett https://github.com/jonathan-annett

In other words I'd like to display the area of the spectrum that will be directly affected by each physical slider on the device.

Ah, I see! I believe getEnergy() should indeed work for you, then. Please let me know how it goes.

I'll look into allowing users to specify the bands center frequency in a future release.

Cheers!

— Reply to this email directly, view it on GitHub https://github.com/hvianna/audioMotion.js/issues/28#issuecomment-1072637178, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGSBMGJJRFSD6YKX7E44LDVAS5CRANCNFSM5QW7D6JQ . You are receiving this because you were mentioned.Message ID: @.***>

-- Kind regards

Jonathan Annett

You can download my PGP public key here https://keybase.io/jonathanannett/key.asc (to send me encrypted mail using a tool like mailvelope https://www.mailvelope.com/)

jonathan-annett avatar Mar 24 '22 13:03 jonathan-annett

Pretty cool spectrogram!! I think it's as efficient as it can be done.

You can pause/resume the analyzer with toggleAnalyzer() - this will stop triggering the callback.

hvianna avatar Mar 24 '22 21:03 hvianna

So I had a more in-depth look on the standard octave bands specification and I'll definitely try and have it included in the next release of audioMotion-analyzer.

Please keep an eye on this issue for progress information.

hvianna avatar Mar 25 '22 17:03 hvianna

Check out this

https://www.mstarlabs.com/docs/tn257.pdf

I'm working towards using a multi fft approach to optimise hi,mid,low bands

On Sat, 26 Mar 2022, 4:56 am Henrique Vianna, @.***> wrote:

So I had a more in-depth look on the standard octave bands specification and I'll definitely try and have it included in the next release of audioMotion-analyzer.

Please keep an eye on this issue https://github.com/hvianna/audioMotion-analyzer/issues/29 for progress information.

— Reply to this email directly, view it on GitHub https://github.com/hvianna/audioMotion.js/issues/28#issuecomment-1079267825, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGSBMAB45ALKBAMF7N4TI3VBX44VANCNFSM5QW7D6JQ . You are receiving this because you were mentioned.Message ID: @.***>

jonathan-annett avatar Mar 25 '22 18:03 jonathan-annett

The sound quality is really on top compared several players while this one plays very well thank you

borisorlov21 avatar Aug 07 '22 16:08 borisorlov21