AUDIO TO MIDI / KEEPING THE ACCENTS
Audio to MIDI for a melody with changing dynamics
Check the exported velocities before arranging. Recognizing a melody's pitches does not establish that its loud and soft pattern survived.
Measured answer. Both actual downloads gave every note velocity 88. The original alternating pattern was 40, 112, 40, 112, 40, 112, 40, 112. All eight pitches returned, but that velocity pattern did not.
Change the per-note pattern while keeping the melody fixed
We prepared two original MIDI files with C4, D4, E4, G4, A4, G4, E4 and C4 in that order. They share one track, channel zero, 480 ticks per quarter note and a 500,000-microsecond quarter note, equivalent to 120 BPM. Starts are ticks 0, 480, 960, 1440, 1920, 2400, 2880 and 3360. Each keyed note lasts 336 ticks.
Seconds equal tick ÷ 480 × 500,000 ÷ 1,000,000, or tick ÷ 960. Starts are therefore 0, 0.5, 1, 1.5, 2, 2.5, 3 and 3.5 seconds, with a keyed duration of 336 ÷ 960 = 0.35 seconds. The control uses velocity 88 throughout; the other file alternates 40 and 112. These are programmed attack-velocity values, not measurements of a performer.
How the original instructions became test audio
We executed the exact production MIDI and audio helper locally in Node, using its Soft sine setting. Its amplitude calculation includes velocity ÷ 127 × 0.22, along with the sine and attack/release envelope. With this setting, the programmed velocity pattern changes the rendered tone levels. This describes this simple renderer, not how every instrument responds to MIDI.
Each WAV is mono, 16-bit PCM at 22,050 samples per second, with 95,918 frames and 191,880 bytes. Duration is 95,918 ÷ 22,050 ≈ 4.350023 seconds, including the allocated tail. The two files have different sample data. The public generator reproduced both hashes exactly from their original MIDIs.
On 8 November 2026, we selected each WAV separately in the live WAV-to-MIDI converter in Chrome, with export BPM 120 and the final-release estimate enabled. Changing the input cleared the previous draft. Both generated downloads were saved through their native links, then independently parsed with Ruby. Each is a 119-byte Standard MIDI File; equal byte length does not mean identical events.
The alternating WAV really contains different tone levels
We read the signed PCM16 samples from each WAV, then measured the absolute peak inside every original key window. A window starts at floor(original start × 22,050) and ends before ceil(original key end × 22,050). Peak is max(abs(sample)) across that window. The exact frame boundaries, frame counts and sample-square sums are retained in the raw record.
Every even-control window peaks at 4,995 PCM units. The alternating file's peaks are 2,270, 6,357, 2,270, 6,357, 2,270, 6,357, 2,270 and 6,357. The change was therefore present in the input bytes before conversion. These are integer waveform peaks, not decibels, perceived loudness or the browser detector's internal frame measurements.
The original accents became a flat row of velocities
The actual outputs both contain the programmed eight-pitch sequence. Every Note On velocity is 88, including in the alternating-input download. The even control matches its programmed velocities, but that alone does not show that velocity was inferred: 88 is also the exporter's fixed value.
Alternating original MIDI
- 1 · C440
- 2 · D4112
- 3 · E440
- 4 · G4112
- 5 · A440
- 6 · G4112
- 7 · E440
- 8 · C4112
Actual downloaded MIDI
- 1 · C488
- 2 · D488
- 3 · E488
- 4 · G488
- 5 · A488
- 6 · G488
- 7 · E488
- 8 · C488
| Note | Even source | Alternating source | Even output | Alternating output |
|---|---|---|---|---|
| 1 · C4 | 88 | 40 | 88 | 88 |
| 2 · D4 | 88 | 112 | 88 | 88 |
| 3 · E4 | 88 | 40 | 88 | 88 |
| 4 · G4 | 88 | 112 | 88 | 88 |
| 5 · A4 | 88 | 40 | 88 | 88 |
| 6 · G4 | 88 | 112 | 88 | 88 |
| 7 · E4 | 88 | 40 | 88 | 88 |
| 8 · C4 | 88 | 112 | 88 | 88 |
For the alternating source, each 40 becomes 88, a difference of +48; each 112 becomes 88, a difference of −24. Mean absolute velocity difference is sum(|output − source|) ÷ 8 = (4 × 48 + 4 × 24) ÷ 8 = 288 ÷ 8 = 36 MIDI units. The even control's value is zero by the same calculation. This compares the stored integers; it is not a performance accuracy percentage or an acoustic loudness error.
The two downloads have the same velocity row but different note-time events. We have not called the files byte-identical or treated matching pitch names as complete preservation of the phrase.
Matching velocities would still leave note times to inspect
The original D4 begins at tick 480, or 0.5 seconds. In the even-control download it begins at tick 424: 424 ÷ 960 ≈ 0.441667 seconds. In the alternating-input download it begins at tick 401: 401 ÷ 960 ≈ 0.417708 seconds. The difference between these actual starts is (401 − 424) ÷ 960 ≈ −0.023958 seconds.
Thus, changing the source velocity pattern also coincided with a different detected start for this note. We did not isolate decoding and detection as separate causes, and this pair does not establish a universal timing correction. Inspect pitches, attack times, lengths and velocity as separate fields; the raw record retains every event and exact time.
Editable velocity and recovered dynamics are separate claims
The MIDI Association's message summary identifies note number and velocity as separate Note On fields. Reading the pitch alone therefore does not establish the other field. Nor is a velocity integer itself a measurement in decibels.
The current audio-to-MIDI writer places the constant value 0x58, decimal 88, in each Note On event. This is implementation analysis, separate from our two measured downloads. The source reading explains the current exported value; we did not measure a different converter or claim that all audio-to-MIDI tools behave this way.
Save an unchanged draft
Keep the recording and first MIDI together. Use the original MIDI if available and you need its programmed accents.
Review the phrase before adding accents
Correct unwanted pitches and note boundaries first. In this pair, matching the eight pitch names did not guarantee the original start times.
Shape dynamics intentionally
Adjust velocities as an arrangement decision and listen with the instrument you intend to use. An editable velocity lane is not evidence that the source accents were recovered. We did not test a particular DAW or instrument's velocity response.
Download both controls and their actual results
Each group keeps the original instructions, rendered audio and actual conversion together.
Even source velocity
Every original Note On is 88.
Original MIDI instructions Rendered input WAV Actual downloaded MIDIAlternating source velocity
Original Note Ons alternate between 40 and 112.
Original MIDI instructions Rendered input WAV Actual downloaded MIDIAll events, PCM windows, hashes and calculation inputs · Rebuild both WAV controls
A question before arranging the accents
Do eight matching note names mean the strong and weak notes survived?
Editorial question. No. Our two outputs retain the eight pitch names, but the alternating source's 40/112 pattern becomes eight values of 88. The input WAV's sample peaks also alternate, so the result cannot be explained as identical tone levels in these constructed inputs. The actual timing differences are a separate check.
What this pair establishes
These are two short, programmed sine-tone melodies, not recordings of a singer or an acoustic instrument. We tested one Chrome session, one renderer tone and one export configuration. Input sample peaks and output MIDI integers do not measure perceived expressiveness. The pair establishes the stored velocities and note times for these files, not a general transcription accuracy rate or a promised editing recipe for real music.
For the complete workflow, see how to convert audio to MIDI. Changing a melody's tone color and preserving its accents are different checks; key releases and pedal events need their own inspection too.