Does a slower attack delay the MIDI note?

In Noteline’s 14-file WAV test, attacks from 5 to 300 ms shared a MIDI onset of 244.792 ms. The tested 450, 600, and 750 ms attacks started at 255.208 ms. Every source tone began at 250 ms.

What counts as the start in this test?

We used one synthetic 440 Hz sine wave for all fourteen inputs. Each file is 1.5 seconds long and uses 44.1 kHz, mono, 16-bit PCM WAV. The oscillator begins at the same phase, at 250 ms, in every file. The scheduled end is 1,050 ms. We changed the length of the linear rise and kept the 18 ms release fixed.

The 5 ms rise reaches the programmed sustain level at 255 ms. The 750 ms rise reaches it at 1,000 ms. With the release programmed to begin at 1,032 ms, those two files have sustain plateaus of 777 ms and 32 ms. The long ramp therefore still has a flat section before the fixed release begins. These times describe the amplitude envelope used to make the audio.

The first nonzero PCM sample ranges from frame 11,026 in the shortest files to frame 11,030 in the 750 ms file, using zero-based frame numbers. The scheduled start is frame 11,025. The latest first nonzero sample is about 0.113 ms after that reference. Sixteen-bit rounding near zero leaves a few initial samples silent, so the CSV records the first nonzero frame separately from the prescribed start.

Programmed 5 and 750 millisecond rises start at 250 milliseconds and both release to zero at 1,050 milliseconds.

Which attack changes the exported start?

The 5, 10, 15, 25, 40, 60, 75, 100, 150, 200, and 300 ms files all gave a first MIDI onset of 244.792 ms. Their onsets are 5.208 ms before the 250 ms synthesis reference in the per-file CSV. The four original test settings, 5, 25, 75 and 150 ms, land in that same group.

The 450, 600 and 750 ms files all gave an onset of 255.208 ms, or 5.208 ms after the common reference. The first observed shift is between the tested 300 and 450 ms settings. The starts across all fourteen downloads span about 10.416 ms at the reported precision. We did not sample a setting strictly between 300 and 450 ms.

The exported note ends at 1,055.208 ms in every download, around 5.208 ms after the fixed source end. The common end lets you separate the two timing effects. In the CSV, the early-start group has a duration of 810.416 ms from the rounded endpoints. The later-start group has an 800.000 ms duration. Moving the later start accounts for the duration change here.

All fourteen exports contain exactly one A4, MIDI 69, with note-on velocity 120. The generated waveform peaks range from 16,383 to 16,384 in signed 16-bit PCM. That one-count spread is consistent with peak matching and quantization of the source. The test therefore provides positive controls for pitch, event count and peak level alongside the timing measurement.

Onset error is minus 5.208 milliseconds through the tested 300 millisecond attack, and plus 5.208 from the tested 450 millisecond attack.

How should you run the comparison?

Use the Noteline homepage for the attack comparison with the 5 ms and 450 ms inputs. Convert each in a fresh selection and save both MIDI files. Put the original WAV and its MIDI at the same track origin in your editor. Use a time display in milliseconds before you adjust tempo or quantize any notes.

We compared the complete downloaded MIDI files as well as the decoded event rows. The eleven early-start files share one SHA-256 hash. The three later-start files share a second hash. For example, the 5 and 300 ms downloads match byte for byte despite a 295 ms difference in the rise setting. The 450 and 750 ms files also match byte for byte.

The tested build analyzes pitch on a 10 ms frame step. When it makes the note events, it places the event edge half a step before the selected frame center. The MIDI writer then rounds seconds to whole ticks. At the single-note fallback of 120 BPM and 480 ticks per quarter note, one tick lasts about 1.042 ms. The CSV uses the timings decoded from the saved file.

To reproduce the signed error, subtract 250 ms from the first note-on time. A result of 244.792 ms becomes −5.208 ms. Keep the WAV start at time zero and read the .mid file in seconds. A reference placed at the envelope peak instead would tell you how far the MIDI start is from that peak, a different quantity with a different value for each rise.

Before moving a track, also check whether its audio lead-in survived import. The first-note timing test with known lead-ins gives a separate control for that same onset-alignment check. If both audio and MIDI clips start in the intended place, the remaining offset can be inspected against the waveform and the reference time for the first attack.

Early and late onset groups have different starts and the same MIDI end time of 1,055.208 milliseconds.

Where does this result apply?

These clips are one held synthetic tone with linear amplitude rises in WAV files. Their start and end are known before conversion. A real take may have breath noise or an instrument transient before its sustained pitch, so its onset can require a listening decision. Treat the two observed groups as a comparison of these inputs. Use a short isolated clip for a check on your own recording.

The source tone follows the same 800 ms schedule in every file. A separate recording with a shorter note may spend more of its sounding time near silence during the rise. The data here cannot give a delay for every instrument or envelope shape. Keep both the original timing and the exported version available when you make any corrections.

Can you download every input and output?

The complete attack results CSV gives reference frames, WAV settings, output pitch, event count and signed onset error. Download the paired files to repeat the comparison.

AttackFilesOnset (ms)
5 msWAV MIDI244.792
10 msWAV MIDI244.792
15 msWAV MIDI244.792
25 msWAV MIDI244.792
40 msWAV MIDI244.792
60 msWAV MIDI244.792
75 msWAV MIDI244.792
100 msWAV MIDI244.792
150 msWAV MIDI244.792
200 msWAV MIDI244.792
300 msWAV MIDI244.792
450 msWAV MIDI255.208
600 msWAV MIDI255.208
750 msWAV MIDI255.208

Open the converter and time your first MIDI note