# MIDI Util Examples Working examples created from the [MIDIUtil](https://github.com/MarkCWirt/MIDIUtil) source repo patterns. All examples use MIDIUtil with beats-based (not ticks-based) time, the cleanest API for MIDI composition. ## Setup ```bash pip3 install --break-system-packages MIDIUtil sudo apt-get install -y fluidsynth fluid-soundfont-gm ``` ## Examples | # | File | Description | |---|---|---| | 01 | basic-chord.py | Chord progressions in C major | | 02 | 90s-dance-track.py | Full multi-track 90s dance composition | | 03 | arpeggiator.py | Automated arpeggiator with patterns | | 04 | single-note.py | Minimal single-note example | ## Compositions | # | File | Genre | Duration | |---|---|---|---| | 1 | `midi_output/midnight_drive.mid` | 90s House/Dance (128 BPM, 75s) | | 2 | `midi_output/starlit_conversation.mid` | 90s Slow Jam/Love Song (88 BPM, 99s) | | 3 | `midi_output/tronica.mid` | 90s Trance/EBM (138 BPM, 69s) | ## Quick Start ```bash # Run an example to generate a MIDI file cd examples/ python3 04-single-note.py # Play back fluidsynth -a alsa /usr/share/sounds/sf2/FluidR3_GM.sf2 example.mid ```