Skip to main content

A package to generate metronome tracks from Guitar Pro files.

Project description

Guitar Pro Metronome Generator

A Python script 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 change in the middle of a bar

Prerequisites

  • Python 3.6 or higher
  • Required Python packages:
    • numpy

Installation

  1. Clone this repository or download the script
  2. Install the required packages:
pip install numpy

Usage

Run the script from the command line with two arguments:

  1. Path to the input Guitar Pro file
  2. Desired output WAV file path
python metronome_generator.py input.gp output.wav

Example:

python metronome_generator.py mysong.gp mysong_metronome.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
  • Enhanced features:
    • Support for different time signatures
    • Visual metronome interface
    • Real-time tempo adjustment

Contributing

Feel free to submit issues and enhancement requests!

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.1.tar.gz (4.6 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.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metronome_extractor-0.1.1.tar.gz
  • Upload date:
  • Size: 4.6 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.1.tar.gz
Algorithm Hash digest
SHA256 61420294ee61327cfd0dd6fcb2ae2e908265f9ef889ef22e06269e7995c5e3d2
MD5 7901e87b6b31dc5bc032c9fd31d37ee7
BLAKE2b-256 e709f31e32f351df0728b3b0905063dafe7278e09064e4ca57880bfccc73285e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for metronome_extractor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 232aabca2498e85a18173c8275effd5670208ab93d5470e35f0b754935c9a58e
MD5 2c7af88b5edfd787e28b3262a586d177
BLAKE2b-256 2615bf8e6adaee2a7ee1590c82a573d21569cae95abc5b08ec02e9f7e916912f

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