Pitch to MIDI Converter
Accurately convert musical frequency (Hz) to MIDI note numbers and note names. Ideal for music producers, sound designers, and programmers looking to bridge the gap between scientific frequency and digital MIDI signals.
Formula: $69 + 12 \times \log_2(440/440) = 69$.
Result: MIDI Note 69.
Note: Calculations are based on A4 = 440Hz equal temperament. Results are rounded to the nearest integer within the MIDI range (0-127).
Pitch to MIDI Converter (Hz to MIDI Note Calculator)
Convert any frequency in Hertz (Hz) into its exact MIDI note number, musical note name, and corresponding MIDI hex message. This tool uses the standard equal temperament system (A4 = 440 Hz) and the official MIDI 0–127 note range. Enter a frequency, and the result is calculated instantly in your browser with full mathematical transparency.
Whether you are validating pitch detection results, tuning a synthesizer oscillator, writing MIDI scripts, or bridging DSP output to musical notation, this converter provides a precise and standards-based reference.
What Is a Frequency to MIDI Converter?
A frequency to MIDI converter translates a measured pitch (in Hz) into the MIDI note number used in digital audio systems.
In MIDI:
- Notes are represented as integers from 0 to 127
- Each number corresponds to a semitone
- MIDI note 69 equals A4 (440 Hz)
If you are working with raw pitch values from a tuner or analyzer, such as our real-time pitch tracker, this converter lets you map those frequencies directly into the MIDI domain.
This is especially useful for:
- DAW automation
- Synth programming
- MIDI controller calibration
- Debugging digital music software
- Verifying output from a frequency to note converter
How MIDI Note Numbers Work
MIDI Range (0–127)
The MIDI 1.0 specification defines 128 discrete note numbers:
- 0 = lowest defined note (C-1 in common notation)
- 60 = Middle C (C4)
- 69 = A4 (440 Hz)
- 127 = highest defined note
Each increment represents one semitone.
Octaves and Semitone Structure
An octave consists of 12 semitones. Every increase of 12 MIDI numbers raises the pitch by one octave.
Example:
| Note | MIDI | Frequency (Hz) |
|---|---|---|
| C4 | 60 | 261.63 |
| A4 | 69 | 440.00 |
| C5 | 72 | 523.25 |
Standard Reference Pitch
This tool assumes:
- A4 = 440 Hz
- Equal temperament tuning
- 12-tone semitone division
This is the modern international standard used in almost all digital production environments.
How the Conversion Formula Works
The Mathematical Equation
The frequency-to-MIDI formula is:
MIDI Note = 69 + 12 × log₂(frequency / 440)
Where:
- 69 is the MIDI number for A4
- 12 represents semitones per octave
- log₂ represents base-2 logarithm
- 440 is the A4 reference pitch
Why Logarithms Are Used
Pitch perception and frequency relationships are logarithmic. Each octave doubles the frequency.
For example:
- 440 Hz → A4 → MIDI 69
- 880 Hz → A5 → MIDI 81 (12 semitones higher)
The logarithmic component ensures proportional scaling across octaves.
Rounding to Nearest Integer
MIDI notes are integers. If a frequency falls between semitones:
- The result is rounded to the nearest whole number.
- Microtonal deviations are not preserved.
- Fractional MIDI values are not output.
If you require microtonal precision, you would need pitch bend data rather than integer note mapping.
How to Use This Pitch to MIDI Converter
- Enter a frequency value in Hz (e.g., 440).
- Click “Convert to MIDI.”
- View:
- MIDI note number
- Musical note name
- MIDI hex message (Note On example)
- Reset to calculate another value.
Common use cases:
- Validate pitch captured from recorded audio using our audio file pitch detector
- Translate oscillator frequency to MIDI for synth configuration
- Debug MIDI routing inside a DAW
All calculations occur locally in your browser. No audio or data is recorded or stored.
Interpreting Your Results
When you enter a frequency, you receive:
| Input (Hz) | MIDI # | Note Name | Meaning |
|---|---|---|---|
| 440 | 69 | A4 | Concert reference pitch |
| 261.63 | 60 | C4 | Middle C |
| 329.63 | 64 | E4 | Major third above C4 |
If a frequency is slightly sharp or flat relative to a semitone, rounding determines the final MIDI note.
For example:
- 445 Hz may still round to 69 (A4)
- 452 Hz may round to 70 (A#4/Bb4)
If you need exact pitch deviation in cents, pair this tool with our pitch accuracy checker.
MIDI Hex Message Explained
The tool outputs a sample MIDI Note On hex message.
Example:
0x90 – 0x64
Byte Breakdown
| Byte | Meaning |
|---|---|
| 0x90 | Note On, Channel 1 |
| 0xXX | Note number (hex representation) |
| Velocity | Not shown (commonly 0x40–0x7F) |
MIDI messages consist of:
- Status byte (command + channel)
- Data byte 1 (note number)
- Data byte 2 (velocity)
Understanding this structure is essential for developers building custom MIDI software or hardware tools.
Accuracy & Limitations
What This Tool Does Precisely
- Uses equal temperament math
- Uses A4 = 440 Hz standard
- Follows MIDI 1.0 note numbering
- Rounds to nearest valid MIDI integer (0–127)
Limitations
- No microtonal output
- No alternate tuning systems (e.g., 442 Hz orchestral tuning)
- No pitch bend calculation
- Requires manual frequency entry
- Does not analyze audio directly
For real-time pitch capture before conversion, use our voice pitch analyzer.
Practical Applications
1. DAW Programming
Convert measured frequencies into MIDI clips for sequencing or automation.
2. Synthesizer Tuning
If a synth oscillator displays frequency in Hz, this tool converts that value into its musical note equivalent.
3. MIDI Debugging
Software developers can verify frequency-to-note conversion logic against the standard formula.
4. Educational Use
Students studying acoustics or digital music production can observe how pitch scales logarithmically.
To explore tonal relationships after conversion, you can analyze harmony using the scale finder or map notes inside a progression with the chord progression finder.
Common Mistakes
- Entering kilohertz (kHz) instead of Hz
- Expecting decimal MIDI output
- Confusing note number with velocity
- Assuming non-standard tuning (442 Hz orchestral pitch)
- Ignoring octave labeling differences between DAWs
Always confirm your DAW’s octave numbering convention (some use C3 as middle C instead of C4).
Frequently Asked Questions
How do you convert Hz to a MIDI note number?
Use the formula:
MIDI = 69 + 12 × log₂(f / 440)
Where f is frequency in Hz. The result is rounded to the nearest integer between 0 and 127. This formula reflects equal temperament tuning with A4 as 440 Hz. It is the standard used in digital music systems and follows the MIDI 1.0 specification.
What MIDI note is 440 Hz?
440 Hz corresponds to MIDI note 69, which represents A4. This is the international concert pitch reference and the anchor point for the entire MIDI note scale. Every other note is calculated relative to this reference using semitone intervals.
Why is A4 MIDI 69?
In the MIDI specification, numbering starts at 0 and increments by semitone. When standardized, A4 (440 Hz) was assigned the number 69 to align with equal temperament scaling and maintain symmetrical mapping across octaves.
What happens if I enter a frequency above the MIDI range?
The valid MIDI note range is 0–127. Extremely high or low frequencies outside this mapping cannot be represented as standard MIDI notes. If the frequency corresponds to a value outside this range, it will not produce a valid MIDI note.
Can MIDI represent microtones?
Standard MIDI note numbers are integers and represent semitone steps. Microtonal adjustments require pitch bend messages or extended MIDI protocols. This tool does not output pitch bend values.
Why are results rounded?
MIDI note numbers are discrete integers. Frequencies often fall between semitones. Rounding ensures compatibility with the MIDI specification. Without rounding, fractional notes would not map to standard MIDI events.
What is MIDI note 60 in Hz?
MIDI note 60 corresponds to Middle C (C4). Its frequency is approximately 261.63 Hz under equal temperament tuning with A4 set to 440 Hz.
Is this based on equal temperament?
Yes. The calculation assumes 12-tone equal temperament and A4 = 440 Hz. Alternative tuning systems are not supported in this version.
Does this tool record audio?
No. The converter only processes the numerical frequency you enter. No microphone input is accessed, and no data is stored or transmitted.
How can I verify pitch before converting?
You can measure frequency using tools such as our real-time pitch tracker or other pitch detection utilities, then input the measured Hz value into this converter for MIDI mapping.
Related Tools
- Real-Time Pitch Tracker
- Frequency to Note Converter
- Audio File Pitch Detector
- Voice Pitch Analyzer
- Scale Finder
- Chord Progression Finder
