Watch the Guitar Sampling 4/4 online guitar lesson by Rory Ronde from Neo Soul Guitar Guidebook
We could take the attitude of a hip hop producer when composing musical phrases on a guitar. We could treat a certain musical pattern as if it were a sample. Then, we can use that "sample" as a building block of a song. We could "loop" this piece of music exactly the same way it would be done using audio software. In this case, we are the machine itself.
This is what I like to do when I'm composing or playing live; It's very important to realize that it isn't done in a random, vague way. It's a systematic way of playing the desired phrase and also repeating and crafting the phrase further. One can even "cut", "copy", and paste the way it's done on computers.
I'll demonstrate this with two grooves. One is a hip hop beat, and the other is a 6/8 groove - just to get out of the 4/4 time signature.