Sonic Pi Reich Like Drums With Hydra

I’ve been playing with Reich like drum patterns on Sonic Pi. I use a 12 or 16 note pattern and play it against itself but with one of the patterns shifted an increasing number of note positions giving some interesting affects. I’ve added a hydra visual with different coloured octogons driven by each channel in amplitude and visibility using loop-backed sonic pi audio and two midi control channels.
The Sonic Pi code can be used independently and has various options to superimpose the channels or separate them using pan position. Also main beats can be accented, and there are two different patterns to choose from. You can alter the playback speed using the metro panel.
Lots of scope for further experimentation.

code is on my gist site both Sonic Pi and hydra code.

video shown below