Extension. Get Level sound Microphone

extension

#1

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]

http://www.smartjava.org/examples/webaudio/example2.html

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

Tutorial is:
http://kio4.com/appinventor/169Q_javascript_analisis_sonido_fft.htm

**OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

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:
http://kio4.com/appinventor/239C_extensiones_nivel_microfono.htm
and
http://kio4.com/appinventor/239D_extensiones_frecuencia_microfono.htm

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
#2

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?
Taifun


#3

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”.


#4

Other example:

p139C_Extension_Microfono_VU_2.aia (18.4 KB)


Noisy : Sound Level Meter
#5

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.

http://ec.europa.eu/health/scientific_committees/opinions_layman/en/hearing-loss-personal-music-player-mp3/l-3/2-sound-measurement-decibel.htm

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.


#6

great work man … very helpful extension :slight_smile:


#7

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


#8

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


#9

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


#10

It is free. Gratis.


#11

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


#12

THX FOR YOUR WORK
THIS is my app using your extension
https://play.google.com/store/apps/details?id=com.aylin_studios123.soundmeter
why the extension not working in some phones :slight_smile: