KDMAPI (Keppy's Direct MIDI API) wrapper for Python
Project description
kdmapi
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
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
#
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
kdmapi-1.0.1.tar.gz
(4.8 kB
view hashes)
Built Distribution
kdmapi-1.0.1-py3-none-any.whl
(5.8 kB
view hashes)