4d0ad127b5
Move ES-5 encoding from the CLAP plugin to a standalone PipeWire daemon (es5d) communicating via POSIX shared memory. The plugin now acts as a parameter/state frontend while es5d outputs directly to the ES-9. Includes systemd user service for autostart after reboot and an install script for local deployment.
24 lines
623 B
C++
24 lines
623 B
C++
// Shared memory layout between CLAP plugin and ES-5 daemon
|
||
// Copyright (c) 2026 Sub-Net e.U. — MIT License
|
||
|
||
#pragma once
|
||
|
||
#include <cstdint>
|
||
#include <atomic>
|
||
|
||
#define ES5_SHM_NAME "/es5_state"
|
||
#define ES5_NUM_HEADERS 6
|
||
#define ES5_CHANNELS_PER_HEADER 8
|
||
|
||
struct ES5SharedState {
|
||
// Header types: 0=off, 1=GT, 2=CV
|
||
std::atomic<uint8_t> header_types[ES5_NUM_HEADERS];
|
||
|
||
// Gate/CV values per header per channel
|
||
// GT: >0.5 = on, CV: 0.0–1.0 maps to full DAC range
|
||
std::atomic<float> values[ES5_NUM_HEADERS][ES5_CHANNELS_PER_HEADER];
|
||
|
||
// Flag: plugin is active
|
||
std::atomic<uint8_t> active;
|
||
};
|