54be1be9ce
chord_file_to_midi() parses the period in the user's original key (no transposition), accumulates held-chord segments, then writes two pretty_midi tracks: chords with root anchored at octave 4 (MIDI 60–71 + intervals) and bass at octave 2 (MIDI 36–47). Extension notes are added as a fifth voice at their standard interval above the root. Tempo is parameterised; the CLI wrapper (python -m src.midi_export) supports --tempo BPM. 10 tests cover: file creation, parseability, instrument count and names, chord/bass note counts for a 4-chord C-major fixture (14 chord + 4 bass), octave placement assertions, and tempo affecting total duration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 lines
130 B
Plaintext
8 lines
130 B
Plaintext
# title: MIDI export test
|
|
# key: C_major
|
|
# time: 4/4
|
|
# subdivision: 4
|
|
# style: user
|
|
|
|
| C . . . | Am7 . . . | F . . . | G7 . . . |
|