B4A Library Ultimate Audio Library

Hello everyone,

First of all, I'd like to wish everyone a happy new year!
In 2012, I will try to make more and more and better and better libraries for the Basic4Android community.

Now, my first 2012 library is some kind of sequel of the Advanced Camera Library, but instead of working with the camera, the ultimate audio library access features of audio files. (currently .mp3).

it's still in beta version and I will update it with more requests, just like I did with Advanced Camera.

Beta 1 includes:

- Decoding an mp3 file.
- Information about bitrate, etc. Not tested yet!
- Extracting metadata (artist, producer, album, year, etc)
- Setting metaData (artisit, producer, album, year, etc)
- AudioVisualization added! (1.1)

The attachments contains:
- 3 library files (my and 2 others)
- A sample
- A readme

Have fun!

Tomas

I also hope to release 2 more libs tonight:
- AudioVisualisation
- MJPEG
 

Attachments

  • UltimateAudio1.0.zip
    184.1 KB · Views: 337
  • UltimateAudio1.1.zip
    186 KB · Views: 845
Last edited:

COBRASoft

Active Member
Licensed User
Longtime User
I'm in no audio need for the moment on my phone app, but I'm sure it is handy. Thanks :)!
 

BLOKKER

Member
Licensed User
Longtime User
Best wishes too Tomas!

What do you exactly mean with Visualization?

Also I got an NULLPointerException on UAMD.LoadFile (from sample)

Cheers,
Marcel
 

vb1992

Well-Known Member
Licensed User
Longtime User
Last edited:

XverhelstX

Well-Known Member
Licensed User
Longtime User
Yes, the problem is using contentchooser and them selecting gallery.

Then i receive an error too, but it works perfectly when using another app manager like Astro or something.

Note that you can dont have to use contentchooser.

Tomas

Sent from my SE Xperia Play using Tapatalk.
 

NeoTechni

Well-Known Member
Licensed User
Longtime User
Can you use the audio visualizer on the microphone or is it just music?

Also, this doesn't seem to access the media database. Is there a way to extract all the music on the device from the mediastore?
 
Last edited:

Swissmade

Well-Known Member
Licensed User
Longtime User
Mjpeg

Hi all,
All the best for 2012.
I wondering if someone has a MJPG library to stream IP-Cams

best regards,
Swissmade
 

Swissmade

Well-Known Member
Licensed User
Longtime User
Thanks! Because I had no sample of Visualization, I didn't knew what class to use until I searched the XML file, found the class and dimmed it... :)

Thanks for replay.
I search for a code sample to stream MJPEG for Android.

cheers Swissmade
 

serkanpolat

Member
Licensed User
Longtime User
can someone put an example of visualization please?
it seems snoop not working and i cant find any information how to use getwaveform and getfft ..
i am giving an array as 1024

Sub tmr_Tick
Dim fft(1024) As Byte
Dim wf(1024) As Byte
Dim outdata(1024) As Short
Dim kind As Int
uu.getFft(fft)
uu.getWaveForm(wf)
uu.snoop(outdata,kind)
Label1.Text=fft(0)
Label2.Text=wf(0)
Label3.Text=mplayer.Position
End Sub

but i dont know how to show it a meaningful graph..
fft and wf returns minus results also :)))
 

Jenki

Member
Licensed User
Longtime User
hi,

I Make a Sample for a Audio Visualiza. Work only at API 13!!!

B4X:
'********************************
'********************************
'Work only at API13 - Android 3.2
'Autor: Jenki
'Used Lib: UltimateAudio
'********************************
'********************************
'Activity module
Sub Process_Globals
   'These global variables will be declared once when the application starts.
   'These variables can be accessed from all modules.
   Dim UAV  As UAVisualization
   Dim Timer1 As Timer
End Sub

Sub Globals
   'These global variables will be redeclared each time the activity is created.
   'These variables can only be accessed from this module.
   
   Dim cn As Canvas
   Dim rec As Rect
   Dim level As Int
   Dim Panel1 As Panel
   Dim Button1 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)

   Activity.LoadLayout("Main.bal")
   Timer1.Initialize("Timer1",100)
   cn.Initialize(Panel1)   'Initializ the Panel in Canvas

   
   UAV.initialize("UAVV",0)   'Initialize the Visualizer. 0 is for the Generalsoung
   UAV.setCaptureSize(512) 'Set the Max Buffer
   UAV.setEnabled(True)   'Set Enable

   
End Sub

Sub Activity_Resume
   If UAV.Enabled=False Then
      UAV.setEnabled(True)
   End If
   Timer1.Enabled=False
End Sub

Sub Activity_Pause (UserClosed As Boolean)
   Timer1.Enabled=False
   UAV.setEnabled(False)
End Sub


Sub Timer1_Tick
   Dim MBytes(511) As Byte 'Byte in 512 Array = Max BufferSize
   uav.getWaveForm(MBytes)   'Get the Byte from getWaveForm
   cn.DrawColor(Colors.RGB(0,0,0)) 'Clear Pannel
   For i = 0 To MBytes.Length -1   
      level=Bit.And(MBytes(i), 0xff)   'Convert unsignat Byte
      Log(level)
      rec.Initialize(0+i,level,1+i,300)   'Set line
      cn.DrawRect(rec,Colors.Red,True,5dip)   'Draw Line
   Next
   Panel1.Invalidate   'Refresh Panel
End Sub
Sub Panel1_Click

End Sub
Sub Button1_Click

   If Timer1.Enabled=True Then
      Timer1.Enabled=False
      Button1.Text="Timer = off"
   Else
      Timer1.Enabled=True
      Button1.Text="Timer = on"
   End If
End Sub

Cu
Jenki
 

Attachments

  • AudioVisual.zip
    6.7 KB · Views: 360

serkanpolat

Member
Licensed User
Longtime User
Thank you jenki,
this gave me inspiration :)
now i use getwaveForm instead of getFFT

do you know how to seperate left and right channels?
i will get the max peak points of each left and right channel and will show it as vumeter
 
Top