Loop playback switching with knobs

Can anyone recommend reference patches to look at for the following thing I’m trying to do please?
I have 2 sets of instrument/voice audio loops recorded and five melody variations each. I want to have knob 1 control one voices melody variation loop, and knob 2 control the second melody variations. Should mean I get 25 different melody combos out of my loops.
I’m not sure which sample playback method to use to keep the loops in sync. (they’re 8bar loops of same length)
and secondly, a decision matrix type approach from reading the knob data that will map the 1-5 range of loops to the data input.
I’m thinking it would work a bit like an XY pad on a kaos pad or select a cell in a spreadsheet analogy.

Any useful tips, much appreciated thanks!