Skip to main content

Guitar Pro Metronome Extractor

A Python package that generates a metronome track from Guitar Pro files.

Features

  • Extracts tempo information from Guitar Pro (.gp) files.

  • Generates a WAV file containing metronome clicks.

  • Supports variable tempo changes throughout the piece.

  • Supports tempo changes in the middle of a bar.

Installation

You can install the package directly from PyPI using pip:

pip  install  metronome_extractor

Usage

As a Python Package

from metronome_extractor import create_metronome_track, save_as_wav

Example: Generate a metronome track from a Guitar Pro file

input_file = "input.gp"

output_file = "output.wav"
Extract tempo information and generate the metronome track
tempos, total_bars = parse_tempo_changes(extract_gpif(input_file))

metronome_audio = create_metronome_track(tempos, bars=total_bars)

save_as_wav(output_file, metronome_audio)

As a Command-Line Tool


metronome_extractor input.gp output.wav

How it works

  1. Extracts the score.gpif file from the Guitar Pro file (XML format).

  2. Parses the XML to find tempo changes and their positions.

  3. Generates click sounds at appropriate intervals.

  4. Creates a WAV file with the metronome track.

Technical Details

  • Sample rate: 44100 Hz

  • Audio format: 16-bit mono WAV

  • Click duration: 0.02 seconds

  • Click frequency: 1000 Hz

  • Default time signature: 4/4 (four beats per bar)

Future Work

  • Customizable click sounds

    • Allow users to select custom sound sources for metronome clicks.
    • Support different sounds for the first beat of each bar (accent beat).
  • Extended format support

    • Add support for .mp3 export.
    • Add compatibility with legacy Guitar Pro formats (.gpx, .gp5).
    • Implement broader Guitar Pro version compatibility.

Contributing

Feel free to submit issues and enhancement requests! Contributions are welcome.

  1. Fork the repository.

  2. Create a new branch for your feature or bugfix.

  3. Submit a pull request.

License

This project is open source and available under the MIT License.

Metadata

Release files for metronome-extractor 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metronome-extractor 0.1.6
File Size Uploaded Provenance Actions
metronome_extractor-0.1.6.tar.gz 5.2 kB Without provenance Details for metronome_extractor-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for metronome-extractor 0.1.6
File Interpreter ABI Platform Actions
metronome_extractor-0.1.6-py3-none-any.whl Python 3 none any Details for metronome_extractor-0.1.6-py3-none-any.whl

Total release size: 11.3 kB

Release files / metronome_extractor-0.1.6.tar.gz

Download URL metronome_extractor-0.1.6.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
11dd02323260121926804fc044ea47f392dd4f025f0dc8c2bdede97f2becaa82
BLAKE2b-256 checksum
How to use checksums
e6bd074c98d30fd7887ad3afc900e0e61df5cbdbe63c3feeca2a5e03a8b563ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / metronome_extractor-0.1.6-py3-none-any.whl

Download URL metronome_extractor-0.1.6-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
261544efe64325be6b856b6103b32a244d28e62cd0f039b109d842592170b489
BLAKE2b-256 checksum
How to use checksums
eed5f1896bcceade631b3d9dee8c0ee73acee14afec0bf3cbfc035303c208cec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for metronome-extractor 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page