Utility library for emotional progression presets and Roman-degree parsing. Roman roots are resolved from a tonic using a major-reference semitone map: I=0, II=2, III=4, IV=5, V=7, VI=9, VII=11, plus optional accidentals. Chord quality is then derived from case and supported ASCII suffixes.
More...
|
|
static readonly List< MPTKChordProgressionPreset > | Presets |
| | Built-in emotional progression presets. Intensity and HarmonicTension are subjective ratings from 1 (low) to 5 (high).
|
Utility library for emotional progression presets and Roman-degree parsing. Roman roots are resolved from a tonic using a major-reference semitone map: I=0, II=2, III=4, IV=5, V=7, VI=9, VII=11, plus optional accidentals. Chord quality is then derived from case and supported ASCII suffixes.
◆ FindPreset()
Finds a progression preset by id (case-insensitive).
- Parameters
-
- Returns
- The matching preset, or null if not found.
◆ ResolveDegrees()
| List< MPTKResolvedChordStep > MidiPlayerTK.MPTKChordProgressionLib.ResolveDegrees |
( |
string[] | degreeTokens, |
|
|
int | tonicMidi ) |
|
static |
Resolves a progression to concrete tonic and chord-library entries. The tonic is the root note of degree I/i (for example, C4 = 60).
- Parameters
-
| degreeTokens | Degree token grammar: [accidentals][Roman degree][optional suffix].
- Accidentals: zero or more 'b' or '#', for example "bII", "##IV".
- Roman degree core: I, II, III, IV, V, VI, VII (uppercase or lowercase). Case does not change the scale degree index, only the default triad quality
- uppercase starts from major-triad quality,
- lowercase starts from minor-triad quality.
- Optional suffix markers understood by the parser: "7", "maj7", "sus", "sus4", "sus2", "dim", "o", "b5", "#5", "aug", "+". Practical examples in C:
- "I - V - vi - IV" -> C - G - Am - F
- "I - iii - IV - iv" -> C - Em - F - Fm Canonical degree cores are 7 values (I..VII, upper/lower case intent), but raw token strings are unbounded because accidental prefixes and suffix text can be combined freely. Notes:
- Use ASCII only in the API.
- Half-diminished chords should be written as m7b5-style Roman tokens, for example: "iib57".
- Diminished chords can be written with "o" or "dim", for example: "viio" or "viidim7".
|
| tonicMidi | MIDI note number used as the tonic reference for degree I/i. |
- Returns
- Resolved chord steps ready to map to chord-library names and tonic notes.
◆ CreateChordBuilders()
| List< MPTKChordBuilder > MidiPlayerTK.MPTKChordProgressionLib.CreateChordBuilders |
( |
string[] | degreeTokens, |
|
|
int | tonicMidi, |
|
|
int | channel = 0, |
|
|
int | velocity = 100, |
|
|
long | duration = 500, |
|
|
long | delayBetweenChords = 500 ) |
|
static |
Builds MPTKChordBuilder instances from Roman-degree tokens. Example playback target: MidiStreamPlayer.MPTK_PlayChordFromLib().
- Parameters
-
| degreeTokens | Progression steps in Roman-degree notation. |
| tonicMidi | MIDI note number used as the tonic reference for degree I/i. |
| channel | Target MIDI channel from 0 to 15. |
| velocity | Default note velocity from 0 to 127. |
| duration | Chord duration in milliseconds (-1 for indefinite). |
| delayBetweenChords | Delay in milliseconds inserted between generated chords. |
- Returns
- A list of configured MPTKChordBuilder instances.