Rafa, I think your handling of tempo is the problem. You record something, then you change the tempo and then you want to use Flex. But both deal with time, they cannot be independent. Coloured regions without Flex markers can only have one reason and this is tempo. Please follow the tests below to understand the dependencies.
1. Raw recording
I have two raw tracks from an acoustic guitar. The upper track is a close mic, the lower track contains both mics of a M/S setup. The "Follow Tempo" checkbox is visible, Flex mode is off and the piece was recorded at 107 BPM.
2. Switching to Flex
Now I engage Flex for the upper track. The "Follow Tempo" checkbox goes away, gets replaced by "Flex". This indicates that Flex and tempo are not independent which is no surprise since tempo settings
and Flex work in a time-based manner. Nothing happens in the flex'ed region because there is no processing yet:
3. Changing the global tempo
First I make the piece faster by changing the global tempo to 110 BPM. As you see in the screenshot, the unprocessed region becomes longer as usual. But the flex'ed region stays in place and shows green borders because, relatively to time, it gets compressed. The two tracks are no longer synchronized:
Then I reduce the global tempo to 105 BPM (slower than the recording tempo) and the opposite happens. The unprocessed region becomes shorter and the flex'ed region, with unchanged lenght, turns orange because relative to time it is now expanded:
The above tests tell us that, once engaged, Flex takes over the tempo handling. This means, tempo changes and Flex are not "compatible" under all circumstances. There may be ways to sync flex'ed and unflex'ed regions for tempo changes but the target of this test was only to show the dependencies.
4. Partial tempo changes
For the final test I switch back to the original tempo of 107 BPM and insert random tempo changes. Flex behaves as we can expect from the previous tests. The whole region stays in place and the audio signal gets compressed and expanded in time, according to the tempo:
The situation above shows what you (Rafa) see as "random coloring" but actually it tells how tempo changes influence Flex: Slower tempo expands and faster tempo compresses the audio signal relative to time. If the tempo is at its original value, nothing happens.
Conclusion
When Flex is engaged, tempo changes work on audio material as if there were Flex markers. And the last test above shows us how complex the new function is. Flex cannot ignore the tempo because it is supposed to control it. But the tempo information comes from three sources:
- Global song tempo
- Individual tempo changes
- Flex markers
I suspect this is your underlying problem. You said you have tempo changes and you showed us that you have coloured regions without Flex markers. The last test shows that your colour changes are most likely forced by your tempo changes. You can test this yourself easily by removing your tempo changes or shift them up and down, watching the colour changes in the region.
How to solve the problem?
I don't know yet, I do not use the global tempo track for audio and have no more time left to do more tests. Maybe you can flex all tracks to get an equal situation everywhere in your arrange. Maybe you have to switch Flex off and bounce everything in place to go back to a neutral state, because Flex remembers a lot and might not let you repair a big mess. But I think Flex will always react to your tempo changes. The problem might get harder if you have virtual instruments too. From my view using Flex and tempo changes is not a good idea. At least it can easily become a source of trouble because both functions deal with time.
A couple of hints
- Do not see Flex and tempo changes as regular methods to squeeze a standard audio recording into another time pattern. Record with the right tempo and rhythm as good as possible.
- Flex is a post production tool, mainly thought for corrections. You can of course use it creatively but this is another story. Normally you want to use it to tighten several instruments or to correct rhythmical phrases at certain points.
- If you must use tempo changes, turn Flex on for all audio tracks because it will respond to tempo changes and you should force it to take the tempo from the global tempo track before you change the time of audio by Flex markers.
- If you have audio tracks and virtual instrument tracks and tempo changes and need Flex, don't start with such a song before you tested the dependencies of all elements.
- In former Logic versions we did not think much about time for audio regions. This has changed, we can now control the time. But that means that we cannot longer ignore the time while recording. Time is now an issue to think about.