[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Drum patterns with patterns?



See Pdelta in my ddwPatterns quark.
hjh

On Jul 23, 2009, at 3:26 PM, Nathaniel Virgo wrote:

Hi,

I was wondering if anyone has any hints for programming drum patterns in SuperCollider? I'm particularly interested in Pattern-based methods.

The reason I tend to find it tricky is that with Patterns you have to enter the duration of each note in a sequence rather than the beat on which the note occurs.  This means that if you want, for example, a snare pattern that has hits on beats 2 and 4 of a bar, you either have to enter a note on beat 1 that has a freq of \rest, or else you have to use Plag to offset the snare pattern.  Neither of these is very convenient and both tend to mean that it's quite hard to read what the code is doing.

Ideally what I want is a way to enter patterns where you enter the time of each note instead of its duration.  So for a basic snare pattern you'd enter something like

PTimeBind(
  \instrument, \snare,
  \time, Pseq([1,3])
)

Times 1 and 3 correspond to beats 2 and 4 since time starts at 0 instead of 1.  This would create a single bar that can be triggered repeatedly using Pspawn(er).

Is there a way of doing this that I've missed?


: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman