Skip to content

Releases: cainky/midigen

MidiGen v1.0.0

08 Dec 03:42

Choose a tag to compare

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 Song to the new MidiCompiler class.
  • Deprecation: Song.generate() and Song.save() are now deprecated. They will function with a warning but will be removed in v2.0.0. Please migrate to MidiCompiler(song).compile().save().
  • Dependency Removal: The music21 library has been removed. Users relying on exposed music21 objects 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 ChannelExhaustedError if more than 15 melodic instruments are added.
  • Section Looping: Section.length is 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 MidiTrack objects 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

10 Sep 18:16

Choose a tag to compare

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