Implemented chroma-based major/minor chord detection in AudioAnalyzer and exposed results in AudioFeatures. Updated HUD to display detected chord names. Added a new "CHORDS" fractal preset that visualizes the current chord with large pixel text, modulated by confidence and beat. Extended pixel font for chord display. Ensured graceful handling when no chord is detected. These changes enhance both analysis and visual feedback for harmonic content.
28 lines
667 B
C#
28 lines
667 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 int DetectedChordRootIndex;
|
|
public int DetectedChordType;
|
|
public float DetectedChordConfidence;
|
|
public float[] Spectrum;
|
|
public float TimeSeconds;
|
|
|
|
public static AudioFeatures CreateEmpty(int spectrumBins)
|
|
{
|
|
return new AudioFeatures
|
|
{
|
|
Spectrum = new float[spectrumBins]
|
|
};
|
|
}
|
|
}
|