CLI tool for working with the Mega Drive MIDI Interface (MDMI)
Project description
Mega Drive MIDI Interface CLI
CLI for controlling the Mega Drive MIDI Interface (MDMI). Helps you load presets from instrument files, clear presets, list WOPN instruments, and test connectivity.
Features
- Load presets from instrument files:
- Clear presets. Individual user presets or all presets at once
- List WOPN instruments
- Connectivity testing: Ping/pong functionality to test MDMI connectivity
Installation
Latest version from PyPI:
pip install mdmi-cli
Usage
Load a preset
# Load TFI preset to program 0 (uses MDMI_MIDI_OUT if set)
mdmi load-preset example.tfi --program 0
# Load DMP preset to program 5 via specific MIDI port
mdmi load-preset example.dmp --program 5 --midi-out "IAC Driver Bus 1"
# Load specific WOPN instrument to program 10
mdmi load-preset soundbank.wopn --program 10 --bank 0 --instrument 5 --bank-type melody
# Test with fake interface (for development)
mdmi load-preset example.tfi --program 0 --fake
WOPN file management
# List contents of a WOPN file (first 10 instruments per bank)
mdmi list-wopn soundbank.wopn
# List all instruments in WOPN file
mdmi list-wopn soundbank.wopn --full
# Load percussion instrument from WOPN
mdmi load-preset soundbank.wopn --program 20 --bank 0 --instrument 3 --bank-type percussion
# Load from different melody bank
mdmi load-preset soundbank.wopn --program 15 --bank 1 --instrument 65 --bank-type melody
Clear presets
# Clear preset at program 5 (uses MDMI_MIDI_OUT if set)
mdmi clear-preset --program 5
# Clear all presets (with confirmation)
mdmi clear-all-presets
# Clear all presets (skip confirmation) with specific port
mdmi clear-all-presets --confirm --midi-out "IAC Driver Bus 1"
Test connectivity
# Test MDMI connectivity with ping/pong
mdmi ping
# Test with custom timeout
mdmi ping --timeout 10.0
# Test with specific ports
mdmi ping --midi-out "IAC Driver Bus 1" --midi-in "IAC Driver Bus 2"
List available MIDI ports
# List all available MIDI input and output ports
mdmi list-ports
Configuration
Environment Variables
MDMI_MIDI_OUT: Default MIDI output port nameMDMI_MIDI_IN: Default MIDI input port nameMDMI_MIDI_PORT: Legacy fallback for MIDI output port
Command-line Options
Most commands support:
--midi-out TEXT: MIDI output port name (overrides environment variables)
Commands with bidirectional communication (ping) also support:
--midi-in TEXT: MIDI input port name (overridesMDMI_MIDI_IN)
Development
Build
# Install cli (from source)
make install
# Run tests
make test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mdmi_cli-0.4.3.tar.gz.
File metadata
- Download URL: mdmi_cli-0.4.3.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d87218c3c37bb00830f39f7f09c46710dd32ddef7e345602da342a50dff278b5
|
|
| MD5 |
429b970b0d4d3e77984fffa9cf7d6d7c
|
|
| BLAKE2b-256 |
4d7e5861a36f88dcf024b685e6fad8a68b819e17f115ccd2ed1d00b236e7ab12
|
Provenance
The following attestation bundles were made for mdmi_cli-0.4.3.tar.gz:
Publisher:
publish.yml on rhargreaves/mdmi-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdmi_cli-0.4.3.tar.gz -
Subject digest:
d87218c3c37bb00830f39f7f09c46710dd32ddef7e345602da342a50dff278b5 - Sigstore transparency entry: 229456519
- Sigstore integration time:
-
Permalink:
rhargreaves/mdmi-cli@fcdc8e1398b6cc1a68d041600cb8f4e5bf2dd4f0 -
Branch / Tag:
refs/tags/v0.4.3 - Owner: https://github.com/rhargreaves
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fcdc8e1398b6cc1a68d041600cb8f4e5bf2dd4f0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mdmi_cli-0.4.3-py3-none-any.whl.
File metadata
- Download URL: mdmi_cli-0.4.3-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bea1003d693c54e2ef4e9ccd405591b20b93009f50581adace9bbf87dd7491d2
|
|
| MD5 |
8a22b1858ee2911aa8dee36beffc258c
|
|
| BLAKE2b-256 |
af3f567c76bb8c7b8d5cc9023df0616ea515b53c31a6e301b220e60f766090ea
|
Provenance
The following attestation bundles were made for mdmi_cli-0.4.3-py3-none-any.whl:
Publisher:
publish.yml on rhargreaves/mdmi-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdmi_cli-0.4.3-py3-none-any.whl -
Subject digest:
bea1003d693c54e2ef4e9ccd405591b20b93009f50581adace9bbf87dd7491d2 - Sigstore transparency entry: 229456520
- Sigstore integration time:
-
Permalink:
rhargreaves/mdmi-cli@fcdc8e1398b6cc1a68d041600cb8f4e5bf2dd4f0 -
Branch / Tag:
refs/tags/v0.4.3 - Owner: https://github.com/rhargreaves
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fcdc8e1398b6cc1a68d041600cb8f4e5bf2dd4f0 -
Trigger Event:
push
-
Statement type: