Msys: a plugin-based music workstation
- Instrument plugins
- 6
- Automated tests
- 1 200+
- Lines of C#
- 74 000
Task
Build a cross-platform music application in the spirit of FL Studio: instrument plugins, a shared synth engine, a timeline with mixing and export, and group work over the network.
Solution
An Avalonia shell that knows only plugin contracts, six instrument plugins built on MVP, its own synthesis core, MIDI and low-latency audio backends, and a collaborative session protocol.
Architecture
The system is split into layers: Msys.Core (audio sources, effects, export, MIDI — no UI), Msys.Synth (string modeling, sampler, modular synthesis), Msys.Plugins (plugin contracts and shared parts), Msys.Widgets (shared controls), and Msys.Shell — the Avalonia application with projects, a timeline, and a mixer. The shell knows nothing about specific instruments, only the contracts.
Six instruments are separate plugins — guitar, piano, recorder, drum pad, launchpad, and a modular synth that serves as a sound source for the others. Each follows the same MVP structure: the window only assembles views, all logic lives in a session (presenter) covered by tests. Third-party plugins work like VST: built against the contracts, installed from a .dll, loaded into an isolated assembly context, and — in a group session — downloaded from the host if a participant doesn't have one.
The timeline supports pattern blocks with volume and fades, multi-selection, mute/solo, loop regions, and a metronome; the mixer exports to WAV/MP3. In a collaborative session several people edit one project from their own machines and see each other's cursors and selections. Audio runs on WASAPI/WinMM on Windows and PortAudio elsewhere.
