Stream Deck Control of Logic Pro Fades

I came up with this way of controlling Logic fades on a Stream Deck which I think is pretty elegant, and I haven't seen it done like this elsewhere.

Basically, you press a green button to select the fade length you want. It will turn red to show that it's selected. Then you press one of the yellow buttons to apply a fade of that length to the selected region.

The Logic Inspector has to be open for this to work, but I've tried to make it fairly smart - it will detect whether the appropriate disclosure triangles are open, and navigate its own way to the Fade controls.

The green/red fade-length buttons must be connected to KM via the official Keyboard Maestro Stream Deck plugin, as that's the only one which allows the icons to be changed on-the-fly (this means specifying the correct row and column numbers in the Stream Deck app - be careful if you have existing buttons in the default positions as the macro changes the icon).

The yellow buttons for actually executing the fades can be linked with the KMLink plugin.

I made these for myself, so use at your own risk! And the kludgy AppleScripts used (because Logic doesn't properly support them) means that functionality may break in a future Logic or OS update!

Keyboard Maestro has to have two variables available: FadeLength and FadeLengthButton. I made these scripts a year or two ago (and was learning as I went along) so I can't remember if they are created manually on execution or if you have to add them yourself.

Hope this is useful!

There 2 downloads are the KM macros, and the icons for the orange/yellow KMLink buttons:
Logic Stream Deck Fades.kmlibrary (431.9 KB)
Orange Fade Icons.zip (49.7 KB)

2 Likes

Very nice indeed!

You could simplify your Fade Variable macro by using a Switch/Case group instead of multiple If/Else actions. If you reset all icons after each AppleScript, you only need to set one icon in the Fade Variable macro. I haven't set up my SD to test it, but see if this works for you:

Fade Macros (SD).kmmacros (521.8 KB)


Aside: here's what my SD looks like for fades:

Top row: nObcontrol fade-in, no fades, nObcontrol fade-out, Auto fades (key command)
Middle row: 4x fade in/out, prompt for fade amount
Bottom row: 4x equal power crossfades, prompt for crossfade amount

I like only having to hit one button, but I'll see if your approach works for me when I have time after today's session. Thanks for sharing!

1 Like

Cool, I’ll have a look when I’m back at my computer! I had a feeling that there must be something shorter than all the if then statements :joy:

Btw, were my icons included in the package? Never exported a macro before!

I really, really wish they would add proper AppleScript support to Logic, or at least expose a lot more to the key commands (so much low hanging fruit, like fades, region gain, colour selection, etc). For a power-user application, in a world of Stream Decks, TouchOSC, etc, they are seriously missing a trick.

1 Like

Yeah :+1:t3:

Yes this has made it quite a bit shorter! The only thing I had to add was to make all the buttons switch to the green icon as soon as the macro runs, so that only the selected button changes to red. I'll update the original post with this version!

That makes sense. With the post-Applescript reset, if you change your mind you'd have two red buttons.

Do you mean after the AppleScript that executes the fade? Wouldn't that reset all the buttons to their 'unselected' state (green) every time? I want to leave the current selection active forever until a new one is selected (so you don't have to select the amount every time you do a fade).

1 Like

Yeah. Much better the way you're doing it now. Hadn't thought of you wanting to maintain the selection.

1 Like

hello again, is there an updated version of this macro for logic 11? I've try this one but I doesn't work and the one above !

@allthebuttons... Have you updated your macro for LP11?

1 Like

Yes! Logic 11 added the new "pitch source" parameter to the Inspector, meaning all the fade controls are one line further down, so all the row numbers had to be increased by 1. (Feeling quite happy now that they are variables!).

Honestly I didn't think of updating this thread because I didn't think anyone was using the macros! I'm surprised and delighted to see that I was wrong.

I've attached the updated macros to this post. I can't see a way of editing the original post to add them, maybe because it's too old?

Logic 11 Stream Deck Fades.kmmacros (414.4 KB)

1 Like

I've found that, when applying fades to a large number of regions at once, AppleScript will often fail while trying to set the second fade length. This is because Logic takes so long to respond after setting the first one. Have you had the same experience?

