MidiRenderer
MidiRenderer is a high-performance Python library for rendering MIDI files to WAV and Opus formats using SoundFonts. Built with Rust for speed and efficiency.
Features
- Render MIDI to WAV and Opus
- Uses SoundFont (.sf2) files
- High-performance Rust backend
- Cross-platform support (Windows, macOS, Linux, including ARM64)
Installation
pip install midirenderer
Quick Start
import midirenderer
from pathlib import Path
# Render MIDI to WAV
wav_data = midirenderer.render_wave_from(
Path('soundfont.sf2').read_bytes(),
Path('music.mid').read_bytes()
)
with open('output.wav', 'wb') as f:
f.write(wav_data)
# Render MIDI to Opus
opus_data = midirenderer.render_opus_from(
Path('soundfont.sf2').read_bytes(),
Path('music.mid').read_bytes(),
stereo=True,
bitrate="128000" # 128 kbps
)
with open('output.opus', 'wb') as f:
f.write(opus_data)
API
render_wave_from(soundfont_bytes: bytes, midi_bytes: bytes) -> bytesrender_opus_from(soundfont_bytes: bytes, midi_bytes: bytes, stereo: bool = True, bitrate: str = "auto") -> bytes
Requirements
- Python 3.8+
- libopus (usually pre-installed on most systems)
License
MIT License
Metadata
Release files for midirenderer 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| midirenderer-0.1.3-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details for midirenderer-0.1.3-cp38-abi3-win_amd64.whl |
| midirenderer-0.1.3-cp38-abi3-manylinux_2_34_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.34+ ARM64 | Details for midirenderer-0.1.3-cp38-abi3-manylinux_2_34_aarch64.whl |
| midirenderer-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details for midirenderer-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| midirenderer-0.1.3-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details for midirenderer-0.1.3-cp38-abi3-macosx_11_0_arm64.whl |
| midirenderer-0.1.3-cp38-abi3-macosx_10_12_x86_64.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64 | Details for midirenderer-0.1.3-cp38-abi3-macosx_10_12_x86_64.whl |
Total release size: 2.2 MB
Release files / midirenderer-0.1.3-cp38-abi3-win_amd64.whl
| Download URL | midirenderer-0.1.3-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 342.7 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
90518ebac0672417a45a88425244b2c40a357275897b0abcd2aaf0aa48d6efbd
|
|
BLAKE2b-256 checksum How to use checksums |
4158d1ca3a1437e2436b3dd88433db44560aed34a9c1ad8acda7d90b97026c80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / midirenderer-0.1.3-cp38-abi3-manylinux_2_34_aarch64.whl
| Download URL | midirenderer-0.1.3-cp38-abi3-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 521.6 kB |
| Tags | CPython 3.8 Linux glibc 2.34+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
a7d5575022ffd78fa1677c1df8fcb1e86c86e26d5f8ead34dc30549782cb140f
|
|
BLAKE2b-256 checksum How to use checksums |
9fb466f0d1cb2de733b953f5b86ad7f6a80a7b6b2b5f56995ab42090bf971c68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / midirenderer-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | midirenderer-0.1.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 485.5 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
86eb9120ff3651b25889167fcbb3f17b6a8b82b963a79094a8c9998488f8cda3
|
|
BLAKE2b-256 checksum How to use checksums |
acf04e632faee3290090c7da75b210caa5e814ddfbddee65d7324d5b42b795be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / midirenderer-0.1.3-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | midirenderer-0.1.3-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 403.3 kB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
671bd1b0c7ab3e543459ff666068638ee7db9817687e1de519738d97cf52e06d
|
|
BLAKE2b-256 checksum How to use checksums |
ccf522d82ca83bb14381b08a636d831674bc9d37a5f56f54275e5f48870dd096
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Release files / midirenderer-0.1.3-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | midirenderer-0.1.3-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 420.8 kB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
f2220ce6ef2c83fa84a4f70cbf93a3348ce41fa6bca0e95dbc2fbaea1188b3b1
|
|
BLAKE2b-256 checksum How to use checksums |
300b574983f4181ba1f83066d73f6d9cc1bfd6afbb64165365b11f97c2862288
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.7.0
|
Security for midirenderer 0.1.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.