How falktx/carla works
1. What the repository is
Carla is an audio plugin host and plugin/application wrapper, not a single app. The repo builds multiple runtime targets: standalone host apps, JACK-specific host modes, a control app, a database/settings frontend, a REST server, bridge helpers, and exported plugin binaries in LV2/VST/AU/native forms.
2. Top-level architecture
The system is split into a frontend layer for user interaction, a backend/engine layer for audio/MIDI processing and plugin lifecycle, and a set of format/driver adapters that connect Carla to external plugin ecosystems and audio runtimes. The main data path is: UI/control messages → host/backend state changes → engine graph scheduling → audio/MIDI I/O and plugin processing.
3. Frontend subsystem
source/frontend contains the UI applications and shared GUI logic, with both C++ and Python implementations. It includes the main Carla host UI, rack/patchbay variants, JACK multi/single client launchers, plugin list dialogs, settings UI, and widgets/canvas code. The frontend is responsible for presenting plugin graphs, parameters, presets, and transport/control state, but it does not do DSP itself.
4. Backend and engine subsystem
source/backend is the core host implementation. The engine layer under source/backend/engine manages audio/MIDI ports, plugin instances, engine graph topology, and runtime scheduling. Separate engine backends exist for JACK, native drivers, SDL, RtAudio, OSC, dummy mode, and internal/bridge use. This is the primary execution boundary for real-time processing.
5. Plugin loading and format adapters
source/backend/plugin and source/plugin implement support for multiple plugin formats and host-plugin packaging. Carla can load LADSPA, DSSI, LV2, VST2, VST3, CLAP, AU, JSFX, SFZero, and internal/native plugins. These adapters normalize each format into Carla’s internal host model so the engine can treat them consistently.
6. Bridge and isolation layers
source/bridges-plugin, source/bridges-ui, and source/jackbridge provide the process-boundary machinery for running plugins or UIs out-of-process. This is especially important for format compatibility and crash/isolation scenarios, such as bridged plugins or external UIs. The bridge layer acts as a proxy between the main host process and a separate plugin/UI process via pipes/shared protocol helpers.
7. Native plugins and built-in effects/tools
source/native-plugins contains Carla’s bundled plugins: audio gain, bypass, MIDI utilities, MIDI file/pattern tools, note tools, XY controller, quad panner, and similar utilities. These are compiled into Carla’s own plugin ecosystem and can be used like regular plugins inside the host. They are a separate boundary from external third-party plugin scanning/loading.
8. Standalone apps and entrypoints
The repo builds several executable front doors in source/frontend and source/backend, including carla, carla-control, carla-jack-*, carla-rack, carla-patchbay, carla-plugin, carla-database, carla-settings, and carla-rest-frontend. Packaging scripts under data/ and launch wrappers select platform-specific drivers, GUI toolkits, and deployment formats.
9. Remote control and service interfaces
Carla exposes non-GUI control paths through OSC and REST. The OSC engine code lives under source/backend/engine/CarlaEngineOsc*, and the REST server is in source/rest. These interfaces let external tools control host state, plugin parameters, and session operations without using the desktop UI.
10. Plugin discovery, metadata, and persistence
source/backend/utils and source/utils contain plugin discovery, cached plugin indexing, state serialization, process helpers, ring buffers, IPC, and platform abstractions. This layer mediates between scanned plugin metadata, saved Carla projects, and runtime engine state. The database frontend also sits on top of this metadata/persistence pipeline.
11. Vendored runtime dependencies
source/modules and source/includes bundle major third-party libraries and SDK headers Carla depends on: DPF/Distrho, dgl UI toolkit, Lilv/LV2 stack, RtAudio, RtMidi, zita-resampler, water/JUCE-like utilities, Ableton Link, Asio, and plugin SDK headers for LADSPA/DSSI/LV2/CLAP/Vestige. These dependencies are integral to the architecture because they enable cross-format hosting, audio I/O, GUI rendering, and transport sync.
12. User interface rendering stack
Carla’s custom UI stack is built around the dgl module and canvas/widget code in the frontend. Resource files in resources/ and .ui definitions in resources/ui are compiled into platform-specific GUI assets. The UI layer is therefore a mix of generated Qt forms, custom canvas widgets, and shared cross-platform rendering primitives.
13. Cross-platform deployment and platform-specific adapters
The repo has explicit support for Linux, macOS, Windows, and Haiku packaging under data/, with platform launchers, plist/desktop files, Windows unzip/bootstrap logic, and build scripts. Runtime adapter code in source/utils, source/backend/engine, and source/modules/dgl handles differences in audio drivers, windowing systems, and process launching.
14. Build, CI, and release structure
Build orchestration is split across Makefiles, CMake, and CI workflows. The .github/workflows and .travis* files show a matrix over platforms and packaging targets. This matters architecturally because the repo is assembled into many binaries and plugin artifacts rather than one monolith, and the release process is part of the product design.
Main entry points: C++ GUI core · backend Host API · plugin Plugin core · frontend Host apps
Components 23
Frontend
User-facing hosts, control apps, dialogs, widgets, and shared GUI code.
- Host apps · Standalone UI entrypoints and front doors for Carla host, rack, patchbay, settings, database, and control modes.
source/frontend - GUI core · Shared C++/Python frontend logic, host/control glue, settings, skinning, and widget composition.
source/frontend/C++ - Canvas UI · Custom patchbay canvas, widgets, and interactive editor/rendering primitives.
source/frontend/patchcanvas - Dialogs · Dialogs for plugin listing, JACK app setup, about boxes, and parameter/settings editing.
source/frontend/dialogs
Backend
Core host state, engine scheduling, plugin lifecycle, and runtime I/O.
- Host API · Public host/backend interfaces and stand-alone host wiring used by frontends and runtime targets.
source/backend - Engine core · Real-time engine graph, ports, runner, data flow, and scheduling boundary.
source/backend/engine - Runtime engines · Concrete engine backends for JACK, native, SDL, RtAudio, OSC, dummy, bridge, and internal modes.
source/backend/engine - REST API · HTTP service and REST frontend for controlling host state and sessions remotely.
source/rest - Discovery · Plugin scanning, discovery, cached indexing, and metadata extraction utilities.
source/discovery - Utils · Cross-cutting process, IPC, ring buffer, state, platform, and plugin helper utilities.
source/utils
Adapters
Plugin-format wrappers, bridges, discovery, and out-of-process helpers.
- Plugin core · Internal plugin model and format-specific adapters that normalize external plugins into Carla's host model.
source/backend/plugin - Formats · Support for LADSPA, DSSI, LV2, VST2, VST3, CLAP, AU, JSFX, SFZero, FluidSynth, and native plugins.
source/plugin - Plugin bridge · Out-of-process plugin execution and bridge helpers for crash isolation and compatibility.
source/bridges-plugin - UI bridge · External UI and toolkit bridge layer for proxying plugin UIs across process boundaries.
source/bridges-ui - Jack bridge · JACK bridging implementation used to integrate host and bridged plugin/client behavior.
source/jackbridge - Built-ins · Bundled Carla plugins such as audio gain, bypass, MIDI utilities, note tools, XY controller, and panner.
source/native-plugins
Modules
Vendored libraries and SDKs that provide audio, MIDI, GUI, network, and metadata primitives.
- DGL · Custom cross-platform widget and OpenGL/NanoVG UI toolkit used by Carla's frontend and plugin UIs.
source/modules/dgl - Lilv stack · Vendored LV2 ecosystem libraries for RDF, metadata, and plugin state handling.
source/modules/lilv - Audio libs · Vendored audio/MIDI runtime libraries including RtAudio, RtMidi, resampler, mempool, decoder, and SFZero/YSFX support.
source/modules - GUI deps · Bundled DPF/Distrho, Water, Hylia/Link, and related SDK or utility dependencies.
source/modules
Deployment
Packaging, launch scripts, resources, and platform-specific distribution assets.
- Deploy · Desktop files, launch scripts, plist resources, icons, bundles, and platform packaging assets.
data - Resources · Compiled UI forms, icons, bitmaps, themes, and other generated or packaged interface assets.
resources - Build/CI · Makefiles, CMake, GitHub Actions, Travis scripts, and release automation for many targets.
.github
Connections 27
- Host apps → GUI core: uses · Entry points assemble shared frontend logic and host control surfaces.
- GUI core → Canvas UI: renders · Shared frontend logic builds patchbay and editor canvas views.
- GUI core → Dialogs: opens · GUI core opens plugin, settings, and host configuration dialogs.
- Host apps → Host API: calls · UI entrypoints drive host/backend operations through the host API.
- Host API → Engine core: configures · Host API constructs and controls the real-time engine core.
- Engine core → Runtime engines: runs on · Core scheduling executes through concrete runtime engine backends.
- Engine core → Plugin core: hosts · The engine instantiates plugins through the plugin model layer.
- Plugin core → Formats: adapts · Format adapters normalize third-party and native plugin formats into one model.
- Plugin core → Plugin bridge: bridges · Bridge-capable plugins can be proxied into separate processes.
- Plugin bridge → UI bridge: pairs with · Out-of-process plugin execution is coordinated with external UI bridges.
- Plugin bridge → Jack bridge: leverages · Bridge execution uses JACK-specific compatibility and proxy machinery.
- Host API → REST API: exposes · Host state and control operations are also exposed through REST.
- Host API → Discovery: indexes · Backend utilities feed plugin discovery and cached metadata generation.
- Discovery → Utils: depends on · Discovery and caching build on common utility and IPC helpers.
- Plugin core → Built-ins: bundles · Carla's built-in plugin set is packaged alongside the host model.
- GUI core → Utils: uses · Frontends share state, process, and UI helpers from the utility layer.
- GUI core → Resources: loads · GUI code consumes compiled forms, icons, and theme assets.
- Canvas UI → DGL: built on · Custom canvas and widgets sit on top of the DGL rendering toolkit.
- GUI core → DGL: built on · Shared UI code relies on the custom cross-platform widget toolkit.
- Host API → Audio libs: uses · Host/runtime code uses audio I/O, resampling, MIDI, and decoding libraries.
- Plugin core → Lilv stack: uses · LV2 metadata and RDF handling are backed by the Lilv stack.
- GUI core → GUI deps: uses · Frontend and plugin UI code depend on bundled GUI/support libraries.
- Deploy → Host apps: launches · Deployment scripts and desktop/plist entries start the various app front doors.
- Deploy → Built-ins: packages · Packaging includes native plugin bundles and related assets.
- Build/CI → Deploy: packages · Build and release automation assemble platform-specific deployment artifacts.
- Build/CI → Lilv stack: builds · CI and build scripts compile bundled third-party dependencies.
- Build/CI → Host apps: builds · The build matrix produces the many frontend and standalone binaries.