Hello everyone.
I am building a project with Arduino and Android, and I have some difficulties with audios.
In this project I need to control an engine in Arduino which has the amplitude from 0 to 255 (engine power).
In the app I want to offer two options, one of them is to HEAR the microphone audio and turn it into vibration, being 0 = no music and 255 the highest beat.
The same I need to do for local music (MP3), open the media player play the music, 0 = no sound, and 255 the highest beat.
I believe the stevel05 library already does this
https://www.b4x.com/android/forum/threads/audio-visualizer.41850/
but I don't know how to convert to 0 - 255!
I don't need anything complicated like graphics etc ...
I only need one sub returning me values from 0 to 255, where 0 is no song and 255 is the peak (DB) of the song.
I need a Sub that gets these values every millisecond and from this sub I can control the engine.
In the microphone option, I need the audio to be saved, because the user can listen later and convert to beats (0 to 255).
You can see an example here.
This is a female vibrator, it has the option of listening to a song and turning it into vibration, and it also has the option of recording your voice, and as the noise of the recording makes it vibrate stronger.
This is exactly what I need.
Payment is via PAYPAL.
It could be a library, a class or just inline Java code, I don't care about that. I only care that it works on Android 2.3+ and does not crash.
Here is a simple image example what i need.
ps: i dont need the graphics, it is only to show the values 0 to 255 on a music playing.
This is an example of code that I need, I need something like this code below.
Pls if you want to make this, tell me the price VIA PM.
Thank you
I am building a project with Arduino and Android, and I have some difficulties with audios.
In this project I need to control an engine in Arduino which has the amplitude from 0 to 255 (engine power).
In the app I want to offer two options, one of them is to HEAR the microphone audio and turn it into vibration, being 0 = no music and 255 the highest beat.
The same I need to do for local music (MP3), open the media player play the music, 0 = no sound, and 255 the highest beat.
I believe the stevel05 library already does this
https://www.b4x.com/android/forum/threads/audio-visualizer.41850/
but I don't know how to convert to 0 - 255!
I don't need anything complicated like graphics etc ...
I only need one sub returning me values from 0 to 255, where 0 is no song and 255 is the peak (DB) of the song.
I need a Sub that gets these values every millisecond and from this sub I can control the engine.
In the microphone option, I need the audio to be saved, because the user can listen later and convert to beats (0 to 255).
You can see an example here.
This is a female vibrator, it has the option of listening to a song and turning it into vibration, and it also has the option of recording your voice, and as the noise of the recording makes it vibrate stronger.
This is exactly what I need.
Payment is via PAYPAL.
It could be a library, a class or just inline Java code, I don't care about that. I only care that it works on Android 2.3+ and does not crash.
Here is a simple image example what i need.
ps: i dont need the graphics, it is only to show the values 0 to 255 on a music playing.
This is an example of code that I need, I need something like this code below.
B4X:
Sub Process_Globals
End Sub
Sub Globals
Private audio As AudioC
End Sub
Sub Activity_Create(FirstTime As Boolean)
'INITIALIZE
audio.Initialize("audio")
'HERE IS THE OPTIONS USING MICROPHONE------------------------------
'START RECORD (THIS WILL FIRE THE audioc_sound SUB, and show values under 0 to 255)
audio.Start_RecordAudio(File.DirInternalCache,"filename.wav")
'A SIMPLE EVENT TO KNOW IF IT IS RECORDING AUDIO
Log(audio.is_Recording)
'THIS WILL STOP THE RECORD AND SAVE THE WAV OR MP3 FILE.
audio.Stop_RecordAudio
'HERE THE OTIONS USING MEDIA PLAYER-------------------------------
'START PLAY MUSIC (THIS WILL FIRE THE audioc_sound SUB, and show values under 0 to 255)
audio.Play_Music(File.DirInternalCache,"music.mp3") 'MP3 OR WAV
'A SIMPLE EVENT TO KNOW IF IT IS PLAYING MUSIC
Log(audio.is_Playing)
'A OPTION TO PAUSE PLAYING MUSIC
Log(audio.Pause_Music)
'A OPTION TO RESUME PAUSED MUSIC
Log(audio.Resume_Music)
'A OPTION TO STOP A PLAYING MUSIC
Log(audio.Stop_Music)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
If audio.is_Recording Then audio.Stop_RecordAudio
If audio.is_Playing Then audio.Stop_Music
End Sub
Sub audio_sound(level As Int) 'THIS LOG A VALUE UNDER (0 TO 255), 0 = NO SOUND OR MINIMAL SOUND AND 255 = MAX AUDIO
Log(level) 'HERE I WILL MAKE THE ENGINE VIBRATE
End Sub
Pls if you want to make this, tell me the price VIA PM.
Thank you