Record audio while playing in audio plugin and reproduce it in background after recording

HI Jucers, I’m making a simple MiniRig for guitar, step by step, controlling every change and every upgrade.
I’ve implemented 4 STK effects and now i need to record what I’m playing with my guitar and reproduce the recording while I’m playing (don’t need to record effects, only raw input).
I don’t find a tutorial to do that in juice, maybe someone can indicate me the way of doing that?

The Audio Recording tab of the JUCE demo app is a reasonable place to start.

Maybe the example I posted can also help you, it plays and record simultaneously as needed:
Audio plugin host with multi file audio player and recorder