Skip to main content

A package to generate metronome tracks from Guitar Pro files.

Project description

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.

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

metronome_extractor-0.1.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

metronome_extractor-0.1.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file metronome_extractor-0.1.4.tar.gz.

File metadata

  • Download URL: metronome_extractor-0.1.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for metronome_extractor-0.1.4.tar.gz
Algorithm Hash digest
SHA256 7f745970e452ba8cb72f5483a13ae54cb3c2bff86deaac8bbe69aa534297e678
MD5 0875a912caa117d8ef745cbb0105dca5
BLAKE2b-256 a93d84b1c979451688b9ce0948ea54a289f8f87f831410aa0a5d413e6a6185bc

See more details on using hashes here.

File details

Details for the file metronome_extractor-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for metronome_extractor-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 81c9cd1c3e051a46c6fa9e5f7dfcc03e7ffebe59ddedb4f80d689c7c72999a9c
MD5 6228b81787ae916998c4454b6bf43e6b
BLAKE2b-256 e05fed66700dafb9e5a27f6275e58322e755555773a0af85e316eff75214f35c

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