Repository navigation
Releases
Releases · TeamAudio/reasock
ReaSock 0.4.0
- Protocol 0.5.0: actions can have an on/off state. Register with
toggle: trueand set it withaction.setState; REAPER shows it as a checkmark in menus and a lit toolbar button. In@techaudio/reasock,registerAction(…, { toggle: true })andsetActionState(), restored after a reconnect. takes.setcan point a take at a moved or renamed file (path), keeping its offset, rate, and length, as an undo point.items.insertcan place files at the play position (position: "play").- Fixed:
items.inserthanded new sources to takes throughSetMediaItemTake_Source, which REAPER asks extensions not to use, since it may duplicate the source. - The MCP example can place media files (
reaper_insert_media).
ReaSock 0.3.0
- Protocol 0.4.0: ReaSock can now change the project, so a sound library or media browser can place sounds in REAPER.
items.insertplaces media files, or parts of them, at the edit cursor or a given time: on the current track, a given one, or a new one; one after another, each on its own track, or as takes of one item. Each file can bring a take name, item notes, and extension data. Every file is checked first, so a request with a bad file changes nothing, and the error says which file and why.items.setandtakes.setchange item notes, take names, and extension data (per-item and per-take strings saved in the project), in batches.- Every change is one undo point, named after the client unless it passes its own name.
- Peaks for inserted files are built a little at a time, so long files don't stall REAPER.
items.list,items.listSelected, anditems.getcan include item notes and extension data;takes.listcan include extension data.- Items now report their active take (
takeGuid,startOffset,playRate) and whether they loop their source, so a client can work out which part of a file an item plays. Slip edits now count as changes initems.selectionChanged. transport.getandtransport.changedinclude the edit cursor and the time selection.initializelists the methods the server supports (capabilities.methods), so clients can tell what an older ReaSock lacks.debug.statsreports main-thread time per method.@techaudio/reasock:createClient()returns a client right away and connects when REAPER starts, for apps that start before REAPER. Actions and subscriptions set up meanwhile wait for the connection. Calls fail at once withNotConnectedErrorwhile disconnected, and a REAPER that doesn't answer in time givesTimeoutError, so apps can tell "not running" from "busy".supports()says whether the connected ReaSock has a method,RpcErrorcarries the error'sdata, and thesignaloption stops a client.- Examples:
place.mjsplaces media files at the edit cursor.
ReaSock 0.2.1
@techaudio/reasock: a refusedconnect()(a wrong token, say) closes its connection, so a Node script exits instead of hanging. And an action or subscription REAPER refused is no longer retried on every reconnect, where it failed each time and stopped the client from ever reconnecting.
ReaSock 0.2.0
- Security: WebSocket clients must send the
tokenfrom REAPER's instance file (~/.reasock/instances/<pid>.json) ininitialize(protocol 0.3.0). The token is random each time REAPER starts, and on macOS and Linux the instance file and its folders are now readable only by your user, so other users on the machine and web pages can't connect. Scripts inside REAPER need no token. - Examples: Python (a hotkey to copy selected items' file paths, a selection follower), an MCP server for AI agents, shell helpers with websocat, a browser dashboard, and a ReaImGui inspector panel, which also ships in the ReaPack package.
@techaudio/reasockon npm: a typed TypeScript client (every method, param, result, and event typed from the OpenRPC description), with reconnect that restores actions and subscriptions after REAPER restarts, and a browser build.
ReaSock 0.1.1
- Security: refuse WebSocket connections from web pages unless their origin is listed in
allowedOriginsin~/.reasock/config.json. Browsers don't apply cross-origin rules to WebSockets, so in 0.1.0 any website open while REAPER was running could connect to ReaSock and run REAPER actions. Native clients (Node, Python, Electron main processes) are unaffected.
ReaSock 0.1.0
- First release: a WebSocket and ReaScript bridge between REAPER and other programs, with actions clients can register (Lend), state-change events (Tell), queries for tracks, items, takes, and markers (Ask), and a bundled API reference.