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
-
Extracts the score.gpif file from the Guitar Pro file (XML format).
-
Parses the XML to find tempo changes and their positions.
-
Generates click sounds at appropriate intervals.
-
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
.mp3export. - Add compatibility with legacy Guitar Pro formats (
.gpx,.gp5). - Implement broader Guitar Pro version compatibility.
- Add support for
Contributing
Feel free to submit issues and enhancement requests! Contributions are welcome.
-
Fork the repository.
-
Create a new branch for your feature or bugfix.
-
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
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 metronome_extractor-0.1.3.tar.gz.
File metadata
- Download URL: metronome_extractor-0.1.3.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bd6689dc7647ff3965f675060f8dce80040b755076d63252f665a8929786434
|
|
| MD5 |
dc38bf41fb0613eb38790a3cc6eee9bf
|
|
| BLAKE2b-256 |
afa3d96388efc55efc25673eac178f2fbe28735c052b11b6aebf8482a10974a9
|
File details
Details for the file metronome_extractor-0.1.3-py3-none-any.whl.
File metadata
- Download URL: metronome_extractor-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
486d60b79c3feb5078d365c03cf3fb2a6b076c71dd2fb2e966c919cce91d3763
|
|
| MD5 |
f085785b7ae29ac41ddb6fdc1936fc37
|
|
| BLAKE2b-256 |
87ee6a2a3855d411fd29a8d0c070c2dc5cc9a0e66a0cff0ffdb740f13a6f5942
|