New files:
- MixerApi.hpp/cpp: Model-level API bridging WebSocket messages to
MixerEngine control (channel volume/pan/mute/solo/hpf, bus control,
routing, state queries)
- 15 new WebSocket message handlers in PiPedalSocket.cpp for full
mixer control surface
Integration:
- MixerEngine member added to PiPedalModel with Get/Set accessors
- SetMixerEngine propagates to AudioHost rt processing pipeline
- Socket handler auto-wires MixerEngine to MixerApi on connect
Messages implemented:
mixerSetChannelVolume, mixerSetChannelPan, mixerSetChannelMute,
mixerSetChannelSolo, mixerSetChannelLabel, mixerSetChannelHpf,
mixerGetState, mixerAddChannel, mixerRemoveChannel,
mixerSetBusVolume, mixerSetBusMute, mixerAddBus, mixerRemoveBus,
mixerRouteChannelToBus
When SetMixerEngine() is called with a MixerEngine instance, the
audio processing thread routes all device input/output channels
through the mixer (channel strips → buses → master) instead of
the legacy Lv2Pedalboard. Falls back when no mixer engine is set.
- Thread-safe via mutex + realtime raw pointer swap (same pattern
as existing SetPedalboard)
- Preserves existing pedalboard processing — both modes coexist
- New ProcessLv2Pedalboard() path when realtimeActiveMixerEngine
is non-null uses device buffers directly for multi-channel I/O
MixerEngine architecture:
- MixerChannelStrip: per-input FX chain (Lv2Pedalboard reuse),
volume, pan, mute, solo, HPF, aux sends, VU metering
- MixerBus: accumulation bus with volume, mute, VU. Supports
master, subgroup, aux, and FX-return bus types
- MixerEngine: orchestrator managing channel→bus routing graph,
bus→bus routing, solo override, and the full real-time audio
processing cycle
All new code compiles cleanly with the existing C++20 build and
follows the existing PiPedal codebase conventions (namespaces,
error handling, buffer patterns). CPU-efficient real-time thread
processing with atomic control surface interaction.
Reset midiEventMemoryIndex in AlsaDriver.cpp when starting MIDI processing and when clearing midiEventCount to avoid stale index/state issues while using expression pedals.
- Add missing <unistd.h> include in AlsaDriverTest.cpp for sleep().
- Link Catch2::Catch2WithMain alongside Catch2::Catch2 for pipedaltest
and jsonTest test targets. Catch2 v3 requires this for CATCH_CONFIG_MAIN
to provide the main() entry point.
GCC 16 on Arch Linux no longer implicitly includes certain standard
headers. This causes 'not declared' errors for POSIX functions.
- PiPedalCommon/src/CMakeLists.txt: Link asound library for ALSA sequencer
- DBusDispatcher.cpp: Add <unistd.h> for read()/write()/close()
- AuxInTest.cpp: Add <unistd.h> for sleep()
- kconfigMain.cpp: Add <unistd.h> for getuid()
- ModFileTypes.cpp: Add <mutex> for std::mutex/std::lock_guard
Replace dpkg --print-architecture (Debian-specific) with a portable
cmake-based approach using CMAKE_SYSTEM_PROCESSOR mapped to Debian
architecture names (x86_64→amd64, aarch64→arm64, armv7l→armhf, i686→i386).