Skip to content

djinoz/double_metronome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Double Metronome

A Python-based double metronome that plays different time signatures on the left and right audio channels.

Features

  • Plays two different time signatures simultaneously
  • Each time signature plays on its own stereo channel (left or right)
  • Visual representation of the metronome pattern
  • Calculates when the pattern repeats (using LCM of time signatures)
  • Audio feedback with different sounds for normal and accented beats
  • True stereo output with separate left and right channels

Installation

  1. Clone or download this repository
  2. Create and activate a virtual environment:
    python3 -m venv venv
    source venv/bin/activate
  3. Install the required dependencies:
    pip install -r requirements.txt

Usage

./double_metronome.py LEFT_SIGNATURE RIGHT_SIGNATURE [OPTIONS]

Arguments

  • LEFT_SIGNATURE: Time signature for left channel (beats per measure)
  • RIGHT_SIGNATURE: Time signature for right channel (beats per measure)

Options

  • --bpm BPM: Tempo in beats per minute (default: 60)
  • --duration DURATION: Duration to play in seconds (default: 30)
  • --accent-first: Accent the first beat of each measure

Examples

# 4/4 on left, 3/4 on right at 80 BPM for 30 seconds with accented first beats
./double_metronome.py 4 3 --bpm 80 --duration 30 --accent-first

# 5/4 on left, 7/4 on right at 120 BPM
./double_metronome.py 5 7 --bpm 120

# 2/4 on left, 6/4 on right for 60 seconds
./double_metronome.py 2 6 --duration 60

How It Works

The metronome displays a visual pattern before playing, showing exactly when each beat occurs in both time signatures. During playback, it indicates which channel is playing on each beat (LEFT, RIGHT, BOTH, or just a regular tick).

The script uses the sounddevice and numpy libraries to generate audio and play it through the appropriate stereo channels:

  • Left time signature beats play only through the left speaker/headphone
  • Right time signature beats play only through the right speaker/headphone
  • When both time signatures have a beat at the same time, the sound plays through both channels

This creates a true stereo experience where you can physically hear the different time signatures separated in space.

About

a left/right metronome for drummers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages