AI-Music-Workbench is a collaborative repository for generating, transforming, and experimenting with algorithmic music using AI systems such as Codex and Claude. The project focuses on text-based music representations including ABC notation, MIDI, and symbolic music formats.
- Script:
generate_quartet_midi.ps1 - Output:
output/quatuor_classique_plus_4min_dynamique.mid - Features: string quartet (about 4 minutes), progressive dynamics, phrase accents.
Command:
powershell -ExecutionPolicy Bypass -File .\generate_quartet_midi.ps1- Script:
generate_electro_remix_midi.ps1 - Output:
output/remix_electro_techno_sons_longs.mid - Features: 128 BPM techno groove, electronic kick/hat, synth bass, sustained pads, long lead.
Command:
powershell -ExecutionPolicy Bypass -File .\generate_electro_remix_midi.ps1generate_quartet_midi.ps1: generates a format-1 MIDI classical string quartet.generate_electro_remix_midi.ps1: generates a format-1 MIDI electro/techno remix track.output/: generated MIDI files and static manifest.
This repository includes a static web interface compatible with GitHub Pages:
index.html: UI layout (MIDI selection, loading, instrument mapping, playback controls)style.css: responsive stylingapp.js: frontend logic (manifest loading, MIDI parsing, instruments, playback scheduling)output/midi-index.json: MIDI manifest used for file listing
- MIDI manifest loading:
- The frontend fetches
output/midi-index.json. - No runtime directory listing is used.
.midand.midientries populate the "Choose a MIDI file" dropdown.
- MIDI parsing:
app.jsuses@tonejs/midi(browser ESM via CDN).- Tracks are displayed with:
- track number
- optional track name
- note count, channel, duration, and range
- Per-track instrument mapping:
- A predefined instrument catalog is centralized in
INSTRUMENT_DEFINITIONS. - Each track has an independent instrument selector.
- A
TrackInstrumentPlayerabstraction maps each track to a playable instrument object.
- Synchronized playback:
- Tone.js
Transportdrives browser playback. - Notes are scheduled per track with
Tone.Partin sync. - Controls:
Load MIDI,Play,Stop.
When adding or removing MIDI files in output/, update output/midi-index.json:
{
"files": [
"example_1.mid",
"example_2.midi"
]
}- Commit and push to
github.com/aleph-beth/AI-Music-Workbench. - Open GitHub
Settings > Pages. - Select
Deploy from a branch. - Choose branch
main(or another branch) and folder/ (root). - Save.
Expected URL:
All frontend paths are relative (for example output/...), so the site works correctly under the repository subpath on GitHub Pages.