Is it possible to create a song with a fixed intro and ending, but user control a looping verse in the middle (variable verses) using a foot pedal?

Example: You are playing live and a solo is going very well so you want to add another verse on the fly.