# es5-clap Native [CLAP](https://cleveraudio.org/) plugin for encoding gate and CV data for the [Expert Sleepers ES-5](https://www.expert-sleepers.co.uk/es5.html) module via the [ES-9](https://www.expert-sleepers.co.uk/es9.html) ADAT output. Replaces Silent Way's ES-5 Controller for DAWs with CLAP support (Bitwig, REAPER, etc.). ## Supported Hardware - **ES-5 mk3** — 6 expansion headers, encoded via stereo ADAT pair - **ESX-8GT** — 8 gate outputs per header (accent/velocity via PWM planned) - **ESX-8CV** — 8 CV outputs per header (12-bit DAC, ±10V range) ## Building ```bash cmake -B build -DCMAKE_BUILD_TYPE=Release cmake --build build -j$(nproc) ``` ## Installation Copy the built plugin to your CLAP plugin directory: ```bash # Linux cp build/es5-clap.clap ~/.clap/ # macOS cp -r build/es5-clap.clap ~/Library/Audio/Plug-Ins/CLAP/ ``` ## Usage in Bitwig 1. Add **ES-5 Encoder** as an audio effect on a track 2. Route the track's audio output to the ES-9 ADAT channel pair feeding your ES-5 (default: ADAT channels 7/8, configurable via jumper on the ES-5 PCB) 3. Set each header's type to match your connected expander (GT or CV) 4. Automate the gate/CV parameters from Bitwig's modulation system ### Parameter Layout | Parameter | ID | Range | Description | |---|---|---|---| | Header N Type | 1–6 | Off / GT / CV | Expander type on each header | | HN Ch1–8 | N01–N08 | 0.0–1.0 | Gate (>0.5 = on) or CV value | ## Encoder Protocol Based on the [MIT-licensed Pure Data externals](https://github.com/expertsleepersltd/externals) by Expert Sleepers Ltd. The ES-5 receives a stereo audio stream where each 24-bit sample packs 3 bytes (L = headers 1–3, R = headers 4–6). Each byte drives one expansion header: - **ESX-8GT**: each bit = one gate output (8 gates per byte) - **ESX-8CV**: 12-bit values serialized via a 3-state, 64-phase protocol ## License MIT — see [LICENSE](LICENSE). Encoder logic derived from Expert Sleepers Ltd MIT-licensed source code.