Class DefaultTransitionScorer
- Namespace
- Celeritas.Core.Harmonization
- Assembly
- Celeritas.dll
Default scorer: prefers functional progressions and smooth bass motion.
public sealed class DefaultTransitionScorer : ITransitionScorer, IMelodyFitScorer
- Inheritance
-
DefaultTransitionScorer
- Implements
- Inherited Members
Methods
ScoreFit(ChordCandidate, ReadOnlySpan<int>, bool)
Scores how well a chord fits the melody pitches, penalizing non-chord tones more heavily on strong beats. Lower is better.
public float ScoreFit(ChordCandidate chord, ReadOnlySpan<int> melodyPitches, bool isStrongBeat)
Parameters
chordChordCandidatemelodyPitchesReadOnlySpan<int>isStrongBeatbool
Returns
ScoreTransition(ChordCandidate, ChordCandidate, KeySignature)
Scores the cost of moving from one chord to another: rewards strong root motion, functional T-PD-D-T flow, and common tones; penalizes regressive motion. Lower is better.
public float ScoreTransition(ChordCandidate from, ChordCandidate to, KeySignature key)
Parameters
fromChordCandidatetoChordCandidatekeyKeySignature