Skip to main content

Generically control MIDI devices with MIDI

Project description

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

midi_device_control-0.1.2.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

midi_device_control-0.1.2-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file midi_device_control-0.1.2.tar.gz.

File metadata

  • Download URL: midi_device_control-0.1.2.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for midi_device_control-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9935e1bbca407c88f7ba724fd7a42917e0990948f3367395d92dd9be23fa7a39
MD5 28b42554b7f58f1d7a816c1cb467fc8f
BLAKE2b-256 45ba865e23b2ea9ac2d461c0196bbe85d73ef12375bd89490a3d7dc732627559

See more details on using hashes here.

File details

Details for the file midi_device_control-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for midi_device_control-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c73d27916b1500e2f31a597674ed198e91ccc525ce0a76494aaa56f2a74caeca
MD5 9fb3c95c4a611fd85ee50f409141665a
BLAKE2b-256 604265da0f08ff4540c393ebcd7d8a72b845ca50555c32a33d5eebfeeea19d6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page