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.2.tar.gz (7.2 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.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for octarver-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dcd56a9a3971bfa28518ecab76cfe41f0a0e0d89bc1d568fd82e9d8a482effc0
MD5 e7bec4c1eba51a19c3e8725a2ba57e03
BLAKE2b-256 267b97a6aad42710d02b6a2fc3083c0b4035055e4a0f53e1563fc480ba096b1b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for octarver-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e30f3d3b55818499e29ba687d7f9ea586bd628b22c04b3760e428843b6d61ffd
MD5 4742f54073e5568889a6a0fea972ccb0
BLAKE2b-256 0791bb6800338e5aa1bd98389ecb78da269e75d3ed4d98780288649b2ff41139

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