Class HarmonicColorAnalyzer
Detects harmonic color features: chromatic notes, modal turns (mixture / modal borrowing), and simple melodic harmony (chord tones vs common non-chord tones).
public static class HarmonicColorAnalyzer
- Inheritance
-
HarmonicColorAnalyzer
- Inherited Members
Methods
Analyze(NoteEvent[], (string Chord, Rational Start)[], KeySignature, HarmonicColorAnalysisOptions?)
Analyze melody + a tuple-based chord progression (as used in examples).
public static HarmonicColorAnalysisResult Analyze(NoteEvent[] melody, (string Chord, Rational Start)[] chordProgression, KeySignature key, HarmonicColorAnalysisOptions? options = null)
Parameters
melodyNoteEvent[]chordProgression(string Chord, Rational Start)[]keyKeySignatureoptionsHarmonicColorAnalysisOptions
Returns
Exceptions
- ArgumentNullException
melodyorchordProgressionis null.- ArgumentException
A chord symbol in
chordProgressioncannot be parsed.
Analyze(ReadOnlySpan<NoteEvent>, IReadOnlyList<ChordAssignment>, KeySignature, HarmonicColorAnalysisOptions?)
Analyze melody + chord assignments in a known key.
public static HarmonicColorAnalysisResult Analyze(ReadOnlySpan<NoteEvent> melody, IReadOnlyList<ChordAssignment> chords, KeySignature key, HarmonicColorAnalysisOptions? options = null)
Parameters
melodyReadOnlySpan<NoteEvent>chordsIReadOnlyList<ChordAssignment>keyKeySignatureoptionsHarmonicColorAnalysisOptions
Returns
Exceptions
- ArgumentNullException
chordsis null.
Analyze(ReadOnlySpan<NoteEvent>, IReadOnlyList<(string Chord, Rational Start)>, KeySignature, HarmonicColorAnalysisOptions?)
Analyze melody + a tuple-based chord progression (as used in examples). Each tuple is (ChordSymbol, StartTime). End times are inferred from the next chord, and the last chord defaults to a duration of 1 whole note.
public static HarmonicColorAnalysisResult Analyze(ReadOnlySpan<NoteEvent> melody, IReadOnlyList<(string Chord, Rational Start)> chordProgression, KeySignature key, HarmonicColorAnalysisOptions? options = null)
Parameters
melodyReadOnlySpan<NoteEvent>chordProgressionIReadOnlyList<(string Chord, Rational Start)>keyKeySignatureoptionsHarmonicColorAnalysisOptions
Returns
Exceptions
- ArgumentNullException
chordProgressionis null.- ArgumentException
A chord symbol in
chordProgressioncannot be parsed.