there is already something like that on your mac.
Its called the Soundtrack Loop utility.
Get a demo of Peak 5, use that to trim your loop to your liking, then throw it into the Soundtrack Loop Utility to beat-slice it.
not sure if you have Kontakt or not, but the same can be done with Kontakt 2 too.
Get it? 2 too? waka waka!