-
Notifications
You must be signed in to change notification settings - Fork 0
Advanced Topics
Deeper dives into specialised subsystems.
Driving real acoustic strings via solenoids and servos through MIDI CC. The tablature editor offers bidirectional MIDI ↔ tab conversion with 19 tuning presets spanning guitar, bass, violin, ukulele, mandolin, and more.
Full reference: docs/STRING_HAND_POSITION.md.

Highlights:
- Per-string fret-range constraints
- Custom tuning entry alongside presets
- Auto-arrangement chooses the most playable fingering for a given note sequence
- WebSocket commands:
string_get_presets,string_set_tuning,string_arrange
For motorised keyboards or automated pianos, the system plans hand placement before sending notes:
- Per-instrument
hands_configwith pitch-split or track-based modes. - Hand position transmitted via reserved CCs (typically CC 23 / 24 — full reservation list in
docs/MIDI_CC_INSTRUMENT_CONTROLS.md). - Safety clamps prevent commanding the hardware outside its physical envelope.
- Planning runs ahead of the playback cursor (lookahead) so positioning completes before the next note.
Source: src/audio/DelayCalibrator.js.

How it works:
- The system sends a probe note to the device.
- ALSA records the audio response on the configured input.
- Onset detection finds the first peak above a threshold.
- The round-trip delay = (audio onset timestamp) − (note send timestamp).
- Steps 1–4 repeat N times; the median is taken with a confidence score derived from the spread.
- The result is written to the device's
latencyfield; playback compensation kicks in immediately.
The calibration modal groups all steps in one place:
- ALSA device selector — auto-selects the first detected USB microphone; any ALSA capture device is available in the dropdown.
- VU-meter + threshold slider — real-time input level bar with an inline draggable threshold so you can verify the mic picks up the instrument before measuring.
-
Per-instrument "Measure" button — triggers a measurement run for each connected instrument independently; status indicators show
idle/running/success/error. - Canvas chart — plots round-trip delay and confidence score for each measurement run.
- "Apply delays" button — appears once at least one measurement succeeds; writes all pending latency values to the device settings in one step.
Tunables:
- Number of measurements
- Detection threshold (dBFS)
- Probe note (default A4)
- Recalibration reminder interval
Accessible via the "Open Tuner" banner at the top of the calibration modal (or directly from the device panel). Audio is captured by ALSA on the Raspberry Pi and pitch detection runs server-side using the MPM algorithm; the frontend subscribes to tuner:pitch WebSocket events.
Three operating modes:
| Mode | Description |
|---|---|
| Auto | No target — shows the nearest chromatic note to the detected frequency with cents deviation. |
| Note | User picks a target from a chromatic strip (E1–C6); display shows up/down guidance and a needle against the chosen pitch. |
| Instrument | User selects a connected MIDI instrument or a generic preset. For stringed instruments with a configured tuning the picker exposes the open-string notes; for melodic instruments it falls back to the chromatic row. |

Play any note; the display locks onto the closest pitch and shows the deviation in cents.

Select a target note or open string. The needle and colour indicator guide you to the exact pitch.
Built-in instrument presets (open strings in standard tuning):
| Preset | 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 are displayed in the locale format chosen in Settings (US, FR/solfège, or raw MIDI number). Reference pitch is A4 = 440 Hz.
The project reserves several Control Change numbers for instrument-specific behaviour (hand position, articulation hints, custom hardware). The authoritative list is in docs/MIDI_CC_INSTRUMENT_CONTROLS.md. Avoid these CC numbers when authoring generic MIDI files.
The UI ships with 28 language files under public/locales/: English, French, Spanish, German, Italian, Portuguese, Dutch, Polish, Russian, Chinese, Japanese, Korean, Turkish, Hindi, Bengali, Thai, Vietnamese, Czech, Danish, Finnish, Greek, Hungarian, Indonesian, Norwegian, Swedish, Ukrainian, Esperanto, Tagalog.
GM instrument names are localised in every supported language.
To add a language:
- Copy
public/locales/en.jsontopublic/locales/<code>.json. - Translate the values, leaving keys untouched.
- Add the language to the locale picker in the settings view.
- Run
npm run test:frontendto make sure no key is missing.
MIDI files are stored by SHA-256 hash in src/files/BlobStore.js. Identical files dedupe automatically; renames and moves only update metadata rows. Use this when designing tooling that mass-imports files — uploading the same content twice is cheap.
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