Extension. Get Level sound Microphone



Hello friends,

in this tutorial I wrote about get FFT and Level sound mic from souns files, tutorial is in Spanish but you can copy and paste code of JavaScript.

Click to see what it is about: [http://www.smartjava.org/examples/webaudio/example3.html]


Adapted from: http://www.smartjava.org/content/exploring-html5-web-audio-visualizing-sound

Tutorial is:


To begin to obtain levels I have put two blocks (StartForCompanion and StartForGooglePlay), depending on how you are going to use the emulator, or compile it for the Google Play, try one and another block to check if it works.

It can get levels from 0 to 32768
p139C_Extension_Microfono_VU.aia (10.6 KB)
com.KIO4_VUmeter.aix (8.8 KB)
com.KIO4_VUmeter.aix (10.5 KB) (Last version. 30/sept/2018)(Level in dB)

You can obtain more information in:

Hola amigos, mediante esta extensión podemos obtener niveles de sonido del micrófono del móvil. En el ejemplo adjunto, según el nivel de sonido se irá dibujando una línea vertical.
He puesto dos manera de Iniciar, según estés utilizando el emulador, construyendo para Android más antiguo o para Android destinado a la Play de Google, prueba las dos opciones para ver si funcionan.

[Free] Extension. Get Frequency tone Microphone

thank you for your contribution…
what about detecting in your code, if it is running in the companion app?
if yes, use the companion code else use the Google code?


I put two blocks to compile with “Build App” and “Build App for Google Play”.
Block “StartForCompanion” works with MIT Companion and Build App.
If user need compile to App for Google Play, use “StartForGooglePlay”.


Other example:

p139C_Extension_Microfono_VU_2.aia (18.4 KB)

Noisy : Sound Level Meter

Other example, level sound in dB:
p139C_Extension_Microfono_VU5.aia (240.8 KB)

In this message the author explains quite well certain concepts:

To measure the level of sound captured by a mic, dB (spl) is used, this is a pressure measurement referenced to 20 ÎĽPa.


I have modified my extension (30/sep/2018) and added the GetLeveldB block (I prefer to GetLevelDb), this block contains the adapted code that is at the end of:

public class NoiseRecorder {…}

Each microphone can be different and must be calibrated with a pattern.


great work man … very helpful extension :slight_smile:


Thank you @aylin_mohamed what Android version does you use? Can you Build it for the Play Store?


api + 26 and yes i will try to do it for play store … after i done i will post here and mention you :slight_smile: if you dont mind


Hi, great job. Can I use this in my application for free, do I have to pay? Thank you :wink:


It is free. Gratis.


Thank you very much.
I will ask you if you can change or add a different graphic indicator? . Best Regards, Tom


THIS is my app using your extension
why the extension not working in some phones :slight_smile:


Thank you very much!!!

But , is possible , to STOP the “STARTFORCOMPANION”?

Togheter the Speechrecognizer1 doesn’t work! :frowning:


Dear Juan_Antonio,
thank you very much for made a awesome extension “KIO4_VUmeter1”. It work fine in Android 5.1 and also below android version 5. But my problem is your extension is not working in higher android version (mean above android version 5.1). can you please solve this problem.

Problem is

  1. when install the app first time in mobile it work fine, but again open the app and press start button it shows “Runtime Error”.
  2. Even i try your all app like " p139C_Extension_Microfono_VU.aia" showing same error in higher android version.

I request solve this problem.

First time installing app, it work fine but closing app and again open and press start it show a error" Runtime Error".