Skip to content

Latest commit

 

History

History
67 lines (51 loc) · 3.7 KB

File metadata and controls

67 lines (51 loc) · 3.7 KB

Methcla

A real-time C++ audio engine library for macOS and Linux desktop targets. Exposes a C API with C++ bindings for embedding in host applications.

Language

Engine: The core audio processing runtime. Instantiated by a host application, runs an audio thread, manages Synths on AudioBuses, and loads Plugins. Avoid: audio server, sound engine, runtime

Driver: A platform-specific audio I/O backend that feeds samples to and from the Engine. RtAudio is the desktop Driver; DummyDriver is used for headless or offline use. Avoid: audio backend, audio device

Plugin: A shared library (.so/.dylib) that registers one or more SynthDefs with the Engine at load time. Loaded either dynamically from a directory or registered statically via function pointer. Avoid: extension, module (conflicts with CMake MODULE library type)

SynthDef: A synthesizer definition registered by a Plugin. Describes the processing graph and parameters for one unit of audio computation. Avoid: instrument, unit generator, UGen

Synth: A running instance of a SynthDef inside the Engine, allocated on an AudioBus. Avoid: voice, instance, node (overloaded with the Node base class)

AudioBus: A multi-channel buffer used for audio routing between Synths inside the Engine. Avoid: channel, buffer, bus (acceptable shorthand in code)

Soundfile API: A Plugin category that provides file I/O capabilities to other Plugins (disksampler, sampler). Multiple soundfile API Plugins may be registered; the Engine selects by capability. Platform implementations: ExtAudioFile (macOS), libsndfile (Linux). Avoid: audio file backend, file reader

Project structure

Path Contents
include/methcla/ Public C API headers (.h) and C++ bindings (.hpp)
src/ Engine implementation (Methcla/Audio/, Methcla/Memory/, Methcla/Plugin/)
plugins/ Built-in Plugin implementations (sine, disksampler, sampler, patch-cable, node-control, soundfile APIs)
platform/ Driver implementations: DummyPlatform.cpp, rtaudio/, jack/
tests/ Test suite (googletest); tests/consumers/ for add_subdirectory and find_package integration tests
tools/dumposcfile/ Developer tool: dumps binary OSC files to stdout
external_libraries/ Vendored dependencies (tlsf, tinydir, Boost subset)
cmake/ CMake helpers: dependencies.cmake, methclaConfig.cmake
scripts/ release.py (version bump + changelog + tag), copy-boost.sh (re-vendor Boost subset)
docs/ osc-api.md, architecture.md, coding-style.md, adr/
examples/ Sample applications (thADDeus, sampler)

Build system

CMake 3.24+, C++17, C99. Presets: debug and release (CMakePresets.json).

Dependencies

All declared in cmake/dependencies.cmake via FetchContent, included before any add_subdirectory.

Dependency Kind How
oscpp header-only OSC library; part of the public API FetchContent (pinned git SHA); provides oscpp::oscpp target
googletest v1.14 test-only FetchContent
tlsf two-level segregated-fit allocator; merged directly into libmethcla vendored in external_libraries/tlsf/; CMake OBJECT library
tinydir header-only directory listing vendored in external_libraries/tinydir/; CMake INTERFACE library
Boost (lockfree, heap, container_hash, smart_ptr) header-only subset; namespaced as methcla_boost vendored in external_libraries/boost/; re-extracted with scripts/copy-boost.sh <version>
RtAudio optional desktop audio Driver system package via pkg-config (-DMETHCLA_ENABLE_RTAUDIO=ON)
libsndfile Soundfile API Plugin on Linux system package via pkg-config