Audio Visualizer extension : Audio Graph

AudioVis Audio Visualizer extension

blocks (8)

BarVisualizer: Layout , Color : RBG color input , Density : you can give value in Int or float

blocks (9)

SquareBarVisualizer: Layout , Color : RBG color input , Density : you can give value in Int or float

blocks (10)

CircleVisualizer: Layout , Color : RBG color input , StrokeWidth : you can give value in Int , Radius : you can give value in Int or float

blocks (11)

LineBarVisualizer: Layout , Color : RBG color input , StrokeWidth : you can give value in Int , Density : you can give value in Int or float

blocks (13)

CircleBarVisualizer: Layout , Color : RBG color input

blocks (14)

LineVisualizer: Layout , Color : RBG color input , StrokeWidth : you can give value in Int

blocks (12)

SoundLevel: Left Sound float value between 1.0 to 0 and Right Sound float value between 1.0 to 0

component_method (21)

AskForPermission: You can need to ask for android.permission.RECORD_AUDIO permission

component_method (22)

Reset: Using this block you can reuse the audio player or recover from error state

component_method (23)

Pause: This block will pause the current playing Audio

component_method (24)

Start: This block will pause the current playing Audio

component_method (25)

Release: Audio Visualizer is no longer being used, then call release()

component_method (26)

Stop: This block will end the current playing Audio

component_method (28)

GetDuration: This block will return the current playing Audio Duration

component_method (29)

GetAudioSessionId: This block will return the current Audio session id

component_method (30)

IsLooping: This block will return the current Audio is in loop or not

component_method (31)

GetCurrentPosition: This block will return the current Audio playing Position

component_method (32)

GetCurrentPosition: This block will return the Audio is playing or not

component_set_get (17)

DataSource: Using this block you can set the audio source

component_set_get (18)

Loop: Using this block you can set the audio source in loop playing

component_event (5)

OnComplete: This block will trigger when playing audio over

component_event (6)

OnError: This block will trigger if any error occur

Demo:

ezgif-7-a2efd9b2e7

Line Visualizer :

Bar Visualizer

Circle Visualizer

Circle Bar Visualizer

SquareBar Visualizer

Line Bar Visualizer

Demo Blocks

Note: Before creating View be sure you have set the Audio source

Extension contain these permission:

<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
You need to ask for permission using kodular blocks or use the AskForPermission block

Audio visualizer Library

GautamChibde/android-audio-visualizer: Audio visualisation for android MediaPlayer (github.com)

Download:

Demo apk : AudioVisualizer.apk (5.3 MB)

Demo aia file: AudioVisualizer.aia (44.1 KB)

AudioVisualizer 1.0

extension - com.shreya.AudioVisualizer.aix (37.9 KB)

AudioVisualizer 1.1

Added READ_EXTERNAL_STORAGE permission and fix audio Uri error
extension -
com.shreya.AudioVisualizer.aix (38.1 KB)

AudioVisualizer 1.2

component_event (7)

BufferingUpdate: This block will return the Buffering in number

component_event (8)

OnPrepared: This block will trigger when audio is ready

component_set_get (19)

UrlSource: This can block play audio from url. This block is Buggy and sometime it not work i don’t know why this happening. Block code is correct as per document

com.shreya.AudioVisualizer.aix (40.1 KB)

AudioVisualizer 1.3

com.shreya.AudioVisualizer.aix (30.3 KB)

AudioVisualizer 1.4

Audio Visualizer extension : Audio Graph - #39 by Shreyaa

Support

If you liked my work, you can support me - paypal.me

43 Likes

Amzing @Shreyaa :heart::+1:

1 Like

@sugarlesscreator thank you

Please provide a simple text aia.
How the extension works does not seem self-explanatory.

1 Like

It does not work with an audio file from the assets, neither with Companion nor with the APK. With Companion it only works if the absolute path (to the ASD) is set.

i will fix that in next release

i am making it right now

thanks

3 Likes

Fine, so for now it only works with an absolute path to the external storage (including the ASD), e.g. like this:

1 Like

Another thing: Your extension only declares RECORD_AUDIO in the Manifest, but not READ_EXTERNAL_STORAGE permission. So add this too.

Otherwise the user must add another extension or component, that declares it in the Manifest.

2 Likes

Btw, why does your extension declare RECORD_AUDIO?
I don’t think it’s necessary. Apart from that, you get a warning in the Play Store if this permission is requested / declared.

i was using media player class to get audio session ID to visualizer graph without this permission i was getting error so i added

Yes, checked, you actually need RECORD_AUDIO and READ_EXTERNAL_STORAGE permissions, the latter even when playing from the ASD. This should not be like that. It should work from the ASD without any storage permissions.

To get READ permission in the Manifest I added one of my extensions (or the File component).

1 Like

Audio Visualizer extension 1.1

com.shreya.AudioVisualizer.aix (38.1 KB)

Added READ_EXTERNAL_STORAGE permission and fix audio Uri error

It cannot load audio file from assets i tried hard to load file from assets but not working.
You can use absolute path said by @bodymindpower post#5

3 Likes

thank you for your contribution
are you using any library? if yes, please mention it in your first post of this thread
thank you

Taifun

2 Likes

Good work . :heart_eyes:
:kodular:eep up

1 Like

thank you @mokhlis

Grate Extension

thank you @Sajith_Peramuna

If the audio file is created by the app itself in one of the Shared folders, no storage permissions are required under Android 11+. Here are my blocks that should work with all Android versions if the sound is copied from the assets to one of the Shared folders (in my example /Music).

The block AudioVisualizer.AskForPermission does not trigger the permission granted event. So ask for it as shown in my blocks.

I was almost to be more than happy if this extenssion could have an option to extract images from audio be from sdcard or online audio hosted in any platform server!