-
Notifications
You must be signed in to change notification settings - Fork 0
Interface Microphone
The microphone panel groups two tools that use audio input from an ALSA capture device:
-
Latency Calibrator — measures the round-trip delay of each instrument and writes the result directly into that instrument's
sync_delayfield. - Chromatic Tuner — detects the pitch of any sound and guides you to a target note.
Source: public/js/features/CalibrationModal.js, public/js/features/TunerModal.js, src/audio/DelayCalibrator.js.

- Général Midi Boop sends a probe note to the instrument.
- ALSA records the audio response on the selected input.
- Onset detection finds the first amplitude peak above the threshold.
-
round-trip delay = audio onset timestamp − note send timestamp. - Steps 1–4 repeat N times; the median is used as the final value.
- A confidence score is derived from the spread of measurements (tight cluster = high confidence).
- The delay is written to
instrument_settings.sync_delay; playback compensation applies immediately.
| Field | Description |
|---|---|
| Device | ALSA capture device (e.g. hw:1,0, default, sysdefault) |
| Auto-detect | Picks the first detected USB microphone automatically |
Any device listed by arecord -l is available in the dropdown.
A real-time level bar shows the microphone input. An inline draggable threshold slider sets the onset detection level (0.01–0.10 of full scale). Verify that:
- The bar rises when the instrument plays.
- The bar stays below the threshold when the instrument is silent.
A threshold set too high will miss soft onsets; too low will trigger on background noise.
Each connected instrument has its own "Measure" button and a status indicator:
| Status | Meaning |
|---|---|
idle |
No measurement taken yet |
running |
Measurement in progress |
success |
Valid result, delay and confidence shown |
error |
No onset detected or inconsistent results |
Run measurements independently so that instruments with very different latencies are each calibrated correctly.
A canvas chart plots the round-trip delay and confidence score across all runs for the selected instrument. Use this to spot outliers or environmental noise spikes.
| Parameter | Default | Description |
|---|---|---|
| Number of measurements | 5 | Median calculated over N runs |
| Detection threshold | 0.05 | Onset amplitude threshold |
| Probe note | A4 (69) | MIDI note sent to trigger the instrument |
| Probe velocity | 100 | Velocity of the probe note |
Once at least one measurement succeeds, an "Apply delays" button appears. It writes all pending latency values in one operation. Individual instruments can also be applied one at a time.

The tuner is accessible via the "Open Tuner" link at the top of the calibration panel (or directly from the device panel). Pitch detection runs server-side using the MPM algorithm; the frontend subscribes to tuner:pitch WebSocket events.
| Mode | Description |
|---|---|
| Auto | No target — detects the nearest chromatic note and displays the cents deviation |
| Note | User selects a target note from a chromatic strip (E1–C6); needle shows up/down guidance |
| Instrument | User selects a connected instrument; for strings the open-string notes are shown; for other instruments falls back to the chromatic row |

Play any note; the display locks onto the closest pitch and shows cents deviation (−50 to +50 cents). Useful for quick intonation checks without a specific target.

Select a target note or open string. The needle and colour indicator guide you:
- Green — within ±5 cents (in tune)
- Yellow — 5–20 cents deviation
- Red — >20 cents deviation
| Preset | Open strings |
|---|---|
| Guitar | E2 A2 D3 G3 B3 E4 |
| Bass | E1 A1 D2 G2 |
| Violin | G3 D4 A4 E5 |
| Viola | C3 G3 D4 A4 |
| Cello | C2 G2 D3 A3 |
| Ukulele | G4 C4 E4 A4 |
Note names follow the locale format set in Interface-Settings (US notation, solfège, or raw MIDI number). Reference pitch: A4 = 440 Hz.
-
Interface-Instrument-Creation — latency
sync_delayis stored per instrument - Interface-Settings — select note-name locale (US / solfège / MIDI number)
- Advanced-Topics — technical background on onset detection and the MPM algorithm
Général Midi Boop · MIT License · Sources tracked in wiki/ — edits synced on push to main.
Getting Started
Interface — Pages & Modals
- Interface-Main-Page
- Interface-Instrument-Creation
- Interface-Virtual-Piano
- Interface-Loop-Manager
- Interface-Lighting-Control
- Interface-Playlist
- Interface-Microphone
- Interface-Settings
- Interface-Hand-Management
Core Concepts
Reference
Operations
Community