How to use the Enhanced Spectrum Analyzer
In addition to the VU-meter described inside the How to perform custom feedbacks rendering using graphic bars tutorial, the component allows performing sound analysis during recording and during playback of the recorded sound through the usage of an enhanced FTT-based spectrum analyzer.
The enhanced spectrum analyzer can represent a FFT graph as seen inside the image below:
The FFT graph works by taking a small sample of audio and plotting a graph of frequency (on the x-axis expressed in Hz) versus intensity of the signal (on the y-axis expressed in dB). The graph features two different plots if the audio is stereo, otherwise just the one plot will be displayed.
In alternative enhanced spectrum analyzer can represent a TFFT graph, also known as "spectral view", as seen on the image below:
The TFFT graph works by plotting the intensity of the frequency spectrum of the audio across time, and represents intensity through color; during playback the signal intensity is rendered along the x-axis while the y-axis is used for frequency (expressed in Hz) and depicts the spectrum of the audio at any one point in time: for every point along the x-axis an intensity calculation is done and a dB figure is calculated: the lower the intensity, the darker the color; the higher the intensity, the brightest the color.
The enhanced spectrum analyzer can be accessed through the SpectrumEnh property which implements the SpectrumEnh COM object; an enhanced spectrum analyzer can be instanced by calling the SpectrumEnh.Create method: as seen for other embedded visual feedbacks, the graphic rendering is performed on the surface of a hosting window.
The graphical rendering of this tool is fully customizable and you can modify colors used to render the various elements and hide/show all of the elements of the spectrum representation; for this purpose you can gain access to the various settings through the following set of data structures using the provided methods:
|•||general settings are managed through the SPECTR_ENH_GENERAL_SETTINGS data structure accessible through the combination of the SpectrumEnh.SettingsGeneralGet and SpectrumEnh.SettingsGeneralSet methods.|
|•||rulers rendering settings are managed through the SPECTR_ENH_RULERS_SETTINGS data structure accessible through the combination of the SpectrumEnh.SettingsRulersGet and SpectrumEnh.SettingsRulersSet methods.|
|•||waveform rendering settings are managed through the SPECTR_ENH_WAVE_SETTINGS data structure accessible through the combination of the SpectrumEnh.SettingsWaveGet and SpectrumEnh.SettingsWaveSet methods.|
Samples of use of the SpectrumEnh object in Visual C++ 6 and Visual Basic 6 can be found inside the following samples installed with the product's setup package: