MIDI velocity: 17 synthetic event controls (2026-10-05)

Question: Is MIDI velocity the original audio volume or detection confidence?

These are hand-authored note events, not an MP3 recognition test. All 17 files
contain one sounding note: MIDI pitch 60, channel 0, from 0.25 to 0.75 seconds,
with the file ending at 1.00 second. Format 0, one track, PPQ 960, tempo 500000
microseconds per quarter note. In the main pair, the only changed byte is offset
36: Note On velocity 40 versus 100. Pitch and timing are identical.

REPRODUCE
Tested with Node 26.0.0, Python 3.12.14 and Mido 1.3.3. No Node package, model,
TTS, original MP3 or internet connection is needed to run the generator.
Install Mido 1.3.3 separately if it is not already available, for example:
  python3 -m venv .venv
  .venv/bin/python -m pip install mido==1.3.3
Then, from this directory:
  node generate.cjs
  .venv/bin/python verify.py
Or run verify.py with an existing Python environment containing Mido 1.3.3.
The verifier does not import the generator or encoder. It enumerates fixed
expected events and checks MIDI framing, clock, balanced note pairs and hashes.
Generation overwrites the included files; measurements.json has a run timestamp.

CONTROLS AND POSITIVE NOTE ON VELOCITIES
  velocity-40.mid / velocity-100.mid                 40 / 100
  explicit-100-level-40.mid                         100
  confidence-low.mid / confidence-high.mid          80 / 80
  level-minus-40.mid / level-minus-20.mid            60 / 80
  default-no-level.mid                              80
  model-amplitude-half.mid / model-amplitude-one.mid 94 / 100
  boundary-db-minus-80.mid / boundary-db-minus-70.mid 30 / 30
  boundary-db-plus-15.mid / boundary-db-plus-30.mid   115 / 115
  boundary-velocity-1.mid / boundary-velocity-127.mid 1 / 127
  note-on-zero-as-off.mid                           40

The production exporter uses an explicit integer velocity from 1 to 127 first.
Otherwise its level mapping is clamp(round(100 + db), 30, 115), or default 80
when no level is supplied. Inputs 0, -1, 128 and 0.5 are rejected as explicit
sounding velocities; generation.json records the actual RangeErrors. Lower and
upper saturation cases and default-no-level bypass the normal analysis filter.
Positive db boundary inputs are synthetic, not measured original audio levels.

The confidence values 0.1 and 0.9 are synthetic metadata attached AFTER detection.
Both produce identical MIDI; this does not test whether confidence changes an
earlier detector's pitch estimation or segmentation. Manually supplied upstream
amplitudes 0.5 and 1 exercise the exact worker conversion callback; they are not
model inference or audio measurements. The actual polyphonic amplitude upstream
is derived from model frames; the Melody level path derives from waveform RMS.
No calibrated equivalence to original volume or confidence is demonstrated.

The last file changes only the normal Note Off status byte into Note On with
zero velocity. It still ends the existing sounding note; it is not a second
sounding note and is NOT normal site output. See MIDI.org's community explanation
quoting the specification:
  https://midi.org/community/midi-specifications/zero-velocity-note-on
Note On/Off seven-bit velocity data and general instrument response are described:
  https://midi.org/summary-of-midi-1-0-messages
  https://midi.org/about-midi-part-3midi-messages
An instrument's response to velocity can vary; event values are not percentages
of recognition accuracy or a measurement of original recording volume.

PREVIEW LIMIT
The actual frozen preview.browserAdapter is invoked with an instrumented fake
AudioContext. For velocity 40 and 100, the logged triangle frequency is identical
and the gain schedule is identical: 0 -> 0.16 -> 0.16 -> 0. This is a parameter
trace, not native browser execution, recorded sound, acoustic measurement or
subjective listening. The current preview does not read velocity/db for its MIDI
oscillator gain. It does not establish how a chosen DAW instrument would sound.

PROVENANCE AND INCLUDED FILES
source-manifest.json gives full-module SHA256 values and exact-function/callback
hashes. production-sources.json is hash-only provenance for nine original audit
sources at source commit 541af6a978e8b01981f3c08f537d64544f7f78fa.
Included executable sources are only:
  sources/midi-file.js       complete production serializer
  sources/note-edits.js      complete production note-edit session
  sources/preview.js         complete production preview module
  sources/analysis-notes.js  exact analysisNotes function + CommonJS export
  sources/worker-note-shape.js exact callback + lexical-duration wrapper
The two wrappers preserve the audited function/callback bodies and their hashes.
Only the Polyphonic analysis branch is exercised; no Melody detector is bundled.
The full app, worker bundle, model/runtime and third-party dependency source are
not included. The bundle does not imply a model test or deploy code to a website.

17 MIDI fixtures, generate.cjs, verify.py, generation.json, measurements.json,
two original SVG diagrams, source manifests and this README make the download
self-contained for the stated synthetic controls. bundle-manifest.json lists
all included files except itself, with byte lengths and SHA256 values.
