fastGap with a patterned time

Hey everyone,
So I've been trying to write docs for undocumented functions on the wiki and while fastGap (https://tidalcycles.org/index.php/fastGap) works just fine if you give it a very simple time parameter I'm finding it's behavior counterintuitive if you put in a more complex pattern.

So I think I can understand why something like

fastGap "2 4" $ s "bd cp*2 sn*2"

is equivalent to

fastGap 2 $ s "bd cp*2 sn*2"

but then if you do something like

fastGap "1.5 4" $ s "bd cp*

which produces

t> (0>²₉)|s: "bd"
   (²₉>⅓)|s: "cp"
   (⅓>⁴₉)|s: "cp"
   (⁴₉>½)-⁵₉|s: "sn"

drops a snare drum completely vs.

fastGap 1.5 $ s "bd cp*2 sn*2"

which creates

t> (0>²₉)|s: "bd"
   (²₉>⅓)|s: "cp"
   (⅓>⁴₉)|s: "cp"
   (⁴₉>⁵₉)|s: "sn"
   (⁵₉>⅔)|s: "sn"

like I'm not surprised that they're different, I'm surprised that we completely dropped an event from the resulting pattern! It seems counterintuitive that any kind of fast would ever drop events.

Is this behavior right? And if it is, what's the intuition for it?

I've not used fastGap 'in the wild', it's used for building a few other functions though but never thought about its direct applications.. The patterned parameter was probably just used for completeness - internally only _fastGap is used without patterned time.

It's using an 'inner join', so it'll switch between different versions of the pattern, with the structure coming from the pattern in the second parameter.

In particular, it'll be switching between _fastGap 1.5 $ s "bd cp*2 sn*2" and _fastGap 4 $ s "bd cp*2 sn*2".. The first half of the cycle will be from the first one, the second half will be from the second one. So a snare will get lost from the first version (because it would appear in the second half), and the second version won't result in any events (because its second half will be empty).

1 Like

Okay! That's actually really helpful! Thanks

1 Like