0

I have got the input of the microphone with Tone.JS library and I'm able to switch it on and off using a checkbox. I would like to calculate the decibel level and then display it on the screen in real-time.

Has anyone got any pointers for this, like code snippets or websites that could help me?

Any help is much appreciated.

Thanks, Alfie

  • Are you able to add an Analyser Node from the web audio API to the output of Tone.js? If not does the library provide access to one? If so I have an answer. – David Sherman Nov 29 '17 at 17:31
  • Note that you aren't going to be able to compute dB SPL unless you do callibration, or, say, have precalibrated your app for a specific device. – Linuxios Nov 29 '17 at 19:45
  • @DavidSherman Thanks for your reply, I've managed to find in the Tone.js library a gainToDb function so i'll be using this, then calibrating to dB(A). – Alfie Mitchell Nov 30 '17 at 15:49
  • @Linuxios Thanks for your reply also, I think I will aim to play a tone through the speakers and calibrate to that. – Alfie Mitchell Nov 30 '17 at 15:50

0 Answers0