Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Music Analyzation

Author
Message
culmor30
17
Years of Service
User Offline
Joined: 16th Jun 2007
Location: In my head.
Posted: 20th Apr 2009 07:00
If this has been asked before, can you link me? I searched to no avail.

Ever played Audiosurf? I was thinking about trying to do something like that with basic analyzation of beat, pitch, and volume. This could be processed into a txt file or simply loaded into memory.

But that's a bit too complex to start off with. Perhaps a simple visualizer? I have no idea how to start extracting that kind of data from an mp3, especially with dbp. Anyone have any ideas?
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 21st Apr 2009 02:34
Check out the command "Make memblock from sound" command. You'll have to dig around to find out about the format of the memblock though.
culmor30
17
Years of Service
User Offline
Joined: 16th Jun 2007
Location: In my head.
Posted: 21st Apr 2009 05:44
I don't really understand how that'll help me with a visualizer, other than storing the sound in memory?

I should probably be more specific. I want to be able to feed a program a sound file, let's say, "test.mp3." test.mp3 is a song that is about 3 minutes long. I want to have a visual effect generated based on certain things happening with the sound, based on volume, pitch, beat detection or whatever.

Example:

http://www.newgrounds.com/audio/listen/209104

Go to the above site, click on the flash application, scroll over to SimpleWave, click, and turn off transitions. See how that green wave fits to the music? I was wondering if anything like that is possible at all with DBP.
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 21st Apr 2009 08:15
well, once you have the file in a memblock, it's data is completely visible. Along with the "Get sound position" command to tell you where the music playing is, you can derive frequency and amplitude.
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 22nd Apr 2009 14:11
reading mp3 files is more complicated than making memblocks, i suggest searching the dll forum for torreys audio plugin, which kinda will help you out but as far as i remember it had bugs and cant help you further.

What you need is to write your own stuff to read mp3 files.

There is always one more imbecile than you counted on.
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 23rd Apr 2009 06:59 Edited at: 23rd Apr 2009 07:02
Yeah, but writing an mp3 decoder is hard, and DBPro has a Load Sound command that can load mp3's! Once you load the sound all you have to do is make a memblock from the sound.

[edit to avoid double posting]
also, when your load a sound file with dbpro and create a memblock from it, it will be in the same format every time, regardless of whether it's a .wav, .mp3, or whatever other sound format DBPro supports.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Apr 2009 11:37
Take a look at FMOD:

http://www.fmod.org/

People have used it in DBP, such as the feature in April's newsletter.

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 23rd Apr 2009 11:55 Edited at: 23rd Apr 2009 11:55
Quote: "...and DBPro has a Load Sound command that can load mp3's!"

I'm fairly certain it only takes wave files?

Veron
18
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 23rd Apr 2009 13:42
LOAD MUSIC will take an mp3, but LOAD SOUND is wave-only.

Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 23rd Apr 2009 15:58
Yes, but you can't make memblocks from media loaded as music.

Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 24th Apr 2009 00:43
Oh...

Login to post a reply

Server time is: 2024-11-24 09:04:26
Your offset time is: 2024-11-24 09:04:26