"The phone will listen to the ambient sound, and if it goes above a certain level, an alarm will sound or a music I choose will play. how can i do?
Thank you to those who responded
"The phone will listen to the ambient sound, and if it goes above a certain level, an alarm will sound or a music I choose will play. how can i do?
Thank you to those who responded
Is there a sample study? I can watch and learn about this topic.
thank you
Here there is an example aplication »
[https://gldias.github.io/extensions/SoundPressureLevel/SPL.aia]
@>-->---
SPL (2).aia (38.4 KB)
Did I write the right software? I can't stop the alarm. I'm a beginner in software. I would be very happy if you could help me.
Did you even read the available documentation about the extension? »
[Sound Pressure Level Extension | extensions]
Did you install the Minimal App Inventor Application available? »
[https://gldias.github.io/extensions/SoundPressureLevel/SPL_minimal.aia]
Compared the differences between both options?
Did you read Related Documentation Development?
[Notes for future SPL Extension Developers | extensions]
Did you even understand the process conceptually before creating these lines of code?
The appeal is intended to 'listen' ambient sound and as decibels and make a decision ....
What command of your code do you think 'Gets the Sound Pressure Level Data in decibels (db)'?!?
Read the Properties of the Extension, understand first that each one does... and only then try the commands.
@>->---
You took the time to try to help. Thank you. I'm still reading. I guess I can't do this.
I guess you will be able to do this... after a small reading that allows you to understand the Properties and Events of the extension.
@>-->----
Click again...
@>-->---
The middle one doesn't open. I don't know English. I tried to understand by translating. I did something with what I read and understood and shared what I did. It might make sense to do it with Android Studio. With support from artificial intelligence. Thank you very much for everything.
What language do you speak?
@>-->---
I speak turkish
Use a short sound, so you can test if the alert is being played over and over. You might also want to introduce a delay, so that the alert does not fire immediately after the previous one, or if the level of ambient sound is above your target for longer than 3 seconds
I added short music. I couldn't make the application I wanted. can you help? thank you
OK, the device cannot record audio and play audio at the same time, you need to disable the sound analyser in order to play the audio, then enable it once the sound has finished.
For me, one person speaking normally was in the 60-70 decibel range, I therefore set 80 for louder speaking to trigger the audio.
soundPressure.aia (48.1 KB)
soundPressure.aia (48.1 KB)
Thank you very much. Good jop. I am trying to learn new things. I added new things too.
I am trying to develop the app.
1- I added a loop to the music.
2- I added a button for stopping the music.
3- I added a button to run the app
4- I added adjustable buttons for the application to play music at which decibel level.
5- I added colors to indicate when the application is active (green) and when it is inactive (red).
6- The application was not working efficiently, so I increased 'ListenIntervalMilliseconds' to 1000
I would appreciate it if you could help me with the following issues:
Regarding colours, this works for me (based on my example)