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.

DarkBASIC Professional Discussion / sound visualizer help

Author
Message
noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 27th Mar 2011 17:40
i am trying to make a program that makes graphics that are syncronized with music. i have tried to search the forums for a dll. that adds commands that analyze sounds and return stuff such as frequency and volume? is ther such a dll. i found some posts about fmod and bass but no dll
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 27th Mar 2011 19:42
Fmod has a dll that can do that, but it is expensive if you want to use it in a commercial project. Here are some functions i created to use the dll, maybe there are missing some I just copied them from a project I was working on.
The f_music_eq_data() array holds the data for creating an equalizer.

Rasdini
22
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 28th Mar 2011 11:44 Edited at: 28th Mar 2011 11:48
I believe I posted my mp3 player, MP3Master. Check my post. This can give you an idea what can be done with the dll's you can find here. I used the d3dFunc.dll for drawing and text and I used midiplugin.dll for the mp3. You can anylize sound volume from left and right, create equalizer, all I have done in this program. Also the visualizations I created, 45 I think all together, respond to the music and there are volume meters attached to the EQ. This program was reated in Windows XP and it farts and shuts down in windows 7.

here is the link to my mp3 master written in dark basic pro with those mentioned dll's:

http://ishare.sphorium.com/ms/link.aspx?profileLinkID=6431ee16-7e3b-4cf4-8131-3aa969986828

Good luck!
Rich


Richard
noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 28th Mar 2011 16:19
mmh im not very pro yet with programming in general, how am i supposed to use your functions in a program?

the MP3 master program looked great! but there werent any dll. files in the zip u linked me

but thanks for taking your time
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 28th Mar 2011 18:45 Edited at: 28th Mar 2011 19:40
Place the type at the start of your program with the f_Init() below it. Then load a file with f_Stream_Music( "fileToLoad" ). Use f_PlayStreamed( SongID ) to play the loaded song and f_StopStream( SongID ) to stop it. With f_Delete( SongID ) you can delete a song from the array. f_Destroy() should be called at the end of the program, it will delete all songs and the dll from memory. Use f_getFFT to copy the data you need for the visuals to an array. In the loop use f_getMusicData( Index ) to get the data for the visuals per kHz, with a range of 0-63.

[ Edit ] Made a small mistake in the example, it works better now.

Example:

noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 28th Mar 2011 19:40
it says Early exit error "YOU HAVE HIT A FUNCTION DECLARATION ID PROGRAM!" what i gona do?
noobnerd
15
Years of Service
User Offline
Joined: 30th Nov 2010
Location:
Posted: 28th Mar 2011 20:33
fixed! thanks

Login to post a reply

Server time is: 2026-07-16 23:19:40
Your offset time is: 2026-07-16 23:19:40