Old 08-29-2024, 12:16 AM   #1
kotll
Human being with feelings
 
Join Date: Jun 2021
Posts: 107
Default Portable / "Plain-text" Menu Scripts v0.0.2

Hi all, I've created a simple script for making your own menus in Reaper.

Usage (Automatic):


  • Run the "Script: Create a new plain-text menu.lua" action
  • Give the menu a unique name
  • Edit the TXT file to add items - see the How to write menus section for a guide

Usage (Manual):


  • Copy the script file from REAPER/Scripts/jamesWalker55 Scripts/plain-text-menu\(VERSION)\plain-text-menu.lua
  • Copy that file anywhere you want, rename it to a unique name (e.g. "MyCoolMenu.lua")
  • Create a text file at the same place with the same name but with a TXT extension (e.g. "MyCoolMenu.txt")
  • Add the script ("MyCoolMenu.lua") to Reaper through "Actions" > "Load ReaScript..."

Install:

Add this ReaPack index:

Code:
https://raw.githubusercontent.com/jamesWalker55/reaper-scripting-5-index/main-index/index.xml
How to write menus:

Menus are defined in the TXT file. You should not edit the contents of the Lua file at all.

Every line is a menu item. There are 4 types of menu items:

Regular items / Commands:

Code:
This is a command! [COMMAND_ID]
Increase MIDI channel of selected notes [40771]
(SWS) Toggle MIDI grid to triplet [_NF_ME_TOGGLETRIPLET]
Normal menu items can be clicked to execute a command. These must end with square brackets "[...]" containing the command ID.

Labels:

Code:
# This is a label!
Labels are items that can't be clicked. They are only for display, and are useful for adding notes to menus. These begin with a hash symbol "# ...".

Separators:

Code:
# The next line is a separator
---
# Here is another separator
-----
Separators are divider lines in the menu. You simply write a sequence of hyphens "---" to create a separator.

Submenus:

Code:
Here is a submenu:
    Cool action 1 [123]
    Cool action 2 [456]
Another submenu:
    Cool action 3 [123]
    More submenus:
        Cool action 5 [999]
    Cool action 4 [456]
Submenus let you hide menu items under a dropdown. You must end the line with a colon "...:", then the next lines must be indented with spaces. The amount of spaces MUST be the same on each level.

Example Menus:

A simple MIDI channel menu:



Code:
# Selected Events
Increase channel (&Next) [40771]
Decrease channel (&Previous) [40772]
&Move to channel:
    1 [40020]
    2 [40021]
    3 [40022]
    4 [40023]
    5 [40024]
    6 [40025]
    7 [40026]
    8 [40027]
    9 [40028]
    10 [40029]
    11 [40030]
    12 [40031]
    13 [40032]
    14 [40033]
    15 [40034]
    16 [40035]
---
# Show...
All channels [40217]
Only channel...:
    1 [40218]
    2 [40219]
    3 [40220]
    4 [40221]
    5 [40222]
    6 [40223]
    7 [40224]
    8 [40225]
    9 [40226]
    10 [40227]
    11 [40228]
    12 [40229]
    13 [40230]
    14 [40231]
    15 [40232]
    16 [40233]
---
# New Events
Set channel for new events:
    1 [40482]
    2 [40483]
    3 [40484]
    4 [40485]
    5 [40486]
    6 [40487]
    7 [40488]
    8 [40489]
    9 [40490]
    10 [40491]
    11 [40492]
    12 [40493]
    13 [40494]
    14 [40495]
    15 [40496]
    16 [40497]
Selecting a single note sets the channel for new events [42466]
A simple grid menu for MIDI editor (Using SWS extension commands):



Code:
# Toggle grid modifiers
S&wing [_NF_ME_TOGGLESWING]
&Triplet [_NF_ME_TOGGLETRIPLET]
&Dotted [_NF_ME_TOGGLEDOTTED]
---
Timebase:
    Project beats [40459]
    Source beats [40470]
    Project time [40460]
    Project sync [40461]
    Help... [40742]
---
# Options
Snap to grid [1014]
Snap relative to grid [40829]
Grid visible [1017]
Sync with arrange view's grid [41022]
MIDI transformation menu (Using KAWA extension commands):



Code:
# Arpeggiate notes
Ascending [_kawa_MIDI2_GenerateArpeggio]
Random [_kawa_MIDI2_GenerateRandomArpeggio]
---
# Duplicate notes
One octave higher [40884]
One octave lower [40885]
---
# Flip notes (selected)
Vertically [40908]
Vertically (preserving pitch) [40906]
Horizontally [40902]
(All notes):
    Vertically [40907]
    Vertically (preserving pitch) [40905]
    Horizontally [40019]
---
Join notes [40456]
Legato notes [40765]
Legato notes (Relative note spacing) [40766]

Last edited by kotll; 11-13-2024 at 10:19 PM.
kotll is offline   Reply With Quote
Old 11-13-2024, 10:20 PM   #2
kotll
Human being with feelings
 
Join Date: Jun 2021
Posts: 107
Default Update

New 0.0.2 version update. This now includes a script with a nice GUI to create the menu for you.
kotll is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.