Standalone Lua actions for REAPER: clipboard naming, item editing, markers, regions, and osu!mania export.
Use REAPER 7.x. Clipboard actions and osu!mania export also need SWS/S&M. Editing and marker actions use native REAPER APIs.
-
Install ReaPack.
-
Open Extensions → ReaPack → Import repositories and add:
https://github.com/boboshan/reabbscript/raw/main/index.xml -
Open Extensions → ReaPack → Browse packages, search for bbs, and install the actions you want.
-
Find them in Actions → Show action list and assign shortcuts if useful.
ReaPack installs published versions from index.xml. Unpublished local changes require manual installation.
Open Actions → Show action list → New action → Load ReaScript and select a .lua file. Each action is self-contained and needs no shared Lua files. Use a stable location: REAPER remembers the file path.
| Category | Action | Behavior | Extra dependency |
|---|---|---|---|
| Clipboard | Copy selected take names | Copies active take names; skips items without a take. | SWS |
| Clipboard | Copy selected track names | Copies actual track names, including blank names. | SWS |
| Clipboard | Rename selected takes | Applies one line per active take; skips items without a take. | SWS |
| Clipboard | Rename selected tracks | Applies one clipboard line per selected track. | SWS |
| Items Editing | Move items to new tracks | Creates one named track per unlocked selected item with a take; preserves folder closures. | None |
| Items Editing | Reposition with curved gaps | Moves batches of selected item groups with fixed or interpolated gaps. | None |
| Items Editing | Split by reference tracks and delete gaps | Keeps selected-item material covered by reference items, including nested folders. | None |
| Markers | Markers at item starts | Adds active-take or project markers at starts plus an offset. | None |
| Markers | Markers at item ends | Adds active-take or project markers at ends plus an offset. | None |
| Markers | Region per selected track | Creates one region spanning direct track items, using track name and color. | None |
| Workflow | Generate osu!mania hit objects | Copies a four-key [HitObjects] section. |
SWS |
Woosh is not included in this repository or its package catalog. Removing the package does not delete an existing external installation or downloaded models.
Use reference items as a timing mask for longer recordings or layers:
- Select the media items to cut.
- Select the reference tracks while keeping the target items selected.
- Run bbs_Split selected items by reference tracks and delete gaps.
- One Undo restores the operation.
All items on selected tracks contribute to the mask. Selecting a folder includes its own items and every descendant, including nested folders. Selecting both parent and child does not duplicate references.
Overlapping or touching references form a continuous span:
References: [1------3]
[2----------5] [8---9]
Target: [0--------------------------------10]
Result: [1---------------5] [8---9]
There are no cuts at the internal overlap boundaries; only the outside boundaries of merged spans matter. A one-nanosecond tolerance absorbs arithmetic rounding at touching spans and existing target edges.
- Keep targets outside the reference tracks/folders. A selected target that is also a reference covers its own duration and remains unchanged.
- Empty references cause a safe no-op. With valid references, targets wholly outside the mask are deleted.
- Locked targets are skipped and counted. Surviving pieces stay selected; other items and track selections are preserved.
- Muted, hidden, and lane items still count as references. This uses item boundaries, not audio-silence detection.
- All splits finish before gap deletion begins. If a split fails, the action stops without deleting gaps; one Undo restores partial edits.
- Native REAPER splits preserve source/take data. Check split fades with your project settings.
The selection workflow follows X-Raym's reference-track split action. This standalone implementation adds recursive folder coverage.
Names follow REAPER's selected-track/item enumeration order, not click order. LF, CRLF, and CR are accepted. Interior blank lines clear names; one final line ending is a terminator. A single newline clears one name. Extra lines are ignored; unmatched targets keep their names. An empty clipboard changes nothing.
Take copy and rename both skip items without active takes. Copy actions encode a blank final name so it survives a copy/paste round trip.
The first batch stays anchored. Selected items sharing a positive REAPER group ID form one logical unit; ungrouped items are separate units. Items per group means units per batch, not raw item count. Unselected group members stay put.
- end measures from the previous batch's latest end; start from its earliest start.
- Equal Start/End Gap values give uniform spacing.
- Curve 1 interpolates linearly. Above 1 delays the change; below 1 advances it.
- Negative gaps create overlaps. A locked selected item aborts the whole reposition operation.
The five settings retain the existing bbs_RepositionGroupsCurvedGap ExtState section and keys.
Marker dialogs accept a name, an offset in project seconds, and t (take) or p (project). Names may be blank. Take positions include source offset and playback rate. Takes with stretch markers are skipped with an explanation; use project markers for warped audio. Take-less items are skipped in take mode.
The region action covers only items directly on each selected track; it does not collect folder children.
Name tracks 1, 2, 3, or 4. Active take names use type,hitsound: 1,0 for a tap, 5,0 for a tap with the new-combo flag, or 128,0 for a hold ending at the item end. Hitsound integers range from 0 to 15. Invalid notes are skipped.
The earliest selected item, including invalid items, anchors time zero. Export sorts by millisecond timestamp, column, then original order. Paste into an existing beatmap's [HitObjects] section; this is not a complete .osu file.
Run from the repository root with Lua 5.4 and Python 3:
lua tests/run.lua
python tests/validate_repo.py
git diff --checkUse lua5.4 if that is the executable name. Tests run the actual actions with a controlled REAPER API boundary and do not edit an open project. Use a disposable REAPER project to verify split fades, trimmed/rate-adjusted/looped/reversed sources, grouped edits, folder closures, and restoration with one Undo. The local docs/ folder is ignored by Git.
Package validation needs Ruby and Pandoc:
gem install reapack-index
reapack-index --checkCI runs these checks. Deployment generates the index from committed versions on main; tests, docs, and local tooling are excluded from package discovery. See AGENTS.md for contribution conventions.
ReaPack source URLs contain commit hashes. Keep published history stable. An explicitly requested history rewrite must retain a recovery bundle, remap source URLs to retained commits with identical file contents, and verify every packaged version. Use focused fix:, feat:, docs:, and chore: commits.
For ordinary changes on shared history, incorporate generated index commits without merge noise:
git fetch origin
git rebase origin/mainDo not rebase a rewritten root onto the old remote history. Publishing rewritten history is a separate, explicitly authorized operation.
Every changed action needs a version bump and changelog. Run reapack-index after committing action changes; do not invent source hashes or casually rebuild the historical index. Index deployment is serialized and uses an ordinary push.