ALR Main S&M Cycling
From CockosWiki
Contents |
S&M Cycle Actions
Section: Main
These actions open the "Cycle Action editor", with which you could add special actions to the Main Section of the Action list.
Executing a CA (Cycle Action) cycles through all determined actions successively. So on button press 1: it runs action A, on button press 2: action B, on button press 3: action C, etc ... After the last action the cycle will begin with action A again.
CA's can consist of at least 2 REAPER stock actions, custom actions or actions of extensions, such as SWS.
CA's can be created out of Main actions, MIDI Editor actions or MIDI Event List actions.
Examples of usage would be to reduce the number of toolbar buttons for multiple but similar actions or to create custom macros with toggle state indication. Some basic examples are explained below.
Creating a Cycle Action
- run one of the actions:
- SWS/S&M: Open Cycle Action editor (used for actions of the main section),
- SWS/S&M: Open Cycle Action editor (piano roll) (used for actions of the MIDI editor) or
- SWS/S&M: Open Cycle Action editor (event list) (used for actions of the MIDI event list)
- The Cycle Action dialog opens and you should see two main areas, on the left all CA's are listed, on the right you see all actions from which a CA consists
- right-click in the left area to add a new action and put in a descriptive name for your new action (this will be displayed in the Action list later)
- click the "Show Action list" button in the upper right of the CA editor
- in the Action list, just select an action
- in the Cycle Action editor, right-click in the right area and choose "Add/learn from 'Actions' window" - This will register the action to the cycle and you will see its ID and description
- right-click again and choose "add command" - This will put in an exclamation mark which indicates Reaper that the first part of the cycle is completed (by double-clicking it you could also edit action ID's by hand or add tooltips which change after each cycle point, see additional settings)
- ...repeat steps 5,6 & 7 if you like to add further actions...
- click Apply/OK
- search your new action in the Action list (Main section!)
These steps create an CA in the kind of A,B,C,...,A,B,C,...,A,B,C,...
To execute more than one action per cycle point (like A,BCD,E,...,A,BCD,E...,A,BCD,E...) just add more actions between the exclamation marks (Or simply create a macro containing actions BCD and add that macro to the cycle).
Additional settings
- if you like the CA to report the toggle state, tick "Toggle" in the left area of the CA editor (see left anim)
- text after the exclamation mark will show as tooltip between the cycle points (see right anim)
Simple example (Main View)
Following creates a Cycle Action that cycles through different track selections: All tracks --> Folder start tracks+Non-folders --> No tracks
Download this Cycle Action :
click here
(import in Main section of the Cycle Action editor)
Visuals:
click here
- open the Action list (shortcut: "?")
- run action SWS/S&M: Open Cycle Action editor
- right-click in the left area of the editor --> Add cycle action and insert name of your new cycle action (will be displayed in Action list)
- in Action list select action: "Track: Select all tracks"
- right-click in the left area of the CA editor --> Add/learn from 'Actions' window
- right-click --> Add command
- right-click --> Add/learn from 'Actions' window
- select action: "SWS: Select only children of selected folders"
- right-click --> Add/learn from 'Actions' window
- select action: "SWS: Toggle (invert) track selection"
- right-click --> Add/learn from 'Actions' window
- right-click --> Add command
- select action: "Track: Unselect all tracks"
- right-click --> Add/learn from 'Actions' window
- click Apply/OK
- search your action in the Main Section of the Action list and assign a shortcut/create a button if you like.
Advanced example (MIDI Editor)
The following creates a Cycle Action that toggles between REAPER's MIDI Piano Roll Mode and the Drum Map Mode, changes views of notes (see screenshot & anim) and you will learn to port the action to the MIDI piano roll toolbar.
Download this Cycle Action:
click here
(import in MIDI Editor section of the Cycle Action editor, after adding search it in the Main section of the Action list, see also below)
Visuals:
click here
- open the Action list (shortcut: "?")
- run action SWS/S&M: Open Cycle Action editor (piano roll)
- right-click in the left area of the editor --> Add cycle action and insert name of your new cycle action (will be displayed in Action list)
- in the MIDI Editor section of the Action list select action: "Mode: Drum Map"
- right-click in the left area of the CA editor --> Add/learn from 'Actions' window
- select action: "View: Show events as triangles (drum mode)"
- right-click --> Add/learn from 'Actions' window
- select action: "View: Hide unused and unnamed note rows"
- right-click --> Add/learn from 'Actions' window
- right-click --> Add command
- select action: "Mode: Piano Roll"
- right-click --> Add/learn from 'Actions' window
- select action: "View: Show events as rectangles (normal mode)"
- right-click --> Add/learn from 'Actions' window
- select action: "View: Show all note rows"
- right-click --> Add/learn from 'Actions' window
- click Apply/OK
Search your new MIDI Editor Cycle Action in the Main Section of the Action list! As you sure have already noticed you cant create a button of this action in the MIDI Piano Roll toolbar due to API limitations (please vote here). But you can assign this action to a shortcut, create a button on a dedicated floating MIDI toolbar or do the following, which is kind of a simple workaround to get MIDI Editor actions ported from the Main Section to the MIDI Editor Section of the Action list (from there you could create typical MIDI Editor toolbar buttons).
- install Python 3.1.3 (v3.2 wont work properly with REAPER atm)
- open the Python IDLE or any text editor
- follow gofer's excellent instructions
Open Cycle Action editor (Custom cmd ID _S&M_CREATE_CYCLACTION)
Sections: Main
Opens the dialog to create special actions that allow executing multiple actions successively. (Please see above)
Open Cycle Action editor (piano roll) (Custom cmd ID _S&M_CREATE_ME_PIANO_CYCLACTION)
Sections: Main
Opens the dialog to create special actions that allow executing multiple actions successively. (Please see above)
Open Cycle Action editor (event list) (Custom cmd ID _S&M_CREATE_ME_LIST_CYCLACTION)
Sections: Main
Opens the dialog to create special actions that allow executing multiple actions successively. (Please see above)