insert_riff
Render a humanized guitar or bass riff from inline bars or a file and place it on a REAPER track as a MIDI part, with optional dry-run preview and one-step undo.
Instructions
Render ONE humanized guitar or bass part and insert it on a track (skills/guitar-apparatus/). Write the riff as bars_text — one 16-step bar per line, e.g. 'x.x.x.x.x.x.x.x.' — or point at a file with bars_file, never both; omit both to use the built-in 'demo' riff. Step alphabet: '.' rest, 'x' muted chug, 'X' accented root, 'o' let-ring root, 'g' ghost, '_' tie the previous note through this step, '~' slide into the next; UPPERCASE note names (E F G A B C D) are power chords in the key of E and lowercase are single notes, so case matters. Read skills/guitar-apparatus/SKILL.md for the full table before writing anything beyond chugs. Double tracking is two performances, not a copy: call this twice with DIFFERENT seeds for the left and right guitar. MUTATES the project (undo-block wrapped, one Ctrl/Cmd+Z reverts). Refuses in ~0 s when the bridge heartbeat is dead. The rendered .mid is kept under rendered-midi/, including on a dry run, because REAPER holds it by reference.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map | No | Tuning/keyswitch map: argent_e (default), argent_csharp, nolly_e, nolly_csharp. | |
| part | No | Which engine to play the riff on. Default guitar. | |
| riff | No | Built-in riff when neither bars source is given: 'demo' or 'probe'. | |
| seed | No | RNG seed. Same riff + same seed = the same performance. | |
| tempo | No | Project tempo override (BPM). | |
| track | Yes | Exact name of the track to insert on. | |
| dry_run | No | Preview: return what would run without changing the project. | |
| replace | No | Clear the track from `position` first, so a re-cut does not stack takes. Needs a numeric position. | |
| position | No | Seconds from project start. Default: the edit cursor. | |
| bars_file | No | Absolute path to a riff text file. Mutually exclusive with bars_text. | |
| bars_text | No | The riff inline, one bar per line. Mutually exclusive with bars_file. | |
| low_string | No | Override the map's low-string MIDI note (e.g. 52 to lift a lead into register). |