QMidiGen
QMidiGen is a procedural MIDI music generator with a Qt6/QML interface, written in Rust. It generates complete multi-section songs from musical rules — melody, harmony, bass, and percussion computed fresh on every run rather than sampled or replayed. Ships with a 55-subtype JRPG preset calibrated against actual measured soundtrack data, a piano roll editor, real-time FluidSynth playback, WAV/MIDI export, and an optional MCP server for AI-assisted composition. Cross-platform: Linux, macOS, Windows.
Why I built it
When I was a kid I spent a lot of time with Melody Assistant and a piece of software called Melody Raiser — a simple DOS-era MIDI tool that let you step-sequence notes and hear them play back through a Sound Blaster. It was primitive by any measure, but it was enough to get completely absorbed in. Tiny little tunes, looped endlessly, tweaked one note at a time.
What it couldn’t do was generate anything. You sat down and placed every note yourself. That’s fine for composition, but it meant you spent more time on data entry than on hearing what ideas actually sounded like.
QMidiGen is the thing I wanted back then: something that composes complete songs on its own, that you can steer with high-level controls rather than dragging notes around, and that can produce something recognizable as music without you having to know music theory well enough to voice a chord progression correctly. The procedural generation side handles the details — motif development, call-and-response voices, bass variation, drum intensity by section — so you can focus on “does this sound right” rather than “what interval is a minor third again.”
The JRPG angle came from studying source material seriously enough to notice how wrong my intuitions were. Last dungeon themes are fast and dense, not slow and oppressive. Victory fanfares are the busiest cues in the game, not triumphant held chords. The Final Fantasy IV final boss is in C major. Fixing those assumptions one soundtrack at a time is a slightly over-engineered way to spend an evening, but here we are.
What it actually does
- 51 JRPG subtypes across nine categories — Combat, BossFight, Overworld, Town, Dungeon, Emotional, Uplifting, and more — each calibrated against measured data from Octopath Traveler, Breath of Fire II, Final Fantasy IV, Chrono Trigger, Suikoden II, and others.
- Procedural generation from musical rules: motif system with augmentation and retrograde variations, call-and-response dialogue voices, section-aware drum dynamics, sustained instrument phrasing, Phrygian cadences where appropriate.
- Piano roll editor for post-generation tweaking — add, move, resize notes; per-track mute, solo, lock; randomize instruments or notes per track.
- Real-time synthesis via FluidSynth with 31 bundled soundfont profiles. The soundfont scanner pays attention to more than just calibration.
- Export to MIDI, WAV, FLAC, MP3, OGG, AAC via FluidSynth + FFmpeg.
- Rotation test — standalone quality tool that generates all 51 subtypes across thousands of seeds in about 103 seconds and reports crashes, flat dynamics, samey repetition, and Melody 2 similarity without needing UI or audio hardware.
- MCP server for feeding generation requests from an AI assistant directly into the running app.
Get it
Source and releases on GitLab. Packages for Arch Linux (AUR: qmidigen, qmidigen-git) and FreeBSD. AppImage for Linux, DMG for macOS (arm64 + Intel), NSIS installer for Windows — all on the releases page.
