Skip to main content

kdmapi

PyPi version Codacy Badge

KDMAPI (Keppy's Direct MIDI API) wrapper for Python

kdmapi provides both C bindings for OmniMIDI.dll and a Python-friendly wrapper for them

A Mido backend is also provided, instructions on how to use it are below

Requires Python 3.8 or greater

Installation

pip3 install kdmapi

You will also need to have OmniMIDI installed

Instructions

from kdmapi import KDMAPI

# Initialize the device
KDMAPI.InitializeKDMAPIStream()

# Send a short 32-bit MIDI message data
KDMAPI.SendDirectData(0x0)

# Close the device
KDMAPI.TerminateKDMAPIStream()

Mido backend

You can use KDMAPI as a Mido output backend

import mido

# Set KDMAPI as MIDO backend
mido.set_backend("kdmapi.mido_backend")

# Open MIDI file
midi_file = mido.MidiFile("your_file.mid")

with mido.open_output() as out:
    for msg in midi_file.play():
        out.send(msg)

License

#
# Copyright (C) 2022 Sebastiano Barezzi
#
# SPDX-License-Identifier: LGPL-3.0-or-later
#

Release files for kdmapi 1.0.2

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

Source distribution (sdist)

Source distribution for kdmapi 1.0.2
File Size Uploaded
kdmapi-1.0.2.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kdmapi 1.0.2
File Interpreter ABI Platform
kdmapi-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / kdmapi-1.0.2.tar.gz

Download URL kdmapi-1.0.2.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
903bd4e4a64f90162a6011747b9415c3e11b1eedf7a1c1bee72c8fe51470ce7b
BLAKE2b-256 checksum
How to use checksums
91abe1c4b016bea66e8dde3112325fe6fc949ebcc01f4f40a8ce04b066e86555
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.10 Linux/5.13.0-48-generic

Release files / kdmapi-1.0.2-py3-none-any.whl

Download URL kdmapi-1.0.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
020ab4ef4c68967fbc50d3ba6196a43154e440daeca0b40b7dd4f068aa5cdc3d
BLAKE2b-256 checksum
How to use checksums
1bca5811308abf96ff1dbf788deaf440d9deae04b7ca831d089a936a5e0bd429
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.10 Linux/5.13.0-48-generic

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.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