[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
RabidHaMsTeR.Org • View topic - Improving the beat detection

Improving the beat detection

Suggestions + Info on development of R4 visuals

Moderators: rabidhamster, Rovastar

Improving the beat detection

Postby Lagz » Thu Sep 02, 2004 11:48 pm

Re. . my earlier topic asking how you processed the sound.

The visuals in R4 are great, but its biggest problem has to be that it doesn't do a great job of responding to the music. Obviously it works for stuff with a very strong obvious beat, but for rock etc it doesn't work too well at all.

Over the summer I have been fiddling with developing an R4-a-like in java. The summer is nearly over and I intend to stop anything to do with said project (I intend to stick it on web open source in a few weeks). I spent quite a long time looking at how the beat can be picked up and to be honest I think I ended up with something much better than R4. . .unfortunately my knowledge of openGL is pretty cack so scenes weren't that great.

Image

I have no idea how much you looked into the sound detection part of your project. . .maybe you tried all this stuff already, but I thought I would share my ideas incase they are of any use to you. . .

I found the following method works very well at detecting 'beats'. Certainly works better than just adding the value of each bar :). . .

1) FFT a sample of audio into bands, obtaining a spectrum.
2) A number of previous spectrum are stored in memory (I kept 5).
3) The average amplitude of each bar of the spectrum is calculated. .
4) The 'beat' energy of each bar is found by subtracting the average amplitude from the current. (so the beat energy is large if the amplitude is larger than the average energy immediately before it - indicating a beat at that amplitude). .
5) The total energy is the sum of all the beat energies that are over a certain positive limiting value (stops adding on -ve energies and very small energies, so only 'real' beats are picked up).


Dont know if that was any use but I would urge you to stop working on improving the graphical side of R4 which is great already, and spend some time making the beat detection great :).

Lagz
Lagz
 

Postby rabidhamster » Sun Sep 05, 2004 8:56 am

:) cheers for the info. Actually thats pretty much what R4 did anyway - It took the average of each part of the spectrum, and also took the variance over time. It then munged these around to get a value.

It did however use the maximum value rather than adding together. I've changed beat detection in the latest version and it now works a lot better - I just take the sound spectrum, and add together chunks of it like in R2e. I also got a much better FFT by windowing the sound sample first.

So, watch out for the new version. Its still not fantastic, but it is WAY better :)
rabidhamster
Site Admin
 
Posts: 1100
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England

lower frequency beats...

Postby jason e » Mon Oct 04, 2004 12:20 pm

jason e
 

redundancey

Postby jason e » Mon Oct 04, 2004 12:21 pm

jason e
 

Postby rabidhamster » Thu Oct 07, 2004 12:01 pm

rabidhamster
Site Admin
 
Posts: 1100
Joined: Fri Mar 21, 2003 12:31 pm
Location: Cambridge, England


Return to R4

Who is online

Users browsing this forum: No registered users and 6 guests

cron