Add 3 composed MIDI tracks (midi_output)

- midnight_drive.mid: 90s House/Dance at 128 BPM (75s, 5-track)
  Arpeggiated synth lead, driving bass, pads, brass stabs, dance beat

- starlit_conversation.mid: 90s Slow Jam/Love Song at 88 BPM (99s, 4-track)
  Rhodes electric piano, strings, choir pads, soft drum groove

- tronica.mid: 90s Trance/EBM at 138 BPM (69s, 4-track)
  Multi-section arpeggiated lead, wide pads, trance beat, accent lead

Each .mid has a corresponding .py source showing how to compose it with MIDIUtil.
This commit is contained in:
2026-04-17 22:32:46 +00:00
parent f19e3f0633
commit bc8df7f33b
7 changed files with 573 additions and 21 deletions
+14 -21
View File
@@ -13,34 +13,27 @@ 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 (arpeggio, bass, pads, drums, piano) |
| 03 | arpeggiator.py | Automated arpeggiator with ascending/descending patterns |
| 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
python3 01-basic-chord.py
python3 03-arpeggiator.py
python3 02-90s-dance-track.py
# Play back with fluidsynth
fluidsynth -a alsa /usr/share/sounds/sf2/FluidR3_GM.sf2 90s-dance-track.mid
# Play back
fluidsynth -a alsa /usr/share/sounds/sf2/FluidR3_GM.sf2 example.mid
```
## API Reference
All time values are **in beats** (quarter notes):
| Method | Signature |
|--------|-----------|
| `addNote` | `(track, channel, pitch, time, duration, volume)` |
| `addTempo` | `(track, time, bpm)` |
| `addTrackName` | `(track, time, name)` |
| `addProgramChange` | `(track, channel, time, program)` |
| `addControllerEvent` | `(track, channel, time, controller, value)` |
| `writeFile` | `(fileHandle)` |