Implemented musical note detection in AudioAnalyzer, exposing dominant note and strength in AudioFeatures. Updated HUD to display detected note. Added "NOTEDROP" fractal preset that animates detected notes as colored glyphs. Extended bitmap font to support sharps. Increased fractal preset count and adjusted HUD layout.
25 lines
552 B
C#
25 lines
552 B
C#
namespace FractalVisualizer.Models;
|
|
|
|
public struct AudioFeatures
|
|
{
|
|
public float Level;
|
|
public float Bass;
|
|
public float Mid;
|
|
public float High;
|
|
public float Beat;
|
|
public float Bpm;
|
|
public float DominantFrequencyHz;
|
|
public int DetectedNoteIndex;
|
|
public float DetectedNoteStrength;
|
|
public float[] Spectrum;
|
|
public float TimeSeconds;
|
|
|
|
public static AudioFeatures CreateEmpty(int spectrumBins)
|
|
{
|
|
return new AudioFeatures
|
|
{
|
|
Spectrum = new float[spectrumBins]
|
|
};
|
|
}
|
|
}
|