Humanization / Duration / Delta

I assume there is an easy way to do this or a Class made specifically for this, as there usually is, but I can’t seem to find what I am looking for.

I have a pattern for drums. It’s in 7/8 I guess, in a Psync, not that I think that matters, as I can use any Pseq for the drum pattern and this still happens.

My goal is to humanize the timing, so I thought doing a Pwhite().asArray for the \dur would do what I want, but when the stream restarts, often theres a short note right before the down beat that sounds off. I couldn’t seem to get what I wanted with \legato either as it will mess up my sounds that have sustains like cymbals.

I guess I’m looking for something to slightly change the timing, but also consider the down beats, so that it doesn’t play something right before the “1”, if that makes sense.

Another idea I had was to Pwhite the \dur, but somehow “normalize” the pattern to fit into a bar? Not sure how I’d implement it though.

As an example:

			instrument: \drums
				num: Pseq([[17,0],\rest,17,33,\rest,33,17], inf),
				dur: Pseq(Pwhite(0.24,0.255).asArray, inf), // humanize?
				\amp, Pwhite(0.75,1),

I like to use the \lag key for this kind of purpose. lag: Pwhite(-0.05,0.05,inf) for example

the advantage is that your overall duration wont drift off in the intermediate term (unless that’s what you seek!)

Pbrown can simulate a terrible drummer who drifts ahead or behind slowly…

if you want lag to be zero every 7th event you could do Pseq([0, Pwhite(-0.1,0.1,6)],inf) or some such

note: why don’t you simply use a Pwhite for your dur key? I don’t think the Pseq wrapper here is doing anything! The Pseqs starts with its first element - the Pwhite - and then the Pwhite is embedded endlessly (default is inf for Pwhite).

1 Like

Oh I don’t know why I put the Pwhite in the Pseq, I must have been doing something else first.

Just tried lag, and yeah that’s what I’m talking about! I guess I don’t see any reason to do anything else. Solved. Thanks!

Also, check out James Harkins’s Pattern Guide for creating Swing: Pattern Guide Cookbook 08: Swing | SuperCollider 3.11.1 Help