# Rhythm independent from chords

I’m still new at Supercollider and I am so confused why I can’t figure out how to do the following:

I have a rhythmic pattern where every Pseq = 1 bar of 4/4.

``````\dur, Pseq([
Pseq([1, 0.75, 0.25, 1, 1], 3),
Prand([
Pseq([1, 0.5, 0.5, 1, 0.75, 0.25]),
Pseq([Rest(0.5), 0.5, 1, 0.5, 0.5, Rest(0.5), 0.5], )], 1)
], inf)
``````

Then I have a Pseq of chords:

``````Pseq(
[[ 0, 4, 7 ], [ 0, 2, 6, 9 ], [ 4, 7, 11 ], [ 5, 9, 12 ], [ 6, 9, 12, 15 ], [ 4, 7, 11 ], [ 5, 9, 12 ], [ 6, 9, 12, 15 ], [ 4, 7, 11 ], [ 4, 7, 10, 12 ], [ 5, 9, 12 ], [ 6, 9, 12, 15 ], [ 7, 12, 16 ]].midiratio, inf)))
``````

Now the chord changes every time a dur-value changes. This feels like a super simple thing to solve - but how?
I have tried everything from Plambda to Penvir, but nothing seems to work.
The chords length is:
2, 2, 4, 2,2,4, 2,2,2,2,2,2, 8

Your question is not very clear.
I assume you want to combine the dur sequence with the chord sequence?
One way would be like this:

``````Pdef(\chords,
Pbind(
\dur, Pseq([
Pseq([1, 0.75, 0.25, 1, 1], 3),
Prand([
Pseq([1, 0.5, 0.5, 1, 0.75, 0.25]),
Pseq([Rest(0.5), 0.5, 1, 0.5, 0.5, Rest(0.5), 0.5], )], 1)
], inf),
\note,
Pseq(
[ [ 0, 4, 7 ], [ 0, 2, 6, 9 ], [ 4, 7, 11 ], [ 5, 9, 12 ],
[ 6, 9, 12, 15 ], [ 4, 7, 11 ], [ 5, 9, 12 ], [ 6, 9, 12, 15 ],
[ 4, 7, 11 ], [ 4, 7, 10, 12 ], [ 5, 9, 12 ], [ 6, 9, 12, 15 ],
[ 7, 12, 16 ]
], inf)
)
).play;
``````

Thanks for the reply. I see that my question is quite badly written.

So I want the chords to have this length: 2, 2, 4, 2,2,4, 2,2,2,2,2,2, 8
But I want the rhythm that is underlying to be according to the pattern I have posted.

Like playing the guitar - where the left hand is independent of what is going on in the right hand. (if you are a right-handed guitarist…)

It isn’t an obvious name, but:

``````\note, Pstep(
Pseq([ ... chords ... ], 1),
Pseq([ ... harmony ("left-hand") rhythm ... ], 1)
)
``````

And let \dur play the arpeggiation (“right-hand”) rhythm.

hjh

Thank you! Did not know about Pstep but that solves a lot of problems.