Skip to content

python-midi/kdmapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

kdmapi

PyPi versionCodacy 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

fromkdmapiimportKDMAPI# Initialize the deviceKDMAPI.InitializeKDMAPIStream() # Send a short 32-bit MIDI message dataKDMAPI.SendDirectData(0x0) # Close the deviceKDMAPI.TerminateKDMAPIStream()

Mido backend

You can use KDMAPI as a Mido output backend

importmido# Set KDMAPI as MIDO backendmido.set_backend("kdmapi.mido_backend") # Open MIDI filemidi_file=mido.MidiFile("your_file.mid") withmido.open_output() asout: formsginmidi_file.play(): out.send(msg)

License

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

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages