Skip to main content

pimidipy

pimidipy is a Python library developed by Blokas for Linux ALSA that makes interacting with MIDI devices extremely simple, taking care of all the low-level details for you.

Check out the full online documentation of pimidipy at https://blokas.io/pimidi/docs/pimidipy/.

If you're looking to expand your Raspberry Pi's MIDI capabilities, check out Pimidi HAT by Blokas. Pimidi is a hardware add-on that adds 2 MIDI inputs and 2 MIDI outputs to your Raspberry Pi, and it can be stacked up to 4 units high for even more MIDI I/O.

Features

The pimidipy library offers:

  • A very simple API for working with MIDI data.
  • Automatic handling of device disconnects and reconnects.
  • Available as a Patchbox OS module by Blokas for easy auto-run setup.

A Quick Example

Here's a very short example of how scripting using pimidipy would look like. This works seamlessly with Pimidi hardware on Raspberry Pi:

#!/usr/bin/env python3
from pimidipy import *
pimidipy = PimidiPy()

input = pimidipy.open_input('pimidi0:0')   # Pimidi IN A
output = pimidipy.open_output('pimidi0:1') # Pimidi OUT B

def forward(event):
    print(f'Forwarding event {event} from {input.name} to {output.name}')
    output.write(event)

input.add_callback(forward)

pimidipy.run()

This is pretty much the base foundation upon which you may build your custom MIDI processing. See the online API Reference for details on every API.

Contributing

We warmly invite the open-source community to help us improve and extend the pimidipy library. Whether you want to add new features, fix bugs, or improve documentation, we welcome your contributions!

Getting Started

  1. Install prerequisites (if not already installed): Make sure pip for Python 3 is available on your system. You can install it using:

    sudo apt update
    sudo apt install python3-pip
    
  2. Fork the repository and clone it to your local machine:

    git clone https://github.com/your-username/pimidipy.git
    cd pimidipy
    
  3. Install the library locally in editable mode using pip:

    pip3 install --break-system-packages -e .
    

    This allows you to make changes to the library and test them immediately without needing to reinstall it.

  4. Make your changes and test them locally.

  5. Submit your changes as a pull request.

  6. Join the conversation in our community forums to discuss ideas, get support, or share your projects.

Your contributions will help make pimidipy even better for everyone. Thank you for being part of the Blokas community!

Metadata

Release files for pimidipy 0.1.2.post4

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

Source distribution (sdist)

Source distribution for pimidipy 0.1.2.post4
File Size Uploaded
pimidipy-0.1.2.post4.tar.gz 23.1 kB Details

Built distribution (wheel)

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

Total release size: 46.4 kB

Release files / pimidipy-0.1.2.post4.tar.gz

Download URL pimidipy-0.1.2.post4.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8c13853e26c4dd860ddc8d3b5f04ca8b32727bfdbc1b0dbd3ab0cdc69218db4f
BLAKE2b-256 checksum
How to use checksums
e4648c08708d56a9e737995430444908250987a4b7cb1802ba9434554d5d8688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 17, 2024.

Transparency log

Release files / pimidipy-0.1.2.post4-py3-none-any.whl

Download URL pimidipy-0.1.2.post4-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfbc26ce5efd05131635c5b82b3a2ddfeb2138a959c60d105cb14e97deed7d82
BLAKE2b-256 checksum
How to use checksums
9079efc73f0b1d59488e4590ba584eb36604fa3f358053fa8952af63f27626a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 17, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2.post4 This release

2 release files

0.1.1

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