Commit Graph

415 Commits

Author SHA1 Message Date
shawn 8068f5d168 Mixer engine: output routing, full state restore, MIDI learn API, PipeWire multi-channel support 2026-06-20 16:20:30 -04:00
shawn 01584f50da Initialize MixerEngine on startup (BB-6)
Add MixerEngine creation and wiring after model.Load() in main.cpp.
The mixer engine now gets created with current audio settings (sample rate,
buffer size from JackServerSettings), activated, and attached to the model.
This enables WebSocket mixer commands (mixerGetState, mixerAddChannel,
mixerAddBus, etc.) to work through /pipedal endpoint.

Missing initialization was the root cause of 'Invalid format' errors when
sending mixer commands via WebSocket.
2026-06-20 16:15:12 -04:00
shawn 5fd5946ff6 P4: MIDI control surface mapping — faders/buttons over USB MIDI
C++ backend (fully implemented):
- MidiMapper: CC processing, mapping table, JSON persistence, learn mode
- MidiLearnMode: 3-step learn workflow state machine
- MixerEngine::processMidiEvent() wired into AudioHost MIDI pipeline
- MixerApi + PiPedalSocket: all WS handlers (getMidiMappings,
  setMidiLearnMode, setMidiLearnTarget, commitMidiLearn, etc.)

React frontend (new):
- MidiMappingPanel: dialog with learn mode toggle, CC capture polling,
  commit workflow, current mappings list with delete, manual add
- MixerPage: MIDI button in toolbar, learn mode state management
- ChannelStrip + MasterBus: learn mode callbacks on fader/mute/solo touch
2026-06-20 16:14:12 -04:00
shawn 3d00299051 feat: add PipeWire multi-channel audio driver (full-duplex N channel)
- PipeWireDriver.hpp/cpp: new AudioDriver implementation using pw_filter API
- Full-duplex I/O via pw_filter (capture + playback in one RT callback)
- Dynamic channel count support (tested: 1-8 channels, extensible beyond)
- Uses SPA_AUDIO_FORMAT_F32 for zero-copy-compatible float processing
- Channel position mapping: MONO, stereo, 5.1, 7.1, plus Aux for N>8
- Follows the same buffer management pattern as AlsaDriverImpl
- Channel routing: main/aux input/output mapping with mix ops
- CLI flag: --driver pipewire|alsa (default: alsa)
- AudioHost: conditional driver selection based on driverType_
- PiPedalModel: stores and passes driver type to AudioHost
- CMakeLists.txt: added PipeWireDriver source files
2026-06-20 16:03:16 -04:00
shawn 0a76f5734f Add scene save/load WS messages to MixerApi
- Implement saveScene: captures full mixer state via getStateJson(),
  stores in ~/op-pedal/default_config/scenes.json with auto-incrementing ID
- Implement loadScene: manual JSON walk to restore channel/bus state
  from saved scene JSON, routes skipped for safety
- Implement listScenes: returns JSON array of {id, name}
- Implement deleteScene: remove by ID from scenes file
- Add WS handlers: mixerSaveScene, mixerLoadScene, mixerGetScenes
  registered in PiPedalSocket.cpp message dispatcher
