Skip to main content

logo

IpyMIDI

Interactive MIDI in Jupyter

IpyMIDI exposes the Web MIDI interface (Web MIDI API) to Python as Jupyter widgets via WEBMIDI.js. Connect your MIDI devices (e.g., keyboards, controllers, etc.) and start interacting with them in Jupyter!

Note: this is very much work in progress (nothing much to see yet)!

Usage Example

Create a Jupyter notebook and import the library.

import ipymidi

Get access to the Web MIDI interface.

midi = ipymidi.get_interface()

Enable the MIDI interface (your Web browser may ask you the permission to access it).

midi.enable()

Get the list of all connected MIDI input devices.

midi.inputs
MIDI Inputs (2)
0:
    id: 92212230
    name: Virtual MIDI
    manufacturer: Apple Inc.
    connection: open
    state: connected
1:
    id: -1491552641
    name: Arturia KeyStep 37
    manufacturer: Arturia
    connection: open
    state: connected

Track a specific MIDI event emitted from one input device (e.g., the "noteon" event emitted from a MIDI keyboard).

ev = midi.inputs["Arturia KeyStep 37"].track_event("noteon", ["note_identifier"])

Use the ev object like any other Jupyter widget, e.g., to print in an output widget the MIDI note that has just been played on the input device.

import ipywidgets

output = ipywidgets.Output()

@ev.observe
def print_message(change):
    output.clear_output()
    with output:
        print(f"Note {change["owner"].note_identifier} played!")

output

Metadata

Release files for ipymidi 0.0.1

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

Source distribution (sdist)

Source distribution for ipymidi 0.0.1
File Size Uploaded
ipymidi-0.0.1.tar.gz 25.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ipymidi 0.0.1
File Interpreter ABI Platform
ipymidi-0.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 52.4 kB

Release files / ipymidi-0.0.1.tar.gz

Download URL ipymidi-0.0.1.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d64cb18a4895ab299442ebe196518ed03bcff78e5085a9bd926af4a2ed6b488e
BLAKE2b-256 checksum
How to use checksums
bc22391daed0e1d8eea2d5d21d46dc8a7559cddf285c731d8726e50ae4b7d7bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / ipymidi-0.0.1-py2.py3-none-any.whl

Download URL ipymidi-0.0.1-py2.py3-none-any.whl
Size 26.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e7ccab80e043b61a7b595fd9d86626a2cf411c2b08a490e7620aec19a22dcaaf
BLAKE2b-256 checksum
How to use checksums
f746c658a31296d569efca197c215a334b163c9d45a91460f58c530dd74cc77e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.0.1 This release

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