Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
February 11, 2012, 01:07:04 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Check out the Code Section!
Home Help Search Shop Login Register
Digg This!
Pages: [1]
Print
Author Topic: Audio analyzer library  (Read 2142 times)
Raphael
Global Moderator
Hero Member
*

Karma: +230/-10
Offline Offline

Posts: 1431
193700.11 points

View Inventory
Send Money to Raphael


View Profile WWW
« on: November 23, 2006, 11:34:34 AM »

This is my audio analyzer library that I used for Funky Demo to do the beat detection and equalizer. It's not a perfect solution but rather an approximation, but it is fast and flexible. Original code was posted by memon on ps2dev.org, which I took as base and added some features and optimized.

Usage is pretty simple:
- Initialize the analyzer at startup with the number of subbands you want (normally 16 - 32).
- In your music playback code (audio callback), feed the analyzer with the left and right samples through the au_analyzer_feed() function.
- In your mainloop you call au_analyzer_update() every frame and then use the several au_analyzer_get* functions to get information which you can then visualize.

Play around if you like, there's a lot possible with this.
Logged

Don't push the river, it flows.
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
http://www.homebrew-illuminati.co.uk - serious homebrew development for all platforms
Alexander Berl
"A good mod is a combination playground monitor, priest, big brother/sister, psychiatrist, professor and more."


Ryalla
harleyg
Hero Member
*****

Karma: +50/-12
Offline Offline

Posts: 813
9999999.99 points

View Inventory
Send Money to Ryalla


View Profile
« Reply #1 on: December 05, 2006, 03:32:14 PM »

Very nice stuff. That "beat detection" sounds interesting..
Logged
A_Nub
gibbocool rules!
C/C++ Developer
Hero Member
*

Karma: +104/-28
Offline Offline

Posts: 912
3894.18 points

View Inventory
Send Money to A_Nub

Noob am I


View Profile WWW
« Reply #2 on: December 05, 2006, 08:11:00 PM »

so this could be used for a visualizer right?
Like take the beat detection and equalizer and have them post up updating variables that control different visual effects or am i confused as to what this does? Is it like a metronome to detect the tempo?
Logged

Code:
      ____________________
 /---/   ---------------   \---\
/   O   |               |   ?   \
| O   O |               | ||  O |
|   O   |_______________|   X   |
\--- (#) () oo PSP oo ()()   ---/
    \-----------------------/
[/CENTER]
InsertWittyName: That's like saying because you wank with your right hank all the time, and one day you wank with your left, that you invented left handed wanking..
Raphael
Global Moderator
Hero Member
*

Karma: +230/-10
Offline Offline

Posts: 1431
193700.11 points

View Inventory
Send Money to Raphael


View Profile WWW
« Reply #3 on: December 05, 2006, 10:19:49 PM »

Yes, it's basically a visualization data engine for a demo, but could be used for a music player as well. It's not perfectly accurate (esp the beat detection with fast music), but therefore its also pretty fast. I'm still thinking about a more accurate implementation with a FFT to get accurate beat detection and frequency bands.
Logged

Don't push the river, it flows.
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
http://www.homebrew-illuminati.co.uk - serious homebrew development for all platforms
Alexander Berl
"A good mod is a combination playground monitor, priest, big brother/sister, psychiatrist, professor and more."
Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.28 seconds with 28 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com