Notes not playing at consistent length


I am trying to write a guitar strum pattern and have come across a problem that blows my mind.

So difficult to explain but here goes …

I have ONE 4 beat bar in a loop.

The first beat has 5 notes slightly off-set at their starting point and these play just as written.

Beats 2, 3 and 4 each have the same 5 x 1/32 note chords but here these chords are written starting at the same point ( a pluck not a strum)

Now comes the problem that I cannot understand.

When I start the loop, the first 4 times (exactly 4) the phrase plays as written.

On the 5th, 6th, 7th and 8th pass, the top note of the 2nd chord (only the 2nd) plays with a long sustain (about 1/4 note in length)

On the next 4 passes, it sounds like the 2nd highest note joins in and it too is sustained.

After another 4 bars of mixed sustaining notes, the play goes back to how it was written.

Exactly four bars of short crisp perfect notes but then the sustain pattern starts again EXACTLY as before.

I even tried to test what is happening by copying the bar 7 more times to make an 8 bar phrase.

The result appears even stranger.

The first 4 of the 8 bars play as written, but the next 4 (bars 5, 6, 7 and 8) start the sustain again and so on and so on.

Sorry to be so long winded but I cannot think of another way to explain what is happening.

Thanks in advance for any suggestions.

Took some time but finally solved.

Latency! Latency! Latency!

Had already lowered the latency setting some time back but now having lowered even further the problem is sorted.

Tried raising 10ms and the problem comes back, lower it again and it’s gone.