Context-Sensitive Actions Using Follow Actions and a Stepped Dial

From Loopy Pro Wiki
Revision as of 06:10, 21 September 2024 by Edwards (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Stepped Dials and radio buttons can be used for context-sensitive behaviors where the same trigger has a different effect depending on what is happening in Loopy Pro. In this article, we’ll look at using Stepped Dials, but you can use Radio Buttons to accomplish the same thing.

In this article, I’ll describe a method that works in both Loopy Pro 1.1 and later. In Loopy Pro 2.0, it is possible to use a slightly more compact method.

Loopy Pro already has some context-sensitive behavior built in. Triggering an empty loop by touch or a MIDI binding starts it recording, triggering it again ends the recording and starts playback and triggering it while playing stops the clip. By using the techniques described in this article, you can create more complex behaviors.

Some Examples

Here are a few examples of behaviors that you can accomplish with this technique that would be tricky otherwise.

  • Capturing your playing as an overdub by triggering a playing clip at the end of a loop cycle. In this case. triggering an empty clip and a recording clip behaves typically, but if the clip is playing, you can trigger it to retroactively capture your playing as an overdub.
  • Triggering a stopped clip during its play count-in to start overdubbing instead of playing. In this case, triggering works normally except that if you triggered a stopped clip, you can trigger again to have it overdub when loop starts playing rather than playing.

Overview

The next has three main components:

  • A stepped dial (or radio buttons group) with steps for for the different states and the actions to perform when triggered from that state
  • Clip Follow Actions that set the dial position
  • A trigger (a widget and/or MIDI binding) that activates the dial step

The Stepped Dial

For each state you care about, the dial will have an empty step with the state’s name and a step after the empty step with the action for actions to perform when the dial is triggered from that state. For example, you might have a dial setup as follows:

  • Empty
  • Empty Action
    • Record Clip
  • Recording
  • Recording Action
    • Stop Recording
    • Scroll Dial to Play
  • Playing
  • Playing Action
    • Record or Stop Clip [toggle overdubbing]
    • Scroll Dial to Play
  • Play Count-In
  • Play Count-In Action
    • Cancel Count-Ins/Outs
    • Record Clip
  • Stopped
  • Stopped Action
    • Play Clip
    • Scroll Dial to Play Count-In

Some of these steps include actions that scroll the dial to another state and some don’t. Whether this is necessary depends on whether the action triggers a follow action that will take care of further setting the dial. For example, the action after empty is Record Clip. Record Clip will result in the Begin Record follow action being triggered. That will take care of setting the dial to the Recording step.

Of interest here is the Stopped Action. The Stopped Action step performs the Play Clip action (which queue the clip to play) and scrolls the dial to “Play Count-In”. If there are no further triggers, clip will start playing when the count-in ends and the play follow action will set the dial to the “Playing” step. IF there is a trigger during the count-in, however, the count-in is canceled and re initiate a recording action that will kick in at the beginning of the next measure (or however you set the action’s quantization).

Follow Actions

For any state you care about that has a corresponding Follow Action, add a Trigger Widget action that sets the dial to the appropriate step. For example, you might have:

  • Begin Record : Scroll Dial to “Recording”
  • Finish Initial Record: “Stopped” *see note at end of this section
  • Play Clip: Scroll dial to “Playing”
  • Stop Clip: Scroll dial to “Stopped”
  • Clear Clip: Scroll dial to “Empty”

You may notice that Finish Initial Record action sets the dial to “stopped” instead of playing. If finishing recording always plays, we don’t need to to this; normally, the Play follow action takes care of setting the dial.  But,this example is from layout where only one clip is playing at a time. You might end recording of clip 1 by triggering recording of clip 2. When that happens, clip 1 goes to the stopped state but a stop follow action isn’t triggered since the clip was never playing. (Currently the stop follow action is only triggered when a clip was playing; this might change in the future). Setting up the dial this way covers both cases. If clip 1’s recording is ended by recording clip 2, clip 1’s dial is left in the stopped state. If clip 1’s recording is ended the usual way, the play follow action will set the dial to the right state.

Trigger

The trigger is an action that nudges the dial one step. The Trigger Widget action has a scroll sub-action when the target is a stepped dial or a radio button. When you choose the scroll sub-action, there is a nudge action. We use that to nudge the dial to the action for the current state.