Visualize piano midi files..
Project description
Piano Visualizer
Version 0.0.7
This version exports a piano video with the keys lighting up as the music plays.
How to use:
- Install the package:
pip install piano-vis
pip install --upgrade piano-vis
, use this command if you have a previous version installed.
- Import and define a video:
import pianovis
video = pianovis.Video(resolution, fps, offset)
- Add midi files
video.add_midi(path1)
video.add_midi(path2)
- ...
- Optional: Add an audio file (will use the latest set audio)
video.set_audio(path)
- Your system must have FFMpeg to be able to export with audio.
- Export video
video.export("path.mp4")
- The exporting process will take a while.
Customization:
Note: Default parameters are optimized for (1920, 1080) resolution.
video.configure(path, value)
keys.white.gap
: Gap between each white key (pixels).keys.white.color
: Color (RGB) of white keys.keys.white.color_playing
: Color (RGB) of white keys when playing.keys.black.width_fac
: Factor of white key width.keys.black.height_fac
: Factor of white key height.keys.black.color
: Color (RGB) of black keys.keys.black.color_playing
: Color (RGB) of black keys when playing.blocks.speed
: Speed of falling blocks (pixels per second).blocks.color_type
: Type of block coloring.blocks.color
: Color (RGB) of blocks.blocks.rounding
: Pixel width of rounding corners.blocks.motion_blur
: Use motion blur on blocks?
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
piano-vis-0.0.7.tar.gz
(5.7 kB
view hashes)
Built Distribution
piano_vis-0.0.7-py3-none-any.whl
(18.0 kB
view hashes)
Close
Hashes for piano_vis-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ddb4c86c3ce881246f43315a1ea20281adeea2507e05d82e62495f75fe13bee |
|
MD5 | 09ce8805a2b2d10b15e4eed3219d3e68 |
|
BLAKE2b-256 | f6a199aa358b45660fbb31f3de004f1bc27e35fda5e78683d6fcf1b46f794504 |