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.

AppGameKit Classic Chat / Load and parse music information?

Author
Message
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 22nd Oct 2012 14:14
I'm aware that AGK's limited commandset for audio won't allow this, but using C++ does anyone have recommendations for libraries that I could include into an AppGameKit project that would allow me access to the streaming data from played music?

Ideally I would like to have enough information about the music being played that I could display a visual audio wave based on the audio being played. This information plays a key role in my project, so unless I can find a way to pull this off, the entire thing's going to have to land in the Unfinished Projects folder.


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 22nd Oct 2012 15:14
Ouch, not asking much are ya!

The only DLL I can think off would be FMOD, but that's probably platform specific. Really, I think your only hope would be to adapt an existing sound plugin somehow.

Personally, I would cheat. Like use pre-rendered images of the sound wave. You have to consider how you'd draw the sound wave anyway, maybe using the scissor command, which would be slow. Having the music or sounds as pre-rendered images might save a lot of performance. You could also have a low resolution data stream of the music, like use FMOD or something to record the volume every, say 10th of a second as a byte value, then a 4min music track would take up... 2,400 bytes, you could even interpolate to make it nice and smooth. This might be good for a volume meter. You could even chop that byte in half, giving 4 bits to each channel, like 2 sets of 16 LED's to represent the volume for example, and it would take very little processor time... maybe just have an animated sprite for the lights for super-quickness... so that byte data is actually representing the frame numbers.

I got a fever, and the only prescription, is more memes.
Atreyu
11
Years of Service
User Offline
Joined: 16th Oct 2012
Location: Australia
Posted: 22nd Oct 2012 15:31
I get the following warning in Eclipse when launching for Android:

"The value of the field AGKHelper.myActivity is not used"

It's only a warning and does not affect the app, but... it's annoying. Anyone know why?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Oct 2012 01:12
@VanB:

Yeah, I had a pretty good idea of what I was asking for here and I know it's a lot.

I'd love to fake the audio wave in any way that I could, but the entire project itself relies on this information, so if it's going to be fake info, it's gonna have to be some really GOOD fake info.
Basically, I'm needing to make the music interact with various things... like a visualizer.

I'll take a look into FMOD. Last time I looked, though, I couldn't find much info on it or how to use it.

Thanks very much for the lead!



~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Oct 2012 07:42
So, after a ton of looking around and playing with various ideas, I'm come to the conclusion that I'm not able to get this working. Looking into libraries there seemed to be nothing that offered exactly what I was looking for. There were many that provided music playback and some form of control, but few claimed to provide the handles to the audio data that would be required.

Getting desperate, I looked into possibly opening an mp3 file directly into memory and parsing through the information to get what I wanted. However, the specifications behind the mp3 format were not only hard to come by, but were also very confusing. There was plenty of information to be had regarding frame header information and layout, but I found nothing regarding the audio data itself.

I'm still open to any suggestions someone might have, so if you've got a lead that I could follow, I'd greatly appreciate it.


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 24th Oct 2012 09:39
Yeah, it is kinda sad that this sort of thing is overlooked these days, I mean back in the long long ago, doing this on the 16-bit's was easy, these days it's like pulling teeth.

That's why people rely on FMOD I think, it gives nice easy waveform and realtime FFT data as a standard. There is a demo using FMOD posted in code snippets, with quite a snazzy FFT display, dunno if you could get any ideas from that.

I got a fever, and the only prescription, is more memes.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Oct 2012 11:31
Hmmm, I never ran across anything like that. Could you link me to it? That may just help me out! FMOD was something I couldn't seem to find documentation or examples for.


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 24th Oct 2012 18:36
Ach!, my bad - it was posted in DBPro chat...

http://forum.thegamecreators.com/?m=forum_view&t=200758&b=1

I got a fever, and the only prescription, is more memes.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Oct 2012 22:33
Thanks, Van B! That may be just the thing I'm looking for. Not exactly an easy conversion, but it helps to see code that uses the dll.


~Plystire

A rose is only a rose until it is held and cherished -- then it becomes a treasure.

Login to post a reply

Server time is: 2024-04-27 20:27:36
Your offset time is: 2024-04-27 20:27:36