- Uses project's JSON_MAP/raw_json_string for file persistence
- Compiles cleanly against existing build
2026-06-20 15:54:42 -04:00
shawn 1854d03c58 feat: add WebsSocket API for mixer engine control
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
2026-06-20 14:15:37 -04:00
shawn 0422c91b4e feat: integrate MixerEngine into AudioHost real-time audio pipeline
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
2026-06-20 14:06:46 -04:00
shawn df5a317ceb feat: add MixerEngine core — ChannelStrip, MixerBus, and MixerEngine for band-in-a-box digital mixer
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.
2026-06-20 13:57:15 -04:00
shawn c028ad8cd6 fix: Rebrand systemd templates, polkit rules, and install scripts
CMake / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
- src/templates/pipedald.service.template — user/group pipedal_d → oppedal_d
- src/templates/pipedaladmind.service.template — WorkingDirectory /var/pipedal → /var/oppedal
- src/templates/pipedal_nm_p2pd.service.template — Description and WorkingDirectory
- src/templates/pipedal_p2pd.service.template — Description and WorkingDirectory
- src/templates/pipedal_p2pd.conf.template — p2p_model_name, manufacturer
- src/templates/jack.service.template — After=pipedald → After=oppedald
- src/templates/*.conf — PiPedal/pipedal-* → OP-Pedal/oppedal-* references
- src/polkit-1/rules/10-pipedal-networkmanager.rules — group pipedal_d → oppedal_d
- install.sh — pipedalconfig/oppedalconfig binary paths
- uninstall.sh — /etc/pipedal, /var/pipedal → /etc/oppedal, /var/oppedal
- run.sh — pipedald → oppedald, /etc/pipedal → /etc/oppedal
2026-06-20 12:02:39 -04:00
shawn acfb8d15ab fix: Rebrand project from PiPedal to OP-Pedal
CMake / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
Updated branding across the project:
- CMakeLists.txt: project name, description, homepage, display version
- src/PiPedalVersion.cpp: server name string
- debian/control: package name, source, homepage, description
- vite/package.json: package name
- vite/index.html: title, meta description
- vite/public/manifest.json: name, short_name, description, URLs
- UI files: AboutDialog, AppThemed, MainPage, SettingsDialog,
  UpdateDialog, WifiConfigDialog, WifiConfigSettings,
  WifiDirectConfigSettings, Tone3000Downloader, Tone3000HelpDialog,
  WindowScale

Preserved upstream copyright/attribution and legal references.
2026-06-20 11:04:28 -04:00
Robin E.R. Davies e5fd55d505 Build fixes, promot Arch Linux build to alpha status. 2026-06-17 12:24:06 -04:00
Robin E.R. Davies d6ee400394 Must not install .so's from build dependencies. We should be using .a files instead. 2026-06-17 12:12:46 -04:00
Robin E. R. Davies f6bff2a682 Merge branch 'dev' of https://github.com/rerdavies/pipedal into dev 2026-06-17 10:36:05 -04:00
Robin E. R. Davies 859500a8ac Fix Catch2 build break on Debian 12 2026-06-17 10:35:57 -04:00
Robin Davies 56be988646 Merge pull request #511 from onirob/fix-alsa-midi-freeze
Fix MIDI input freeze under continuous CC input
2026-06-17 09:36:11 -04:00
Roberto Figliè 2703bfc221 Fix for midi freeze
Reset midiEventMemoryIndex in AlsaDriver.cpp when starting MIDI processing and when clearing midiEventCount to avoid stale index/state issues while using expression pedals.
2026-06-17 12:01:26 +02:00
FoolHen 5eebe29326 Fix test build failures on Arch with Catch2 v3 and GCC 16
- 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.
2026-06-10 17:09:25 +02:00
FoolHen b322366077 Create netdev group in pipedalconfig 2026-06-10 16:29:18 +02:00
Robin E.R. Davies 89f2c2798e Move options to start of CMakeFile. Rename to PIPEDAL_DISABLE_COPYRIGHT_BUILD to minimize potential package comflicts. 2026-06-08 18:42:23 -04:00
FoolHen 9f20457f21 Add missing includes and link dependencies for GCC 16
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
2026-06-08 13:14:34 +02:00
FoolHen 03b8f52fa9 Fix architecture detection for non-Debian distros
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).
2026-06-08 13:14:34 +02:00
Robin Davies 5cfd2e9e5f Merge pull request #495 from FoolHen/snapshot-next-prev-midi
Add snapshot next/prev MIDI bindings
2026-06-07 21:47:50 -04:00
Robin E.R. Davies b009d8824a Default Bank IR volume correction 2026-06-04 13:46:11 -04:00
FoolHen 00952dad3a Add snapshot next/prev MIDI bindings 2026-06-03 21:21:43 +02:00
Robin E.R. Davies a3e3bd4ad3 Last dribble of copyright updates. 2026-06-02 14:10:57 -04:00
Robin E.R. Davies 4358866265 Copyright scrub 2026-06-02 13:18:02 -04:00
Robin E.R. Davies 05bd32ad38 Big Fat Copyright Cleanup 2026-06-02 12:59:41 -04:00
Robin Davies faea240e3a Merge pull request #487 from FoolHen/port-param-fix
Fix pipedald port parameter
2026-06-01 15:35:41 -04:00
Robin E.R. Davies 618e403331 Handle both old and new T3k thumbnail urs. 2026-06-01 15:21:33 -04:00
Robin E.R. Davies 2f10bfcba2 Tone3000 API fix for [::1] address. 2026-06-01 14:44:04 -04:00
FoolHen 5b77144d91 fix: fix pipedald port parameter 2026-05-31 15:54:36 +02:00
Robin E.R. Davies 779f3c80ad Factory Prest Assets 2026-05-31 02:46:12 -04:00
Robin E.R. Davies 68d195f9fb Default Bank/Factory Preset install 2026-05-31 02:45:50 -04:00
Robin E.R. Davies c7f003ec92 V3 FactoryPresets 2026-05-30 22:38:59 -04:00
Robin E.R. Davies 9bc348bc9e Add REMOVE button to Snapshot Edit dialog. 2026-05-30 22:37:31 -04:00
Robin E.R. Davies 533e313b40 "Cancelled" to US spelling. 2026-05-30 01:03:29 -04:00
Robin E.R. Davies 448e373841 Model/IR Select dialog for large downloads 2026-05-30 00:46:45 -04:00
Robin E.R. Davies 726b0d268e Protection against invalid Channel Router settings. 2026-05-25 21:43:19 -04:00
Robin E.R. Davies 0ff96636ed Subscription Mutex Deadlock 2026-05-23 18:48:49 -04:00
Robin E.R. Davies d19a062c5d Merge branch 'dev' of https://github.com/rerdavies/pipedal into dev 2026-05-20 09:32:10 -04:00
Robin E.R. Davies 5ee86c519f A2 UI 2026-05-20 09:30:55 -04:00
Robin E. R. Davies 6574304227 NAM Performance profiling (sync) 2026-05-16 06:26:53 -04:00
Robin E.R. Davies 7343ced278 NAM A2 Calibration 2026-05-13 11:22:42 -04:00
Robin E.R. Davies c456e5187b NAM A2 Sync 2026-05-12 12:31:21 -04:00
Robin E.R. Davies 44db94a955 Sync 2026-05-06 14:37:17 -04:00
Robin E. R. Davies 3704d45f5c Allow profiling with stereo channels 2026-04-21 08:14:31 -04:00
Robin E.R. Davies 8ade50a3ac Resurrect pipedalProfilePlugin, and amd64 benchmarks. 2026-04-21 00:36:13 -04:00
Robin E. R. Davies 705fc9d67e Merge branch 'dev_tone3000' of https://github.com/rerdavies/pipedal into dev 2026-04-20 00:22:58 -04:00
Robin E. R. Davies fdee3fa231 v2.0.100 Release 2026-04-20 00:16:25 -04:00
Robin E.R. Davies 9827152037 TooBAmp 1.2.76 x64 2026-04-19 20:51:46 -04:00