Macro - Logic Pro: Re-Apply a Smooth Sequence of Colors to Existing Tracks

An often asked question is how to have Logic re-apply colors automatically to existing tracks, just as it does when you add new tracks. At this time, it’s not a built in feature.

This KM macro will run over all your tracks and apply colors from the Logic color picker, one by one.

Macro trigger: I have now defined a specific trigger. You should add you own that fits your flow (keyboard shortcut, midi, streamdeck what not.)

Requirements and limitations:

  • Logic must be running.
  • Will currently work on up to 96 tracks. The macro will currently stop after applying a color to the 96th track. I plan to extend this to any number of tracks.
  • To identify when the macro has reached the last track, a test is made between “previous” track name and “current” track name. If they’re equal, the macro stops. This does mean, however, that if you have two tracks that share the same name, the macro will stop. I might update this macro to get around this in a future update.

Tested on:

  • Logic 10.7.1
  • macOS Monterey 12.0.1

Please do not hesitate to post suggestions or issues with this macro, I’ll look into it when I can.

Macro download:
Logic - Re-apply colors to all tracks.kmmacros (55.0 KB)

Macro picture:

I'm not by my Mac right now, so can't test to find out what you mean by "reapply colours", but I do have a solution for ending the macro:

Temporarily show the Output Track so that it becomes the last one.

Sweet.

This macro picks and applies a color for each of your tracks from the color picker. Logic does that for you if you make, say, 10 new tracks, but further into the session where you’ve duplicated, copied what not, colors are not following this scheme because Logic only applies it when track are created. Will update the description, if that’s not clear… :+1:t2:

Are you trying to set each track to a different arbitrary colour? If so, that's an option in Logic Pro, which not everyone uses, so it's not immediately apparent what you mean. I, for example, prefer to manually choose colours based on the track type. Drums are always brown; guitars blue; keys green etc...

If you're referring to the to the auto-assign color in preferences (24 or 96 scheme), that only applies when you create new tracks, not when duplicate them and mess around with your track (move them what not), which is an annoyance to some and a recurring question in forums. That's what this macro caters for.

Me too, at times.

Ok, thanks for clarifying. Here's my attempt, which works for an unlimited number of tracks and stops when it reaches the Stereo Out track (which will be temporarily shown if not already visible). I removed any key commands in favour of menu selections, so that it will work for any user, regardless of customisation.

Auto-Assign Colours to Existing Tracks.kmmacros (81 KB)

Macro screenshot

I don't understand the purpose of your response and the purpose of you posting a script that produces the same result (limitations and assumptions listed in OP aside).

I must ask: didn't my macro work?

Because it overcomes the stated limitations.

Honestly Neil, I respect your knowledge, the help you provide and the other macros you have posted, but that response is rude.

And you didn't answer my question: didn't my macro work?

I don't remember asking you to rewrite and "overcome the stated limitations" here. As mentioned in OP, I was open to comments and planned on fixing issues myself, because it's an opportunity to learn. You couldn't wait to let me have a go at fixing my own script?

Of course, you're free to make macros as you want - and help others or not. But, I don't know if posting a complete rewrite is misunderstood helpfulness or just programmers flex, but if it's the latter, as a beginner here, I couldn't think of anything more discouraging. I therefore choose to believe it's the former.

No, it isn't. It's easy to misinterpret tone when reading text, so I'll restate it as clearly as I can: I posted an alternative method in order to demonstrate some thinking that might help overcome a few obstacles. If you prefer to ignore it and learn from doing, that's perfectly fine.

It did, within its limitations.

This forum isn't a place where one solution is sacrosanct. You said, in your original post, that suggestions were welcome, so I made practical suggestions. The best way I could articulate these was to put them into practice. The logic I thought might help overcome the count limitation required that I start afresh rather than try to reverse-engineer your existing macro.

It's neither. It's a forum member chipping in with practical ideas. As you'll discover over time, this is the spirit and fun of being an active member here.

2 Likes

Sorry, but already suggested a solution in plain text? Posting a rewrite wasn't strictly necessary?

Let's not turn this discussion into something it isn't about and wasn't, directly or indirectly, implied it should be on my part.

I'm just happy it wasn't a first few chapters for a book and my intentions for how to conclude it I posted here. Instead of authoring advice I would have received a fully written book back! Not fun. Not helpful.

I've participated in many forums, and I concur, that's usually the case. People (myself and others) would come up with ideas, and the general interaction is always support, to chip in, help them push their solution forward, help them through their obstacles with suggestions and criticisms. I can't remember ever seeing someone entirely rewrite a solution or project in the name of "being helpful".

Come to think of it, that is not entirely correct. I once worked with a programmer, who would access peoples code and rewrite it during the night, because "their way was better". On a technical level, "better" can be discussed ad infinitum, the more severe impact was that this behavior removed the coworkers initiative and agency.

Anyway, I sense we may not agree on this detail and so be it. I'll finish this response by reiterating, as mentioned in my first critique about this, that I respect your knowledge and appreciate the help you provide.

Look around on this forum. Whenever you see someone post a macro that has issues or limitations, more often than not someone else will post another macro that is an attempt to help overcome them. Seriously, make a cup of coffee, sit back and have a look around this forum. You'll see that this is almost always the case. You don't need to ask me to do it and I don't need your permission. With the greatest respect, I'm here to exercise my brain, interact with lovely people and have fun, not walk on eggshells around people who get offended when I try to help.

Furthermore, and because I want us to understand each other and get along...

I suspect you may be upset because you think I'm an expert programmer, trying to belittle your efforts and assert myself somehow. This is not the case. I never automated a single thing on my computer before two years ago when I downloaded the trial of Keyboard Maestro. I am still hopeless with AppleScript and rely on copying snippets from the forum or scavenging Google; regex is still a foreign language to me and requires a lot of trial and error.

Writing the macro I supplied above wasn't five minutes' work; I spent about 45min on it and most of that was me sitting quietly and thinking about the best way to do it. I enjoy that kind of meditation, particularly at times when I'd rather not think about other things. Yesterday I really needed some distraction, so when I saw someone trying to do something in Logic (something I do have a lot of experience with), I thought I'd try and help.

You may not agree, but I see this as quite similar to the following analogy:

Q: "I've just made some bolognese and it tastes ok but it could be better. Does anyone have any suggestions on how to make it taste like mama used to make?"

A: "Sure! I had some free time and I made some bolognese that I think you might like. I've left a pot of it outside your door. Also, here's the recipe."

Q: "Did I ask you to make me some food?! I only wanted suggestions! You're so rude!"

You see what I mean? The macro I posted was made with love and if you only want the recipe, you can leave the bolognese for someone else to try.

1 Like

I don't understand the purpose of this, for what would you need a rainbow in you Daw? for me is better to set colors according to Instruments or sessions!

1 Like