| 1 | # Clover Control |
| 2 | |
| 3 | This is a set of tools to let additional hardware devices integrate with |
| 4 | creative applications on a Mac device. Additionally, this repo contains a lot of |
| 5 | my own tools and scripts I use in the Music/Video creative processes. |
| 6 | |
| 7 | In addition to the primary keybinding system and personal software |
| 8 | configurations, this project can be used as a library to use the control |
| 9 | primitives directly (either to build your own hardware integrations, or to |
| 10 | control the software). This can be done by installing this repo as a `pnpm` git |
| 11 | dependency in your project. |
| 12 | |
| 13 | **NOTE**: These tools only work on macOS. I don't have interest in maintaining |
| 14 | other configurations. |
| 15 | |
| 16 | ## Hardware |
| 17 | |
| 18 | ### DaVinci Resolve Speed Editor |
| 19 | |
| 20 | A $200 dual-hardware system. |
| 21 | |
| 22 | ### DaVinci Resolve Speed Editor |
| 23 | |
| 24 | A $300 bundle containing Fusion Studio and the control surface, it's a great |
| 25 | deal. There is a large, high resolution knob, as well as many keys with some |
| 26 | having lights. This repo includes an SDK to reprogram it to be useful in any |
| 27 | program. **Note**: It is unused as of 2026-06-24. |
| 28 | |
| 29 |  |
| 30 | |
| 31 | ## Software |
| 32 | |
| 33 | TODO: |
| 34 | |
| 35 | - Fusion |
| 36 | - Blender? |
| 37 | - Krita? |
| 38 | - The Finder |
| 39 | - QuickTime player |
| 40 | |
| 41 | ### macOS (`Mac.ts`) |
| 42 | |
| 43 | Bind to the Mac desktop interface. |
| 44 | |
| 45 | ```ts |
| 46 | const mac = await Mac.open(); |
| 47 | |
| 48 | mac.on("app-change", (bundle) => { |
| 49 | console.info("Current App: " + bundle); |
| 50 | }); |
| 51 | ``` |
| 52 | |
| 53 | ### REAPER |
| 54 | |
| 55 | With the help of an OSC extension, REAPER can be controlled with TypeScript. |
| 56 | |
| 57 | ```ts |
| 58 | import { Reaper } from "@clo/clover-control/Reaper"; |
| 59 | |
| 60 | const reaper = new Reaper(); |
| 61 | reaper.on("transport", (transport) => { |
| 62 | console.info( |
| 63 | transport.recording |
| 64 | ? "You are recording" |
| 65 | : transport.playing |
| 66 | ? "Playing" |
| 67 | : "Stopped", |
| 68 | ); |
| 69 | }); |
| 70 | ``` |
| 71 | |
| 72 | Setup: |
| 73 | |
| 74 | - Start up Clover Control / `new Reaper()` |
| 75 | - Navigate to REAPER Settings (`Cmd+,`) |
| 76 | - Click `Control/OSC/web` on the left side panel |
| 77 | - Press `Add` |
| 78 | - Control surface mode: `OSC (Open Sound Control)` |
| 79 | - Device name: `Clover Automation` |
| 80 | - Pattern config: `CloverAutomation` |
| 81 | - Mode: `Configure device IP+local port` |
| 82 | - Device port: `58001` |
| 83 | - Device IP: `127.0.0.1` |
| 84 | - Local listen port: `58000` |
| 85 | - Local IP: (default) |
| 86 | - Allow binding messages to REAPER actions and FX learn |
| 87 | |
| 88 | ## Config Format |
| 89 | |
| 90 | The main entrypoint loads config files from `./config`, which each apply to one |
| 91 | application. In this example, it configures Reaper to integrate with the Speed |
| 92 | Editor. The provided instance of hardware devices are wrapper objects that apply |
| 93 | the binds only when the program is active. This way, there aren't situations |
| 94 | with multiple readers conflicting. |
| 95 | |
| 96 | ```ts |
| 97 | import * as config from "#config"; |
| 98 | import { Reaper } from "@clo/clover-control/Reaper"; |
| 99 | |
| 100 | export default config.forApp("com.cockos.reaper", ({ speededitor, mac }) => { |
| 101 | const reaper = new Reaper(); |
| 102 | |
| 103 | // Sync state to LEDs |
| 104 | reaper.on("transport", (transport) => { |
| 105 | speededitor.leds.audioOnly = transport.recording; |
| 106 | }); |
| 107 | |
| 108 | // Keyboard Actions |
| 109 | speededitor.onPress("stopPlay", () => { |
| 110 | reaper.runAction("transport-play-stop"); |
| 111 | }); |
| 112 | speededitor.onPress("audioOnly", () => { |
| 113 | reaper.runAction("transport-record"); |
| 114 | }); |
| 115 | }); |
| 116 | ``` |