piano-visualizer


Namepiano-visualizer JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/ArjunSahlot/piano_visualizer
SummaryA python library that allows you to export a video in which a piano is playing the music you give it.
upload_time2023-05-06 18:42:06
maintainer
docs_urlNone
authorArjun Sahlot
requires_python>=3
licenseGNU GPL v3
keywords piano visualizer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/ArjunSahlot/piano_visualizer/blob/main/assets/example.gif?raw=true)

## 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`

```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](https://github.com/FluidSynth/fluidsynth/wiki/Download)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ArjunSahlot/piano_visualizer",
    "name": "piano-visualizer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "piano,visualizer",
    "author": "Arjun Sahlot",
    "author_email": "iarjun.sahlot@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/67/d1/5d5214430b83a24722f42d15eea7dbbd8490ba4623fdbb8ed98c0002bf6f/piano_visualizer-1.1.0.tar.gz",
    "platform": null,
    "description": "# piano_visualizer\n\nA python library that allows you to export a video in which a piano is playing the music you give it.\n\n![example gif](https://github.com/ArjunSahlot/piano_visualizer/blob/main/assets/example.gif?raw=true)\n\n## Features\n\n-   Export a video of a custom midi file\n-   Easy interface\n-   Multi-core export\n-   Multiple piano support\n-   Multiple midi support\n-   Automatically generate audio for midi files\n\n## How to\n\n`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!\n\nThere are 2 main classes: `Piano` and `Video`\n`Piano` takes care of the piano rendering and the midi file parsing\n`Video` takes care of video management (fps, resolution) and exporting\n\n**INSTALL**\n`pip install piano_visualizer`\n\nWorking in `example.py`\n\n```py\n# Import the library after you have installed it\nimport piano_visualizer\n\n# Create a piano with a midi file(s)\npiano = piano_visualizer.Piano([\"/path/to/your/midi/file.mid\"])\n\n# Create a video with resolution/fps\nvideo = piano_visualizer.Video((1920, 1080), 30)\n\n# Add piano to video\nvideo.add_piano(piano)\n\n# Export video on multiple cores (1 for single)\nvideo.export(\"your/export/path.mp4\", num_cores=6)\n\n# You can add music too! (although it is sometimes offset from video)\n# video.export(\"your/export/path.mp4\", num_cores=6, music=True)\n\n# Progress bars should show up\n# Once your video is exported it will be at the path you specified!\n```\n\nNOTE: For music to work, you need [fluidsynth](https://github.com/FluidSynth/fluidsynth/wiki/Download)\n\n\n",
    "bugtrack_url": null,
    "license": "GNU GPL v3",
    "summary": "A python library that allows you to export a video in which a piano is playing the music you give it.",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/ArjunSahlot/piano_visualizer"
    },
    "split_keywords": [
        "piano",
        "visualizer"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80efa322b16ca3243b38164795374d70757c54175fc5344dd2741ff91df7c294",
                "md5": "081574258a994edb6511f4d0730869e3",
                "sha256": "8a4dac2599f1a846796d9109da6fb2ab269ddb155d4800193735c90e3dd2acba"
            },
            "downloads": -1,
            "filename": "piano_visualizer-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "081574258a994edb6511f4d0730869e3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 19289,
            "upload_time": "2023-05-06T18:42:04",
            "upload_time_iso_8601": "2023-05-06T18:42:04.848764Z",
            "url": "https://files.pythonhosted.org/packages/80/ef/a322b16ca3243b38164795374d70757c54175fc5344dd2741ff91df7c294/piano_visualizer-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "67d15d5214430b83a24722f42d15eea7dbbd8490ba4623fdbb8ed98c0002bf6f",
                "md5": "3a231b4a6f968e7c6b0a904ad10cd888",
                "sha256": "425d2f3c8b996f5f244b5a2f68ff2215ee6a8e2e3ee936941dbb930f8141cd5e"
            },
            "downloads": -1,
            "filename": "piano_visualizer-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3a231b4a6f968e7c6b0a904ad10cd888",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 18734,
            "upload_time": "2023-05-06T18:42:06",
            "upload_time_iso_8601": "2023-05-06T18:42:06.602619Z",
            "url": "https://files.pythonhosted.org/packages/67/d1/5d5214430b83a24722f42d15eea7dbbd8490ba4623fdbb8ed98c0002bf6f/piano_visualizer-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-06 18:42:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ArjunSahlot",
    "github_project": "piano_visualizer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "piano-visualizer"
}
        
Elapsed time: 0.18825s