pymmcore-midi
MIDI Device control for microscopes using pymmcore
Installation
pip install pymmcore-midi
Usage
Create a pymmcore_midi.DeviceMap object (can be done from a YAML/JSON file),
then connect it to a pymmcore-plus
CMMCorePlus
object.
device_name: X-TOUCH MINI
mappings:
- [button, 8, Camera, AllowMultiROI]
- [button, 9, Camera, Binning]
- [knob, 2, Camera, Gain]
- [knob, 9, Camera, CCDTemperature]
# can also use this form
- message_type: control_change
control_id: 1
device_label: Camera
property_name: Exposure
- message_type: button
control_id: 10
core_method: snap
- message_type: knob
control_id: 17
core_method: setAutoFocusOffset
core = CMMCorePlus()
core.loadSystemConfiguration()
dev_map = DeviceMap.from_file(f)
dev_map.connect_to_core(core)
Now when you move a knob or press a button on your MIDI device, the
corresponding property/method will be updated/called on the CMMCorePlus
object. 🎉
Debugging/Development
Use the environment variable PYMMCORE_MIDI_DEBUG=1 to print out the MIDI
messages that are being received from your device. (This is useful to determine
the appropriate message type and control ID for your device map.)
Metadata
Release files for pymmcore-midi 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pymmcore_midi-0.1.0.tar.gz | 12.2 kB | Without provenance | Details for pymmcore_midi-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pymmcore_midi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pymmcore_midi-0.1.0-py3-none-any.whl |
Total release size: 21.8 kB
Release files / pymmcore_midi-0.1.0.tar.gz
| Download URL | pymmcore_midi-0.1.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6444483b6ee1d56f7490688d761f6a0a4f8f678c6b9146377acfa607e28d71f0
|
|
BLAKE2b-256 checksum How to use checksums |
af72c74ffb32882bfae1466df260a6ee6b1a7d88dbdd07c45f500a6e37159f15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / pymmcore_midi-0.1.0-py3-none-any.whl
| Download URL | pymmcore_midi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a099eefc5ddb6212807a90b23e208186be8ea9b8f601d8233130eac741ea9819
|
|
BLAKE2b-256 checksum How to use checksums |
c90fe7c5d97488348f0a4ab28e04f741fbe52867916b9927ae804659dbb634ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for pymmcore-midi 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.