I was wondering if it was possible to use my midi fighter 3d with some software to loop what I sing or play on a live instrument. Using my macbook

Not sure what software I would use to do this?

Basically I would want to play some notes on my guitar, press the 1st button on the top row and have it repeat what i played in a loop.

Then I could play something over that, press the 1st button on the second row and record that

Any ideas?

Thanks