Skip to main content

MIDI Device Control

Generically control MIDI devices with other MIDI devices!

DESCRIPTION

This package sports a single method: control() which allows MIDI control of a device with a controller, as defined in a YAML configuration file.

Configuration YAML

The configuration file has four parts: The required MIDI controller and MIDI device to be controlled, an optional description, and a required list of messages. Each message can have differring keys depending on what is being controlled. These keys are as follows:

type (required) can either be note_on, note_off, control_change, program_change, or pitchwheel.

cmd (required) can be any of the above types.

note is the MIDI note number (e.g. middle c = 60) that is sensed by the controller.

control is the MIDI CC# control change number that is sensed by the controller.

target (optional) is the MIDI CC# control change number that is changed on the controlled MIDI device.

data (optional) is the value to be changed given the above target.

One of note or control must be given for note_on or control_change types.

controller: 'Arturia Keyboard'
device: 'Yamaha DX7'
description: 'MIDI control test!'
messages:
    - type: note_on # what type of message is sensed
        note: 60 # middle c does the controlling here
        cmd: control_change # the message type that is sent
        target: 14 # what parameter is to be controlled
    - type: control_change
        control: 1 # the modwheel does the controlling here
        cmd: control_change
        target: 15
        data: 64 # the value to set for CC# 15
    - type: pitchwheel
        cmd: control_change
        target: 16 # this CC changes with the pitchwheel

The controller and device must be on as MIDI ports. And these must be named exactly as they appear to the system.

Please see mido.get_output_names() and mido.get_input_names() for these known MIDI port names.

Example:

from midi_device_control import Controller
device_file = 'some-controller-some-device.yaml'
c = Controller(device_file=device_file)
c.control()

Metadata

Release files for midi-device-control 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for midi-device-control 0.1.5
File Size Uploaded
midi_device_control-0.1.5.tar.gz 41.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for midi-device-control 0.1.5
File Interpreter ABI Platform
midi_device_control-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 70.4 kB

Release files / midi_device_control-0.1.5.tar.gz

Download URL midi_device_control-0.1.5.tar.gz
Size 41.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4464c9c2c27e9def04d0e1f87e87474a19b599c7c521132fc3b6070799c5b987
BLAKE2b-256 checksum
How to use checksums
3f6265d073944631482430e5e4a80f42fb1f8bc7fb907d9526f4bc55c15de505
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / midi_device_control-0.1.5-py3-none-any.whl

Download URL midi_device_control-0.1.5-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0164dee4b414aa8e51fc3cd74488d692f6ba6c9a4189fa4315cc4af7ef8fdcf
BLAKE2b-256 checksum
How to use checksums
00e512c6acd7fcb6dc2391408c06ea2ae5216b24078bca0f2fcbc324a4adb5a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page