Pydantic-based VOCALOID5 Editor Project (.vpr) file parser & unparser
Project description
VPR Parser
Pydantic-based VOCALOID5 Editor Project (.vpr) file parser & unparser
For parsing and manipulating Yamaha VPR (Vocaloid 5 Project) files, this tool allows you to read, modify, and save VPR files programmatically using Pydantic models for type safety and validation.
Features
- Parsing: Extract structured data from
.vprfiles into Pydantic models. - Modifying: Update or manipulate the parsed data and save it back to a
.vprfile. - Well-typed: Uses Pydantic for robust data validation and serialization.
- Detailed performance logging: Includes a
Timerutility for profiling operations.
Installation
Install the package using pip:
pip install vpr-parser
Or install from source:
git clone https://github.com/0x24a/vpr-parser.git
cd vpr-parser
pip install .
Usage
Parsing a VPR File
from vpr_parser import VPRParser
parser = VPRParser()
vpr_file = parser.parse("path/to/your/project.vpr")
# Access parsed data
print(vpr_file.title) # Print the project title
print(vpr_file.tracks) # List all tracks
Modifying and Saving a VPR File
from vpr_parser import VPRParser, models
parser = VPRParser()
vpr_file = parser.parse("path/to/your/project.vpr")
# Modify the title
vpr_file.title = "New Project Title"
# Save the modified file
parser.dump(vpr_file, "path/to/modified_project.vpr")
Available Models
The following Pydantic models are provided for working with VPR data:
VPRFile: Root model representing the entire VPR file.Track: Represents a track in the project.Part: Represents a part (segment) within a track.Note: Represents a note.- And many, literally, MANY more (see
models.pyfor details).
Development
Dependencies
- Python 3.8+ (ONLY tested on Python 3.11+, but should work on other versions?)
- Pydantic
Running Tests
WIP, bcs it just works...?
Contributing
PRs are welcome! For major changes, please open an issue first to discuss the proposed changes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vpr_parser-0.1.0.tar.gz.
File metadata
- Download URL: vpr_parser-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a38f893751fc4f4d6a66a70a1555293ec4cdb6dd064836cbbc6750b5212de3fc
|
|
| MD5 |
ad8b945b4659a577a61df27bee121754
|
|
| BLAKE2b-256 |
7d1b8ade646ce9deaa5b9c1d0b28b96fa29e071b4309815ad5626307fd3e8cba
|
File details
Details for the file vpr_parser-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vpr_parser-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f4875bfb3a0d95121443d7a5a745883a5c2cf40d8aeffe30fd68b49b3b35f7c
|
|
| MD5 |
f0562852a073b79bba84730c5c508f9f
|
|
| BLAKE2b-256 |
c4310b13d5e4025311197f6896b4d60aadd24e8ec084b99fc9aef7bedddff0a2
|