Nathan James Larsen shows a Logic Pro feature that catches MIDI ideas you never hit record on. Logic quietly buffers everything you play on a MIDI controller, even when you're just noodling with no track armed.
If you play something great and realize too late you weren't recording, hit Shift+R. Logic pulls that background buffer into a region, recovering the performance after the fact.
It captures the whole noodling session, not just the good part, so you'll still need to trim down to the bit you actually want to keep.