Big updates are coming soon in v2.3.0 #9

Region Playlist overhaul, mergerd (a part of) the real Live Configs extension, new actions, etc.. but there is one update which would be too long to explain in the whatsnew:
1) Cycle Actions: added basic intruction LOOP n
The "LOOP n" statement just avoids repeating the same thing n times.
For ex., if you have a media file you want to insert 16 times, you can do:

^^ do not forget the "ENDLOOP" statement!
.. instead of 16 times:
SWS/S&M: Add media file to current track, slot 01
SWS/S&M: Add media file to current track, slot 01
SWS/S&M: Add media file to current track, slot 01
SWS/S&M: Add media file to current track, slot 01
SWS/S&M: Add media file to current track, slot 01
etc..
2) Cycle Actions: added basic intructions IF and IF NOT
Why is it useful?
Some examples below...
2a) Creating your own "Smart actions"
IF and IF NOT allows you making more intelligent actions, for example let's say we want an action like "
if selected tracks are minimized: expand them, minimize them otherwise"
=> a "smart cycle action" doing the job will be:
Notes:
- Do not forget the "ENDIF" statement!
- IF or IF NOT statements must be followed by an action that reports a toggle state.
The action list shows you if an action "reports a toggle state":

___
Here's a 2nd "conditional macro" or "smart macro" example:
if recording: apply layout #1 else: apply layout #2
2b) Creating your own "Enable/disable actions" from toggle actions
Sometimes REAPER just offers an action like "Toggle this" but there are many situations where you also need other actions like "Turn this ON" and "Turn this OFF" (and not only "Toggle this").
There are lot of discussions about that (
random example,
DarkStar's FR, etc..).
=> you can create those missing actions thanks to IF/IF NOT
Example with "Toggle external timecode synchronization": it is one of those a native actions which are only available as toggle actions.
=> "Turn this ON" version:

^^ in other words:
"if sync is disabled: toggle it, do nothing otherwise"
=> "Turn this OFF" version:

^^ in other words:
"if sync is enabled: toggle it, do nothing otherwise"
2c) Making cycle actions with reliable toggle states
Cycle Actions can report toggle states. You configure those toggle states in the column "Toggle" of the editor:
FAKE toggle states are supported from day one.
REAL toggle states have been added in SWS/S&M v2.3.0 #9 to address an "issue" : the toggle states of cycle actions could get out of sync on project load, or if one toggle was used manually (outside the cycle action). Again, this is often discussed (e.g.
here, or
here, ..)
=> real toggle states + IF and IF NOT statements will help you to deal with that..
This is complicated to explain (English..) so let's take an example.
Say we want to cycle show/hide fx inserts+sends in the mixer. Today, the Cycle Action would be ((c) gpunk, if I'm right!):
Code:
40549 Toggle show fx insert (if enough space)
40557 Toggle show send (if enough space)
! ----- Step ------
40549 Toggle show fx insert (if enough space)
40557 Toggle show send (if enough space)
^^ this is a good/the worst example: it contains several toggle actions, so those actions can already be out of sync one vs the other!
^^ also, today the toggle state of this Cycle Action is totally fake: initially off, then (click) -> on -> off -> on -> etc..
With the next SWS/S&M, a rock solid toggle state alternative will be:
Code:
IF // IF must be followed by a toggle action..
40549 // .. we do not perform the action here, we just test its toggle state
40549 // => only performed if the toggle state is ON
ENDIF // end of conditional macro
IF
40557
40557 // => only performed if the toggle state is ON
ENDIF
! ----- Step ------
IF NOT // note the "not"!
40549
40549 // => only performed if the toggle state is OFF
ENDIF
IF NOT // "not"!
40557
40557 // => only performed if the toggle state is OFF
ENDIF
In the editor, this Cycle Action would look like:
(^^ extra paranoïd version which also makes sure the mixer's pref "show multiple rows" is disabled)
______________
Note: I am talking about "basic" instructions because you cannot yet have nested LOOPs or nested IFs.
However you can have an IF in a LOOP or a LOOP in an IF.
.