Metronome
A clean and elegant desktop metronome designed for ukulele practice, powered by Pygame's low-level mixer for stable, low-latency audio.
Features
- Visual beat indicator: First beat of each measure highlighted in red, remaining beats in blue
- BPM range: 40 ~ 180 BPM, adjustable via slider or quick-select buttons
- Multiple time signatures: Supports 2/4, 3/4, 4/4, and 6/8
- Spacebar shortcut: Start/stop without touching the mouse
- Stable on Win11: Uses Pygame mixer instead of system beeps to avoid OS suppression
- Accurate timing: Self-calibrating loop based on
time.perf_counter()keeps the beat steady
Installation
SDK下载
#安装ModelScope
pip install modelscope
#SDK模型下载
from modelscope import snapshot_download
software_dir = snapshot_download('VoyagerX/Metronome')
Git下载
#Git模型下载
git clone https://www.modelscope.cn/VoyagerX/Metronome.git
CLI 下载
modelscope download VoyagerX/Metronome metronome.exe --local_dir ./software/metronome.exe
Usage
python metronome.py
Requirements
- Python 3.x
- Windows 10/11 (recommended, for Pygame low-latency audio)
Preview
- Large-font BPM display
- Real-time beat LEDs
- Quick-speed buttons: 50 / 60 / 70 / 80 / 90 / 100 / 110 / 120
Technical Details
- Uses
pygame.mixer.Soundto play in-memory WAV audio with zero file-I/O latency - Synthesized click includes pitch drop and inharmonic overtones to mimic the crisp, dry sound of a plastic electronic metronome
- Multi-threaded architecture separates UI and audio logic to prevent interface stuttering
License
MIT