Skip to main content

pimidipy MIDI processing library

Project description

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pimidipy-0.1.2.post4.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pimidipy-0.1.2.post4-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file pimidipy-0.1.2.post4.tar.gz.

File metadata

  • Download URL: pimidipy-0.1.2.post4.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pimidipy-0.1.2.post4.tar.gz
Algorithm Hash digest
SHA256 8c13853e26c4dd860ddc8d3b5f04ca8b32727bfdbc1b0dbd3ab0cdc69218db4f
MD5 69c7dfdb61e4cfbfb22dcf4873238e2e
BLAKE2b-256 e4648c08708d56a9e737995430444908250987a4b7cb1802ba9434554d5d8688

See more details on using hashes here.

Provenance

The following attestation bundles were made for pimidipy-0.1.2.post4.tar.gz:

Publisher: python-publish.yml on BlokasLabs/pimidipy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pimidipy-0.1.2.post4-py3-none-any.whl.

File metadata

  • Download URL: pimidipy-0.1.2.post4-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pimidipy-0.1.2.post4-py3-none-any.whl
Algorithm Hash digest
SHA256 bfbc26ce5efd05131635c5b82b3a2ddfeb2138a959c60d105cb14e97deed7d82
MD5 0037ef78d5bc562303f9caf1a5ce6e53
BLAKE2b-256 9079efc73f0b1d59488e4590ba584eb36604fa3f358053fa8952af63f27626a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pimidipy-0.1.2.post4-py3-none-any.whl:

Publisher: python-publish.yml on BlokasLabs/pimidipy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page