# MUSIC-005 — Open-Source Instrument Engine

MusicOS keeps the sequencer MIDI-first and separates musical events from instrument rendering.

## Selected browser engine

WebAudioFont is used as the first browser instrument adapter because it can play sampled SoundFont instruments through Web Audio and exposes MIDI-style pitch/duration scheduling. Its project documents a General MIDI instrument catalog and sample-based synthesis. See: https://github.com/surikov/webaudiofont

## Production renderer

FluidSynth is the planned native/server renderer for high-quality MIDI-to-audio rendering. FluidSynth is an open-source SoundFont synthesizer supporting SF2/SF3 and MIDI playback/rendering. See: https://www.fluidsynth.org/

## Architecture

MusicOS Sequencer
→ InstrumentAdapter
→ WebAudioFontAdapter (browser preview)
→ FluidSynthAdapter (future production render)
→ WAV/MP3 export pipeline

## Instrument registry

Initial logical instruments:
- Piano — GM 0
- Violin — GM 40
- Cello — GM 42
- Acoustic Guitar — GM 24
- Electric Bass — GM 33
- Flute — GM 73
- Trumpet — GM 56
- Trombone — GM 57
- French Horn — GM 60
- String Ensemble — GM 48
- Choir Aahs — GM 52
- Synth Pad — GM 88

Indian instruments such as Veena, Mridangam and Tabla require curated dedicated samples/presets rather than assuming General MIDI contains authentic versions.

## Licensing rule

Software license and sound/sample license are separate. MusicOS must record the license/source of every bundled or remotely loaded sound bank before commercial redistribution.

## V0.1 implementation

For the first browser implementation, use WebAudioFont as an optional adapter and retain the existing oscillator as fallback. Do not bundle third-party sample files into the repository until their redistribution terms have been verified.
