iTunes Visualizer Plugin in C# - Energy Function
- by James D
Hi,
iTunes Visualizer plugin in C#.
Easiest way to compute the "energy level" for a particular sample?
I looked at this writeup on beat detection over at GameDev and have had some success with it (I'm not doing beat detection per se, but it's relevant). But ultimately I'm looking for a stupid-as-possible, quick-and-dirty approach for demo purposes.
For those who aren't familiar with how iTunes structures visualization data, basically you're given this:
struct VisualPluginData
{
/* SNIP */
RenderVisualData renderData;
UInt32 renderTimeStampID;
UInt8 minLevel[kVisualMaxDataChannels]; // 0-128
UInt8 maxLevel[kVisualMaxDataChannels]; // 0-128
};
struct RenderVisualData
{
UInt8 numWaveformChannels;
UInt8 waveformData[kVisualMaxDataChannels][kVisualNumWaveformEntries];
// 512-point FFT
UInt8 numSpectrumChannels;
UInt8 spectrumData[kVisualMaxDataChannels][kVisualNumSpectrumEntries];
};
Ideally, I'd like an approach that a beginning programmer with little to no DSP experience could grasp and improve on. Any ideas?
Thanks!