You can create a custom action using only REAPER's native commands to insert a MIDI item that is exactly four bars long. This is achieved by using the edit cursor to define a time selection before triggering the insert command.
As the sources note, if you define a time selection before choosing Insert > New MIDI item, the newly created item will automatically match the length of that selection.
Custom Action: Insert 4-Bar MIDI Item
To build this macro, follow these steps:
- Open the Action List (press ?).
- Click New action... and select New custom action....
- Name your action (e.g.,
Insert 4-bar MIDI item). - Drag the following native actions from the left pane to the right pane in this exact order:
- Navigate: Move edit cursor to start of measure (Ensures the item starts perfectly on the bar line).
- Time selection: Set start point.
- Navigate: Move edit cursor right one measure.
- Navigate: Move edit cursor right one measure.
- Navigate: Move edit cursor right one measure.
- Navigate: Move edit cursor right one measure (Total of 4 moves for 4 bars).
- Time selection: Set end point.
- Insert new MIDI item... (This creates the item to fill the 4-bar selection).
- Time selection: Remove (unselect) time selection (Optional cleanup to clear the selection area).
- Check the box for Consolidate undo points so the entire sequence can be reversed with one "Undo".
- Click OK and assign your preferred keyboard shortcut.
How it Works
- Precision: By starting with "Move edit cursor to start of measure," you prevent the item from being inserted mid-bar if your cursor was slightly off-center.
- Automatic Sizing: Because REAPER treats a time selection as the primary guide for new media length, the "Insert new MIDI item" command will ignore its 1-bar default and stretch to fill the 4-bar gap you defined.
- Cleanup: The final "Remove time selection" action ensures that your project is ready for immediate playback or further editing without a highlighted loop area getting in the way.
Tip: If you frequently need items of different lengths (e.g., 8 bars or 16 bars), you can create variations of this macro by simply adding or removing the Navigate: Move edit cursor right one measure steps in the sequence.
Comments
Post a Comment