piano_visualizer
A python library that allows you to export a video in which a piano is playing the music you give it.
Features
- Export a video of a custom midi file
- Easy interface
- Multi-core export
- Multiple piano support
- Multiple midi support
- Automatically generate audio for midi files
How to
piano_visualizer was built with the intent to for it to be simple to use. You can render a piano video with simply 4 lines of code!
There are 2 main classes: Piano and Video
Piano takes care of the piano rendering and the midi file parsing
Video takes care of video management (fps, resolution) and exporting
INSTALL
pip install piano_visualizer
Working in example.py
# Import the library after you have installed it
import piano_visualizer
# Create a piano with a midi file(s)
piano = piano_visualizer.Piano(["/path/to/your/midi/file.mid"])
# Create a video with resolution/fps
video = piano_visualizer.Video((1920, 1080), 30)
# Add piano to video
video.add_piano(piano)
# Export video on multiple cores (1 for single)
video.export("your/export/path.mp4", num_cores=6)
# You can add music too! (although it is sometimes offset from video)
# video.export("your/export/path.mp4", num_cores=6, music=True)
# Progress bars should show up
# Once your video is exported it will be at the path you specified!
NOTE: For music to work, you need fluidsynth
Release files for piano-visualizer 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| piano_visualizer-1.1.0.tar.gz | 18.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| piano_visualizer-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.0 kB
Release files / piano_visualizer-1.1.0.tar.gz
| Download URL | piano_visualizer-1.1.0.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
425d2f3c8b996f5f244b5a2f68ff2215ee6a8e2e3ee936941dbb930f8141cd5e
|
|
BLAKE2b-256 checksum How to use checksums |
67d15d5214430b83a24722f42d15eea7dbbd8490ba4623fdbb8ed98c0002bf6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / piano_visualizer-1.1.0-py3-none-any.whl
| Download URL | piano_visualizer-1.1.0-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a4dac2599f1a846796d9109da6fb2ab269ddb155d4800193735c90e3dd2acba
|
|
BLAKE2b-256 checksum How to use checksums |
80efa322b16ca3243b38164795374d70757c54175fc5344dd2741ff91df7c294
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|