Skip to main content

Octave Range Converter - Convert between musical note names and frequencies

Project description

Octarver

Octave Range Converter

A lightweight command-line tool for converting between musical note names and frequencies across octave ranges.

Why Octarver?

While libraries like librosa provide note-frequency conversion functions, Octarver is designed specifically as a lightweight CLI tool for quick conversions:

  • Lightweight: No heavy dependencies (unlike librosa's 100MB+ install)
  • Fast: Instant command-line results without writing Python code
  • Simple: Purpose-built for one task, does it well
  • Portable: Easy to use in shell scripts and workflows

Perfect for musicians, audio engineers, and students who need quick frequency-note conversions without importing a full audio analysis library.

Features

  • Convert frequency (Hz) to note name (e.g., 440 → A4)
  • Convert note name to frequency (e.g., A4 → 440Hz)
  • Supports octave specification (O1-O8)
  • Based on equal temperament with A4 = 440Hz

Installation

pip install octarver

Or install from source:

git clone https://github.com/tkuro11/octarver.git
cd octarver
pip install -e .

Usage

usage: octarver [-h] [-o OCTAVE] [-n NOTE] [-f FREQ] [note_spec ...]

convert between the note name and frequency

positional arguments:
  note_spec             specify the octave and the note or frequency. 
                        Examples: 'O3A', 'C#', '440'
                        The octave can be omitted (default O4).

options:
  -h, --help            show this help message and exit
  -o OCTAVE, --octave OCTAVE
                        set the octave (this takes precedence)
  -n NOTE, --note NOTE  set the note (this takes precedence)
  -f FREQ, --freq FREQ  set frequency (this takes precedence)

Examples

Frequency to Note

$ octarver 440
A4: 440.00 Hz

$ octarver 523.25
C5: 523.25 Hz

$ octarver 880
A5: 880.00 Hz

Note to Frequency

$ octarver A4
A4: 440.00 Hz

$ octarver O5C
C5: 523.25 Hz

$ octarver C#
C#4: 277.18 Hz

$ octarver O3G#
G#3: 207.65 Hz

Using Options

$ octarver -o 5 -n C
C5: 523.25 Hz

$ octarver -f 440
A4: 440.00 Hz

Technical Details

  • Tuning Standard: A4 = 440Hz (ISO 16:1975)
  • Temperament: 12-tone equal temperament
  • Frequency Range: Supports octaves O1 through O8
  • Formula: f = 440 × 2^((n-49)/12), where n is the number of semitones from A4

Roadmap

✅ v0.1.x (Current)

Simple, lightweight frequency-note converter with A4=440Hz and 12-tone equal temperament.

🔲 v0.2.x (Next Major Release)

Alternative Tunings - Add support for:

  • Custom A4 reference frequencies
    • A4 = 442Hz (Modern orchestral pitch, common in Europe)
    • A4 = 415Hz (Baroque pitch for historical performance)
    • A4 = 432Hz (Alternative tuning)
    • A4 = 435Hz (French standard, 1859)
  • Historical and alternative tuning systems (Just intonation, Pythagorean, etc.)
  • Integration with pitchtools
  • Optional advanced features: pip install octarver[advanced]

🔲 v0.3.x (Future)

Enhanced Features - Additional functionality:

  • MIDI note number conversion
  • Cent deviation display for tuning accuracy
  • Batch processing from files
  • Multiple output formats (JSON, CSV)

💡 Ideas Under Consideration

  • Interactive REPL mode for quick conversions
  • Harmonic series calculations
  • Chord frequency analysis

Note: The roadmap is subject to change based on user feedback and feature requests. Please open an issue if you have suggestions!

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License

Author

tkuro11

Links

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

octarver-0.1.4.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

octarver-0.1.4-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file octarver-0.1.4.tar.gz.

File metadata

  • Download URL: octarver-0.1.4.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for octarver-0.1.4.tar.gz
Algorithm Hash digest
SHA256 fa312fee7ef0b10b070486d203f666971daf5cbac05389c9d8d7060f8623d3a5
MD5 a633d9f2b3c343da5d026dada248362c
BLAKE2b-256 cb265f86fc17dc2f099ace4ce3624a047a416f769f6d33637a58af341721dbd4

See more details on using hashes here.

File details

Details for the file octarver-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: octarver-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for octarver-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6a0f56290b42f69593b8c8a8f6a0bf8c1b11261f7e67ee33ceaf873c00419f05
MD5 c51b0ccbfe7d7c9b612a2cee6826cf7e
BLAKE2b-256 063b71d822678d72bcdeafe3faacdb81a9b6d7dce03452c9fe17a22af9388b6f

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