-
Hi! Kedaman
I want your email address to send you my audio spectrum analyzer source code which is not working smoothly. You had told me that you can write a routine for decreasing the bar levels once they have reached up. this will make them look smooth.
But :( I failed. It didn't work out properly.
Hope you can make it work.;)
:p Kinjal :p
-
[email protected] - For mail -checks every day
[email protected] - For sending files - checks only when someone told me to send me something
One thing before you send, is this the same thing that i tried out in this thread: http://forums.vb-world.net/showthrea...threadid=14668
If so then I've seen it's updating resolution to be too bad to create a spectrum analyzer from it. On the other hand you can create a simple VA meter.´If you have your amplitude updated at 44100 times a second then i will gladly have a look at your code
-
Yes it's the same code and the amplitude is updated 1000 times a second using a timer control of interval 1mS. Is there any other way to make the sampling rate 44100 Hz.
Can you plaese help me?
Kinjal
-
My testings reveals that the amplitude updates about 20 times a second, even if i get the amplitude each 10 µs. I'm sorry but there's no way of making a spectrum analyzer out of that.
-
Oh no :(
My entire work wasted! I spent hours searching data and tutorials on Fourier series and tried to make my spectrum analyzer look like Jet Audio or MS Media Players Bar visualisation.
But I failed.......................:(
-
Hmm, I havn't seen much of the code but I think there could be a way around the problem however it will take up most, if not all of your cpu time while it's running.
You need a very small program that runs as a module (set the startup object to sub main) this code then sets it's thread priority to high and goes into a continuous loop constantly checking the audio level and using sendmessage callback the callback function terminates the program if it recieves a Quit message, you can use waitforsingleobject tocause the thread to pause while it's not checking and free up resorces.
the calling program (the one that displays everything) uses the shell comand to start the small program (passing in it's hwnd as a command line) and subclasses itself to recieve the messages, then it can just return 1 to keep the program going and 0 to stop it. you'll probably want a form with an end button and a doevents line in the loop for the small program so you can end it manually, but you should get rid of this when you're sure it's gonna work and that's when you'll see the speed increce.
This is quite a techy way of doing it, it's not something I'd find easy but I'll give you some pointers along the way if you need them.
Hope this helps.
-
Well i am just having to illustruate how it work Sam, I have bars that shows the amplitude and it updates as fast as possible but it looks like this:
:):):):):):):):):):):):):):):):):):):):):):):):):):):):):):)
:(:(:(:(:(:(:(:(:(:(:):):):):):):):):):):):):):):):):):):(:(
:):):):):):):):):):):):):):):):):):):):):):):):):):):):):):)
:):):):):):):):):):):):):):):):):):):):):(:(:(:(:(:(:(:(:):)
:):):):):):):):):):):):):):):):):):):):):):):):):):):):):):)
:):):):):):):):):):):):):):):):):):):):):):):):):):):):):):)
:):):):):):):):):):):):):):):):):):):):):):):):):):):):):):)
:):):):):):):):):):):(:(:(:(:(:(:(:(:(:(:):):):):):):):):):)
:):):):):):):):):):):):):):):):):):):):):):):):):):):):):):)
So now you see what the problem is
-
I've not seen anything of the source but if you can show it to me I'd love to help, if there is is one thing I can do well it's performance algorithms.
Although from what I hear, in a sample rate of 44100 using a timer control would be a mistake, you should be able to time a mod function in there to break out to the graph when you need to.
[email protected]
let me know if you can send me the project.
Cheers
-
I have one spectrum analyzer code which I downloades from http://www.fullspectrum.com/deeth .It uses picturebox to display vertical bars. The resolution and smoothness are good but I wnat the same thing with my code which loads bitmaps from a picture clip controldepending on the sound amplitude. I tried making it with the deeth spectrum code but my system hangs with the modified code.
Also one thoing I noticed about that even at design time we can not move the position of any of the controls. I don't know how the programmer has done this.