Skip to main content

Read, write, and manipulate GP3, GP4 and GP5 files.

Project description

PyPI Package latest release

Introduction

PyGuitarPro is a package to read, write and manipulate GP3, GP4 and GP5 files. Initially PyGuitarPro is a Python port of AlphaTab which originally was a Haxe port of TuxGuitar.

This package helps you achieve several goals you might find yourself yearning to do in a day-to-day tabber life:

  • Transpose a track without messing the fingering

  • Add the first string to the track without messing the fingering

  • Map percussion notes to different values

Reading .gp* files is as easy as:

import guitarpro
curl = guitarpro.parse('Mastodon - Curl of the Burl.gp5')

Writing .gp* files isn’t that hard either:

guitarpro.write(curl, 'Mastodon - Curl of the Burl 2.gp5')

All objects representing GP entities are hashable and comparable. This gives a great opportunity to apply the diff algorithm to tabs, or even the diff3 algorithm to merge tablatures.

For those looking to create the best guitar tablature editor in Python, this package is a good place to start.

Examples

Several usage examples are included in the /examples folder. Feel free to add your own examples or improve existing ones. Then, submit them via pull request.

To run one of the examples in your local environment, simply:

cd PyGuitarPro
uv run examples/transpose.py --help

Installation

Install PyGuitarPro from PyPI:

pip install PyGuitarPro

Documentation

Package documentation is located at Read the Docs.

Development

Install the development version of PyGuitarPro with uv:

git clone https://github.com/Perlence/PyGuitarPro.git
cd PyGuitarPro
uv sync

Run the tests:

uv run pytest

Install the pre-commit hook:

uv run pre-commit install

Licensing

Please see the file called LICENSE.

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

pyguitarpro-0.10.2.tar.gz (92.3 kB view details)

Uploaded Source

Built Distribution

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

pyguitarpro-0.10.2-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

Details for the file pyguitarpro-0.10.2.tar.gz.

File metadata

  • Download URL: pyguitarpro-0.10.2.tar.gz
  • Upload date:
  • Size: 92.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for pyguitarpro-0.10.2.tar.gz
Algorithm Hash digest
SHA256 ad593e5a703a87271f332968f1f22604eeb47858fcf92bee6b1f698d8f69655e
MD5 8eb380b14b75556bfb02dc7dc8e8bd9f
BLAKE2b-256 db69b0aba9026e01487f3cd6c68c7da34793424c77eb59b884e0bb9393cb2b3f

See more details on using hashes here.

File details

Details for the file pyguitarpro-0.10.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pyguitarpro-0.10.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d9a80f4c920bb66ee0b1c7dbe797006486d04cf153c79eafb6630259fa09dac2
MD5 b05b1f61d14558e3136c1d133871e35e
BLAKE2b-256 73fac002209677340ae3dd70dce5483003e336f5b05dc8167029045e137ca8a6

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