Releases: cainky/midigen
MidiGen v1.0.0
Summary
This release introduces a complete architectural rewrite, separating musical data structures from MIDI protocol generation. It removes the heavy music21 dependency, reducing the install size by ~99%, and introduces a verified "Golden Master" testing suite to guarantee binary stability.
💥 Breaking Changes & Deprecations
- Architecture Shift: The generation logic has moved from
Songto the newMidiCompilerclass. - Deprecation:
Song.generate()andSong.save()are now deprecated. They will function with a warning but will be removed in v2.0.0. Please migrate toMidiCompiler(song).compile().save(). - Dependency Removal: The
music21library has been removed. Users relying on exposedmusic21objects in the internal API must update their code.
✨ New Features
- Native Roman Numeral Parser: A lightweight, custom parser replaces
music21. Supports standard Roman numerals (I, ii, V7, vii°, etc.) with zero external dependencies. - MidiCompiler: A dedicated engine for converting musical intent into MIDI events. Enables future support for other output formats (MusicXML, JSON).
- Channel Pool Management: Automatic management of MIDI channels (0-15).
- Smartly skips Channel 9 (Percussion).
- Prevents channel collisions.
- Raises
ChannelExhaustedErrorif more than 15 melodic instruments are added.
- Section Looping:
Section.lengthis now strictly enforced. Chord progressions that are shorter than the section length will loop automatically; longer ones will be truncated.
🐛 Bug Fixes
- Critical Timing Fix: Fixed a major bug where delta-times were calculated incorrectly due to sequential absolute time sorting. Polyphony and complex rhythms now render with bit-perfect timing.
- Type Safety: Fixed an issue where
MidiTrackobjects were mutated into lists during tempo changes. - Golden Master Tests: Added a suite of regression tests comparing binary output against verified "Golden Files" to prevent silent timing corruptions.
Full Changelog: v0.1.0...v1.0.0
v0.1.0
midigen-lib v0.1.0
Highlights
-
High-level composition API - compose with Song, Section, and Key (think verses/choruses).
-
Music theory powered - generate chord progressions from Roman numerals via music21.
-
Multi-track & instruments - add multiple named General MIDI instruments; automatic track assignment.
-
DrumKit - build rhythm parts with named drum sounds.
-
Arpeggios & chords - easy helpers for notes, chords, and arpeggio patterns.
-
Full MIDI control - tempo, time signature, key signature, and more.
-
Low-level building blocks - MidiGen, Track, Note, Chord, etc., for fine-grained control.
Full Changelog: https://github.com/cainky/midigen/commits/v0.1.0