Main > Software Forum

Sound and Programming in VB6

<< < (2/8) > >>

headkaze:
1. Select Start->Run->sndvol32
2. Select your Mixer device for Recording (Eg. Realtek HD Audio rear input)
3. Make sure there is a tick next to Stereo Mix then click OK
4. Make sure there is a tick next to Select under Stereo Mix

Basically what that does is make sure your audio mix is sent through the recording input of your sound card. Run the app again and it should show the VU when you play a song.

digitaldj:
Ok got it! Does VB6 provide a way to filter highs, mids and lows?

Howard_Casto:
If by "filter" you mean manipulate the sound output then yes, but if by filter you just mean filter it for your visulization and keep the actual output constant then no. 

You aren't actually dealing with audio with this method, what you are doing is buffering the raw memory used in the recording buffer (which just happens to be sound) and using it's numerical value to alter the visualization.  It really isn't a good way to do visualizations, but it is the only way to do so without external libraries.  If you want to do anything fancy I suggest you look into some sound libraries that work with vb and support beat detection. 

headkaze:
I'm not quite sure if he wants to manipulate the sound before it comes out of the speakers or just graphically display the audio. But if he wants to show the low, mid and high ranges of audio all you need is the raw audio data. How does anyone do any visualization? It's all with the raw audio data. The problem is the maths behind doing such things becomes quite complex. Using FFT and other fun maths to process buffered audio and output it in a meaningful way is not a walk in the park.

Check out this quote I found on the net regarding a spectrum equalizer for example:

--- Quote ---If you want to actually implement an equalizer, rather than just a spectral display, it's normally done with a bank of IIR (Infinite Impulse Response) filters. You -can- perform the actual filtering in the frequency domain with a "spectral subtraction" (FFT - > IFFT) type of filter, but the calculations for "overlap-add" or "overlap-save" to avoid discontinuities at buffer edges assume a good working knowledge of convolution theory. Assuming you're not a DSP engineer, the least-cost method is to use the IIR filter bank, then run an FFT on the output to display the filtered spectra.

If I remember correctly, the book "C algorithms for real-time DSP" has C source code for doing the IIR bank, and for forward and inverse FFT's. That leaves the code to handle the low-level wave device, and converting the FFT output bin values to magnitude for display.
--- End quote ---

If your not a maths expert or DSP wiz, I'd go with Howard on this and say find a library which can do it all for you.

digitaldj:
Where would i need to look to find these? Have you guys done any projects using sound and would be interested in helping me out. I will release the source code to the forums and all the info on where to get the processor boards and such. Hopefully by making it available people will expand on it.

Thanks,
Jukeman

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version