ALR Main S&M Cycling

From CockosWiki

Jump to: navigation, search

Contents

S&M Cycle Actions

EDIT March 2014: This page is well outdated!

This page needs an update. In the meantime, here is a couple of links that might help:


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
  1. run one of the actions:
    1. SWS/S&M: Open Cycle Action editor (used for actions of the main section),
    2. SWS/S&M: Open Cycle Action editor (piano roll) (used for actions of the MIDI editor) or
    3. SWS/S&M: Open Cycle Action editor (event list) (used for actions of the MIDI event list)
  2. 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
  3. 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)
  4. click the "Show Action list" button in the upper right of the CA editor
  5. in the Action list, just select an action and be sure that "show action ID's" is activated (right click action window)
  6. 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
  7. 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)
  8. ...repeat steps 5,6 & 7 if you like to add further actions...
  9. click Apply/OK
  10. 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)
Cyclaction toggle.gif
Cyclaction tooltip.gif


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

  1. open the Action list (shortcut: "?")
  2. run action SWS/S&M: Open Cycle Action editor
  3. 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)
  4. in Action list select action: "Track: Select all tracks" and be sure that "show action ID's" is activated (right click action window)
  5. right-click in the left area of the CA editor --> Add/learn from 'Actions' window
  6. right-click --> Add command
  7. right-click --> Add/learn from 'Actions' window
  8. select action: "SWS: Select only children of selected folders"
  9. right-click --> Add/learn from 'Actions' window
  10. select action: "SWS: Toggle (invert) track selection"
  11. right-click --> Add/learn from 'Actions' window
  12. right-click --> Add command
  13. select action: "Track: Unselect all tracks"
  14. right-click --> Add/learn from 'Actions' window
  15. click Apply/OK
  16. 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)
Edit modes.jpg

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

  1. open the Action list (shortcut: "?")
  2. run action SWS/S&M: Open Cycle Action editor (piano roll)
  3. 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)
  4. in the MIDI Editor section of the Action list select action: "Mode: Drum Map" and be sure that "show action ID's" is activated (right click action window)
  5. right-click in the left area of the CA editor --> Add/learn from 'Actions' window
  6. select action: "View: Show events as triangles (drum mode)"
  7. right-click --> Add/learn from 'Actions' window
  8. select action: "View: Hide unused and unnamed note rows"
  9. right-click --> Add/learn from 'Actions' window
  10. right-click --> Add command
  11. select action: "Mode: Piano Roll"
  12. right-click --> Add/learn from 'Actions' window
  13. select action: "View: Show events as rectangles (normal mode)"
  14. right-click --> Add/learn from 'Actions' window
  15. select action: "View: Show all note rows"
  16. right-click --> Add/learn from 'Actions' window
  17. 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).

  1. install Python 3.1.3 (v3.2 wont work properly with REAPER atm)
  2. open the Python IDLE or any text editor
  3. 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)


<< Back to Action list reference