Skip to main content

Module analysis

Module analysis 

Source
Expand description

Higher-level inference functions over chords, scales, and keys.

Structs§

ChordSuggestion
One suggestion from suggest_next_chords.
ChordSuggestionResult
Result of suggest_next_chords.
KeyMatch
One row of detect_key’s output: a candidate key, the count of input chords that fit it diatonically, and the total chord count.
ScaleSuggestion
One suggestion from suggest_scales_for_bracket: a candidate scale for a lead-line gap between two chords, with which side(s) of the bracket it fits and a human-readable reasoning string.

Enums§

SuggestionCategory
What kind of relationship a ChordSuggestion represents.

Functions§

detect_key
Score every major key by how many of chords fit diatonically.
suggest_next_chords
Suggest the next chord given the chord history before the cursor and (optionally) a chord at the cursor that should be excluded from suggestions.
suggest_scales_for_bracket
Suggest scales for a lead-line gap bracketed by two chords.