Skip to main content

A python library that allows you to export a video in which a piano is playing the music you give it.

Project description

piano_visualizer

A python library that allows you to export a video in which a piano is playing the music you give it.

example gif

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", 6)

# Progress bars should show up
# Once your video is exported it will be at the path you specified!

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

piano_visualizer-1.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

piano_visualizer-1.0.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file piano_visualizer-1.0.0.tar.gz.

File metadata

  • Download URL: piano_visualizer-1.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for piano_visualizer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 25466c81405b445da4a17807db85fee9bb8e61e6cf840015a3cc5d043aaa30e7
MD5 80543f3a33a0ca4e7aaa5a35c5725bb6
BLAKE2b-256 8cac3f7aa0be39264b9ddfb4cbc121741d0e02d460445191e8fcac4408f555e1

See more details on using hashes here.

File details

Details for the file piano_visualizer-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for piano_visualizer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87ede5f58e0a94cc5f0c60a69259bf85696187bdd8e24ef2057b0d7ed4ff9fb6
MD5 5c7819cdc3a269b0d6ff9e6d0698d4e8
BLAKE2b-256 7998b626be5d34fa53209df499ce1818ada0a9f3f9516d258ddefddabb037d7c

See more details on using hashes here.

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