Logic Pro - Disable MIDIFX and remove instrument [SOLVED]

@noisneil maybe this is for you, my fellow Logic friend :wink:

I have this plugin MIDIFreeze (don't know if you know it or use it), but I would like to see if I can replace it with a KM macro. I need to perform certain operations:

Is there a way to disable all MIDIFX instances present on a channel strip using KM?
Also, is there a way to remove the Instrument on the selected channel strip?

I created this macro to check for the MIDIFX based on a macro you shared with me.
It's able to find the ARP instance, but then it doesn't delete the NOTE REPEATER instance. The engine keep running, but Logic doesn't delete the plugin.

Any idea why? I even tried changing the last action with the variable to make it "Variable is 0" instead of "false", but no luck.
Logic - Remove All MIDIFX instances.kmmacros (68.1 KB)

Here you go. Probably a good idea to change "all screens" to whichever screen your Tracks window is on.

Remove All Midi FX.kmmacros (39 KB)

Macro screenshot

1 Like

Thanks. I was actually using that exact same technique, but then for some reason it would stop in the middle of the flow. Weird...

Anyway... 3 things:
1 - I changed the Keystroke from just N to using Typing, because of that issue we were talking that if something with an N is at the top, such as the Note Repeater, it can cause a problem and click the wrong one. To prevent that, I had the Typing as "No " as you suggested.
2 - Even though this one helps and works, can you clarify my previous question when it comes to the variable? Can you see what's happening on my macro and why it isn't working? I would like to understand what I did wrong there, even if I'm not using it for this particular situation.
3 - Still on my original question: is it possible to have like a script that checks if there's an instrument inserted and if so, find a way to remove it?

Thanks! :slight_smile:

By the way, on the macro you shared, it included the Window Mouse Position v2 macro as well. I guess that was just a "hiccup" when you exported?

It's the 0.5s pause.

I can look tomorrow.

The track header elements change number depending on a few things, so it's quite hard to script them. Not impossible, as PlugSearch proves, but not easy either.

Makes sense!

Sure, no hurries. This one is working anyway so I will see what else I can do to finish the whole macro. I'm building one to replace the MIDIFreeze plugin so I can just use the IAC version, but where it performs all the actions in one go

No problem. Since I'm not the type of person who keeps installing new plugins, I will take some time and just use images of all the instruments I have.

Appreciate your help!

Something like this?
Screen Shot 2022-06-16 at 11.57.46 AM

This is a very specific action that I will only trigger when I'm on the Tracks window, so I'm curious on why you recommend that change? Besides the fact that I can be in the Mixer window and hit that shortcut by accident, any other reason?

It's to stop it seeing that image in the mixer window on other tracks whose midi fx plugins you don't want to remove.

I would probably change it to "- Tracks" just in case you ever have a session with the word "Tracks" in the title.

Good call!

I'm done with the macro.
This is my take on replacing the MIDIFreeze plugin and using the IAC method. Feel free to check it and test it and then let me know if there's something I could have done different/better. Btw, this is assuming that the user has the IAC as the default when loading the External instrument, like I do. I'm working on a version for those who don't.
MIDI Freeze - Logic.kmmacros (157.3 KB)

I don't really know what this macro is trying to do. Can you describe it?

So when you want to print MIDI notes that come from a MIDI FX such as the arpeggiator you can either use the IAC method or you can use the MIDIFreeze plugin. I have MIDIFreeze, but I started my journey of being as minimalist as possible some years ago, in general in life, but especially when it comes to music production. The fewer options, the less distracted I get and at the same time, the more creative I get, because now I'm trying to emulate a certain effect using only stock plugins.

So this macro pretty much just recreated all the steps one needs to use the IAC method, which can be a bit "boring" and even confusing to some people. The reason I got MIDI Freeze was because I felt that the IAC method would break my flow while I was producing music. Now all I need is a shortcut and let it run.

Ok, here are my thoughts. Great macro, first of all! Nice work!

One thing to bear in mind is there is a tiiiiny bit of latency. I don't know whether this is the same with MidiFreeze, but I thought it would be worth mentioning. I suppose, ordinarily, the output of a MidiFX plugin would be grid-locked, so you could always quantize without messing anything up.

Rather than a static pause at the start when duplicating tracks, you can pause until no regions are selected and therefore a menu item is disabled.

You don't need these pauses:


When removing a Midi FX plugin, you can use the N keystroke rather than "No ", as theres no conflict, not that it matters of course; I didn't notice it taking any longer to type.

The only other thing is that there's a shortcut to "toggle track record enable", so you can use that in place of the found image at the very end. I don't actually need this, so I've removed it from my version.

Here it is, in case you fancy a look at the menu pause idea. Obviously I've had to switch out some key commands and images.

MidiFX → Midi.kmmacros (122 KB)

Macro screenshot

Thanks! It took a bit of time and lots of testing, but I'm happy with the result and how much time it will save me :wink:

I only notice that when it's recording. The MIDI regions show the same results for both IAC and MIDI Freeze. Not sure if that's just my computer that's fast and processes it properly, or if you are just experiencing the latency when it comes to recording, but then the actual midi noted are in place. Can you test this if you haven't yet?

I also wanted it to avoid the pause, but couldn't find a workaround for that. You can use that option you just mentioned, but here's the thing: for example I don't have the option to automatically select regions on track selection so when I move to the bottom track, they will still be selected (per your macro of selecting all regions as the first step). I'm sure other people will have that off as well, so that will behave different for different people.

I always keep them, because if for some reason Logic decides to experience some kind of glitch and slows down a certain task (I've experienced that before), I don't want the macro to be canceled.

But we always go back to that issue I mentioned before: if the Note Repeater is at the top, for example, or any other plugin that starts with N which can happen as it happened before at least with the Audio FX, I want it to be specific to "No Plug-in"

Yes, good call. I forgot about that shortcut, even though I have it set myself (rarely use it though). Will change it. Thanks for the tip

Actually, you do, because if you hit play while the record button is enabled, you will hear both the printed MIDI and the one still coming from the External Instrument and that's why I included it. It will not make a difference only when you go to the original track and either disable/remove the External Instrument or disable/remove the MIDI FX inserts.

Will compare both macros and see what you did. Thanks for sharing

I don't have Midi Freeze, so I can't compare, but as an example, notes recorded from a tempo-synced arpeggiator will be very slightly behind the beat. That's actually often desirable, so probably not worth worrying about, but I just wanted to mention it.

You can use the "Select all regions on selected track" action to manually toggle region selection off for that track, if it's an issue.

That's personal preference, I suppose. I prefer not to search for images when it can be avoided and I've been opening track settings menus for two years without issue.

I have it set to auto-arm on selection, so as soon as I deselect and reselect that track, I'll hear both, so it's moot for me. I have to disable something on the track above regardless.

Again, I'm not experiencing that at all so I don't see any special advantage when it comes to using MIDI Freeze, for example.

Why would this be desirable?

The reason I created that Pause was because I noticed that sometimes Logic takes longer to perform some actions. For example, I can open a new project now and duplicating a track takes almost no time, but for example yesterday, sometimes it would take like 1 second. So to avoid 1 Pause action, we are now introducing 2 extra actions. I'm ok with that, because as long as each macro works, I don't really care how many actions it has, as long as it doesn't slow it down considerably. I will check how it goes adding those to my version.

Maybe your computer is faster or maybe mine has some kind of issue here and there...
But people who use this macro can always customize it anyway, so the main core is there and it's working, so that's the most important part :slight_smile:

BTW, I like the MIDI icon on the macro. Nice touch. Stolen!

Same here.

The way I see it: once you print the MIDI, the first instinct is to listen to what you just printed to see if it's good, right? at least, it is for me. Now, whether we have it set to auto-arm or not, at least once the macro stops we can automatically hit Play without any issues. That's my goal.

Well, you can do that after you listened to the new MIDI region anyway. That extra action just gives you the opportunity to just use a shortcut > wait > hit play, instead of having to move the mouse and click the R (or simply press the shortcut). One step less.

Perhaps you're not but it's easy to miss if you are. I'm talking a few samples. I had to zoom in pretty tight to see it. As I said, pretty much inconsequential in real terms.

It's often desirable for parts to sit "behind" the drums, sometimes by quite obvious amounts. Certainly rather that than "ahead".

I'm in the gym, but if I remember correctly the pause you had was 2sec, which is quite long. If anything, a conditional pause will often be quicker. It will take only the time it needs. Resource usage is a non-issue with pauses of this kind.

I'm certainly not saying "I know best", but I think an image search could be considered overkill when it will work without any pause 99% of the time (or 100% in my case). A 0.1s pause is adequate insurance, I'd say. Do it however you like, of course; I'm just justifying my original assertion.

Totally legitimate. I don't know yet how I'll use this as quite honestly I don't use midi fx very often. I may well take you're advice. :+1:t3:

Oh so you're one of those people... Let the latency be part of the music! haha jk
I mean, if I zoom until I can't zoom anymore, I can see that they are in different positions, but not something significant (imo, of course). Also, you can always select the notes and drag them to the grid, if that's something you really need it to do.

On my end, 70 samples to be more precise :wink:

Yes, but as I mentioned, at one point I clicked the shortcut to duplicate the track and it took like a second, so to me, looking at the big big picture, if I'm saving a lot of manual work my using this macro, 2 seconds will not "kill me". Instead, I'm just more relaxed now that I don't need to remember all the steps and thinking what needs to go where.

Similar to my previous reply, the fact that I'm saving a lot of manual labor and mind space, the really small nuances of this kind of action, doesn't bother me at all. I don't want to over obsess this kind of thing, otherwise instead of creating things that help me, I will be debating if a 0.1 pause actually makes my productivity improve that much, compared to a pause of 0.8 or even 1.5 seconds. You know what I mean?
Again, if this doesn't cause major issues and it works, I rather play safe and have it work pretty much 99.999% of the time, either on this computer or any other computer I may have that behaves differently. Hope it makes sense.

Yes, it definitely depends on your workflow. I use MIDI a lot, so this is a must for me and I hate it when I have to stop my flow to use my brains like a calculator. I just want to focus on what really matters and let everything be automated. That's why I love shortcuts for everything :slight_smile:

1 Like

Yeah that's where image searches can present problems. That's the main reason I avoid them. As well as screen resolution differences and which area of screenset they're being searched for, whenever apps make changes to the UI it's a pain replacing every found image.

Me too. Just not Midi FX all that often.

True. I wish KM could find elements by their "coding" name. Or at least, easily.

Ah yeah. I use like arps, chord stuff. Mostly just creative tools, randomization stuff as well. But to be honest, when you see yourself dealing with that kind of "issue" of thinking about all the steps you have to take to just convert that into MIDI notes, it almost discourages you. At least, that's how I used to feel. You end up avoiding it.

1 Like