Hi! I use fl studio, I'm sure in logic this is also possible, all you need is the possibility to loop and re-record on the loop (in fl studio it's called blend recording) I suggest you to look at a logic tutorial because I know nothing about that daw!