-
Notifications
You must be signed in to change notification settings - Fork 0
Auto Assignment
Automatically maps each MIDI channel of a file to the most suitable connected instrument. Full design in docs/AUTO_ASSIGNMENT.md.

MIDI file ─► ChannelAnalyzer ─► InstrumentMatcher ─► (Drum remap | Transposer)
│
└─► AudioPreview ─► Apply routing
Source code: src/midi/adaptation/.
ChannelAnalyzer extracts, per channel:
- Instrument type: drums / melody / bass / harmony (heuristics on note range, polyphony, GM program)
- Note range: lowest and highest notes used
- Polyphony: maximum simultaneous notes
- Density: notes per second
InstrumentMatcher scores each (channel, connected-instrument) pair from 0 to 100 based on:
- Type compatibility (a piano channel matches a polyphonic keyboard better than a monophonic flute)
- Range coverage (penalty for missing notes)
- Polyphony capacity
- User preference weight (favoured instruments get a bonus)
The best match wins, ties broken deterministically.
DrumNoteMapper substitutes GM drum notes (35–81) onto the actual drum kit available on the target device, with priority chains:
kick → snare → hi-hat → crash → toms → percussion
Missing pieces fall back to the next priority. Custom mappings can be saved per device.
MidiTransposer shifts whole tracks by octaves to fit them inside the destination instrument's range. Wrapping can be enabled per channel; safety clamps prevent producing notes outside hardware limits.
Before committing, an audio preview plays the proposed assignment through the GM synth so the operator can sanity-check it. Apply or revert without touching the file.
- Open the file in the library and click Auto-Assign.
- Review the suggestion grid: one row per source channel, columns for chosen device, score, transposition, drum-map preview.
- Toggle octave-wrapping per channel if needed.
- Hit Preview — the GM synth plays the result.
- Click Apply to write the routing to the database.
Triggerable via WebSocket commands (subset):
-
auto_assign_suggest— returns the proposed mapping without persisting. -
auto_assign_apply— writes the routing. -
auto_assign_preview— kicks off audio preview.
Full command list in API-Reference and docs/API.md.
Général Midi Boop · MIT License · Sources tracked in wiki/ — edits synced on push to main.
Getting Started
Interface — Pages & Modals
- Interface-Main-Page
- Interface-Instrument-Creation
- Interface-Virtual-Piano
- Interface-Loop-Manager
- Interface-Lighting-Control
- Interface-Playlist
- Interface-Microphone
- Interface-Settings
- Interface-Hand-Management
Core Concepts
Reference
Operations
Community