Getting a Looperman loop into REAPER

There is no Looperman plugin for REAPER, and there cannot honestly be one that talks to the site directly. ReaScript's Lua ships no HTTP client and no HTML parser. The workable shape is a local server that does the fetching, plus a short script that asks it for a file and inserts the result. That is what LoopHaven is for — the DAW side stays three lines of reaper.ExecProcess.

LoopHaven 0.2.0 · the ReaScript below is provided as a starting point, not as a tested add-on

Why the DAW cannot do this itself

What the task needsReaScript Lua has
HTTP request with cookiesNothing built in
Scrape a filter formNothing built in
Run a processreaper.ExecProcess
Place a file on a trackreaper.InsertMedia

Two of four is enough if you stop trying to make the DAW smart. The split that works: the local API knows the site, the script knows the project.

Step 1 — run the local API

pip install "loophaven[mcp]"
python -m uvicorn loophaven.api.app:app --host 127.0.0.1 --port 8000

# the file you want, chosen once, outside the DAW
curl "http://127.0.0.1:8000/api/download/info/loop/436799"

Keep the port on loopback. The server has no authentication, by design: it is a personal local service, not something to expose on a network.

Step 2 — a ReaScript that pulls one file

Save as loophaven_fetch.lua in your REAPER Scripts folder, then run it from the Actions window. It downloads into a Media subfolder beside the project and inserts the file at the edit cursor.

-- loophaven_fetch.lua — starting point, not a tested add-on
-- Requires: the LoopHaven API running on 127.0.0.1:8000

local API   = "http://127.0.0.1:8000"
local ID    = "436799"          -- change, or prompt with reaper.GetUserInputs
local KIND  = "loop"            -- "loop" or "acapella"
local FORMAT = "mp3"            -- "mp3" = free preview, "wav" = needs a session

local _, proj = reaper.EnumProjects(-1, "")
local dir = proj ~= "" and proj:match("^(.*)[/\\]") or reaper.GetResourcePath()
local media = dir .. "/Media"
reaper.RecursiveCreateDirectory(media, 0)

local url  = API .. "/api/download/audio/" .. KIND .. "/" .. ID
local dest = media .. "/loophaven_" .. KIND .. "_" .. ID .. "." .. FORMAT

-- -s -L -f: quiet, follow redirects, fail on HTTP error instead of saving a page
local cmd = string.format(
  'curl -s -L -f -o "%s" "%s"', dest:gsub('"', ''), url)

local ok = reaper.ExecProcess(cmd, 60000)
if not ok or ok ~= 0 then
  reaper.ShowMessageBox(
    "Fetch failed. Check that the API is running and that the session is open.",
    "LoopHaven", 0)
  return
end

reaper.InsertMedia(dest, 0)
reaper.UpdateArrange()

Read this before relying on it. This snippet is a documented starting point, not a shipped feature — it has not been tested across REAPER versions or platforms. ExecProcess needs curl on PATH, which is not guaranteed on Windows before build 1803. -f matters: without it, curl happily saves an HTML quota page with a .wav extension and the failure only appears later, in the arrange window.

Step 3 — preview first, download second

Point FORMAT at mp3 while you are still choosing. Previews cost nothing and need no account; a WAV costs quota and needs an open session. Auditioning ten candidates as MP3 and downloading one as WAV is the difference between a search and a harvest.

# two searches, no files written at all
haven search --genre "Boom Bap" --bpm 90 --key Am --limit 5
haven search --genre Trap --bpm 140 --limit 5 --json

What this deliberately does not do

Other hosts in one sentence each

HostThe practical route
REAPERReaScript + ExecProcess, or drop the file in the project's Media folder
Ableton LiveWatch a folder, or drag from the browser — the API just writes the file
FL StudioSame: export to a folder, import from the browser
Anything elseIf it can read a file from disk, it can read what this fetches

The value is not integration depth. It is that the file arrives with a correct name, a correct extension, and a record of what it is — instead of a .wav that is secretly a quota page.

Next: letting an agent do the searching, or what happens when you hit the quota.