I've worked around this by splitting my AppleScript in two with a menu-conditional pause. It's still very clunky though and often takes five or six seconds to set the fades. Apple really could do with making this a bit snappier!

I’m not sure what you mean by “set the second fade length”? My macro only sets one type of fade at a time (although it can of course apply this to multiple regions at once if they are selected).

It’s generally more or less immediate, although sometimes the very first time in a session will take a second or so.

Ah ok. I'll try to explain:

If I want to set fade in and fade out to 10ms, I use AppleScript to set the values of each of the parameter fields to 10. If I'm adding fades to 3 regions, this is done relatively quickly.

If it's a large number of regions (for example after removing breaths or gaining down sibilance), the script sets the first fade value and then tries to set the the other. The problem is that Logic takes several seconds to respond while it's adding the first set of fades, during which time the second field is inaccessible. Hence the necessity for a conditional pause.

I think I understand… so you’re doing the fade-ins and fade-outs with a single button press?

On mine, I would first press the 10ms button. This would write 10 to the “fade length” variable in Keyboard Maestro, and turn the 10ms button on the stream deck red, so I know it’s set. This bit is basically instantaneous.

Then I would select the regions and press the fade-in button, and it would apply the saved number (10) to the fade-in parameter in the inspector. Then I would press the fade-out button, and the same thing would happen.

So three button presses (two, if 10ms is already selected), rather than one. But it provides a natural pause where, without even thinking about it, I naturally wait to see the fade-ins are applied before pressing the fade-out button.

Thus I think separating the fade-in and fade-out button presses this way might make it feel faster, even if it isn’t. My perception is that it’s just 3 quick-fire button presses, and I don’t even process the fact that I might sometimes wait a second or two between presses 2 and 3, because I get that on-screen feedback before I continue.

1 Like

I'm beta-testing an app that sets fades and region gain instantaneously via Swift. It's very slick, although I'm waiting for midi implementation before I abandon AppleScript, despite how sluggiish it is.

That sounds cool. Are they using Accessibility to control the gain, a bit like Speakerfood GainControl?

I have been thinking of redoing my stream deck macros using GainControl (especially since the AppleScript seems to have got slower and less reliable on the most recent versions of Logic). But I'm not sure if I'd be able to set up the Stream Deck in the same way (setting the amount first and then pressing the button for the appropriate fade), which I think is by far the most efficient set-up, in terms the balance between how many button-pushes you have to do, and how many buttons are taken up on the Stream Deck.

I might investigate it again...

It is GainControl!

The problem I have with it is that there are a much smaller number of fade length presets, and you have to use single modifier hotkeys (multiple modifiers currently cause infinite gain increases/decreases).

KM and AppleScript are far more versatile, but soooo slooooowwww...

Rinus (at Speakerfood) is planning to add MIDI control for fades, but it may be a while.

Ah OK! I just downloaded the demo of GainControl, and as I feared it's not really usable to replace the AppleScript on my Stream Deck Macro. This I a shame because the AppleScript seems to be getting slower and less reliable with every Logic release.

The problem is that GainControl's controls are set up in a rather inflexible way. You have to set a fixed fade length in the preferences, which means you can't change this on-the-fly while using Logic. And on top of that you have to choose the fade type and activate the actual fade with two separate key presses.

The way I've set up my Stream Deck control - set the fade length then press the appropriate fade button - allows 32 different fades (In/Out/X/EqP x 8 lengths) with only 12 buttons, and a maximum of two quick button presses for any fade.

1 Like

Yes, exactly. I had two loose suggestions for MIDI control. The first was explicit presets for different CC values:

And the second was a stepped multiplier idea, with each fade type on a different CC:

CC Values 1-9 = 1-9ms
CC Values 10-29 = 10-100ms in steps of 5ms
CC Values 30-49 = 110-300ms in steps of 10ms
CC Values 50-69 = 310-1300ms in steps of 50ms

I'm not sure either of these really hit the mark, but I wanted to encourage him to look at MIDI implementation, so I sent him something.