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
-
Install prerequisites (if not already installed): Make sure
pipfor Python 3 is available on your system. You can install it using:sudo apt update sudo apt install python3-pip
-
Fork the repository and clone it to your local machine:
git clone https://github.com/your-username/pimidipy.git cd pimidipy
-
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.
-
Make your changes and test them locally.
-
Submit your changes as a pull request.
-
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c13853e26c4dd860ddc8d3b5f04ca8b32727bfdbc1b0dbd3ab0cdc69218db4f
|
|
| MD5 |
69c7dfdb61e4cfbfb22dcf4873238e2e
|
|
| BLAKE2b-256 |
e4648c08708d56a9e737995430444908250987a4b7cb1802ba9434554d5d8688
|
Provenance
The following attestation bundles were made for pimidipy-0.1.2.post4.tar.gz:
Publisher:
python-publish.yml on BlokasLabs/pimidipy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pimidipy-0.1.2.post4.tar.gz -
Subject digest:
8c13853e26c4dd860ddc8d3b5f04ca8b32727bfdbc1b0dbd3ab0cdc69218db4f - Sigstore transparency entry: 155981588
- Sigstore integration time:
-
Permalink:
BlokasLabs/pimidipy@3a3cef12b1c12cfb863c2bf660076cb83c4ed9f6 -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/BlokasLabs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3a3cef12b1c12cfb863c2bf660076cb83c4ed9f6 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfbc26ce5efd05131635c5b82b3a2ddfeb2138a959c60d105cb14e97deed7d82
|
|
| MD5 |
0037ef78d5bc562303f9caf1a5ce6e53
|
|
| BLAKE2b-256 |
9079efc73f0b1d59488e4590ba584eb36604fa3f358053fa8952af63f27626a7
|
Provenance
The following attestation bundles were made for pimidipy-0.1.2.post4-py3-none-any.whl:
Publisher:
python-publish.yml on BlokasLabs/pimidipy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pimidipy-0.1.2.post4-py3-none-any.whl -
Subject digest:
bfbc26ce5efd05131635c5b82b3a2ddfeb2138a959c60d105cb14e97deed7d82 - Sigstore transparency entry: 155981589
- Sigstore integration time:
-
Permalink:
BlokasLabs/pimidipy@3a3cef12b1c12cfb863c2bf660076cb83c4ed9f6 -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/BlokasLabs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@3a3cef12b1c12cfb863c2bf660076cb83c4ed9f6 -
Trigger Event:
release
-
Statement type: