Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beatwright

A compact TUI for converting between BPM, note values, milliseconds, samples, Hz, MIDI notes and tempo shifts.

Features

  • Editable BPM, sample rate, and A4 reference frequency
  • Note division table for 1/1 through 1/64
  • BPM-dependent note-value duration table in milliseconds
  • Pitch table from MIDI notes to frequencies
  • Normal, dotted, triplet, and quintuplet values
  • MIDI note to Hz conversion
  • Hz to nearest MIDI note with cents offset
  • Tempo transposition by semitone shift
  • Old/new BPM to semitone and cents difference
  • FM sideband table from carrier frequency, modulator ratio or free modulator frequency, and sideband order
  • Harmonic, near-harmonic, and inharmonic FM sideband relation labels
  • Copy-friendly tab-separated table output

Install

Recommended:

uv tool install git+https://github.com/oikoaudio/beatwright.git

Or with pipx:

pipx install git+https://github.com/oikoaudio/beatwright.git

Development

python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[test]"

Run

beatwright

or:

python -m beatwright.app

Press q to quit. Press c on a table tab to copy the selected row as tab-separated text. The app shows mode-specific shortcut hints above the footer.

The app has four main tabs:

  • Timing: note value, duration in milliseconds, equivalent Hz, and samples
  • Pitch: MIDI/Hz conversion plus a note-frequency table
  • Tempo: tempo transposition and old/new BPM pitch difference
  • FM: carrier/modulator sidebands, folded lower bands, nearest note, cents, harmonic grid, and harmonic/near/inharmonic relation

Useful shortcuts:

  • 1/2/3/4 or F1/F2/F3/F4: switch to Timing, Pitch, Tempo, FM
  • b, s, a: focus BPM, sample rate, A4
  • p, m, h: focus note name, MIDI, or Hz on the Pitch tab
  • t, o, n: focus semitone shift, old BPM, new BPM on the Tempo tab
  • g, f, u, v, x, y: focus carrier note, carrier Hz, mod note, mod Hz, mod ratio, orders on the FM tab
  • c: copy the selected table row
  • Escape: leave the current input and return focus to the active tab

When an input is focused:

  • Up/Down: normal step
  • Shift+Up/Shift+Down: fine step
  • Alt+Up/Alt+Down or PageUp/PageDown: coarse step

Test

uv run --extra test python -m pytest

License

MIT. Copyright (c) 2026 David Fredman

About

Small TUI for music timing and frequency calculations.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages