Hi all!
I'm constantly finding myself in a position of wanting certain patterns to play longer and more complex "macrocycles", and wishing my patterns had a more "arranged" feel to them. It sort of strikes me that my patterns have too much of a repetitive feel (ya I know, even for someone of the "algorave generation"). Kidding aside, one of the things I identified that might be able to create this effect was to have some mechanism for playing a subpattern for a certain number of cycles, followed by another period of rest cycles, and if there was a way to offset this whole thing by a given number of cycles, all the better...
So I came up with this pretty simple little function that leverages whenmod
and const $ s "~"
to create exactly that effect:
playRest play rest skew ptrn = (skew ~>) $ whenmod (play + rest) play (const $ s "~") ptrn
It's pretty darned fun to work with. It makes it possible to make more arranged feeling patterns, and to have a little bit of counterpoint between different "voices" in the track.
I know you can accomplish a similar effect with seqPLoop (which is a way more hilarious name -- "seek ploop") but I feel like the syntax of my playRest function is a little simpler to work with.
As a demo I created this experiment. It's all superdirt so you should be able to run OOTB.
setcps 0.60
do
let dr1 = degradeBy 0.2
$ stack [
s $ steps [
("jazz","0 0 34")
,("jazz","5")
,("jazz"," 7 7")
,("procshort"," 555")
]
,(# gain 0.85) . (# rel 0.05) $ s $ steps [("jazz", " 1 1 1 1 1 ")]
]
# room 0.05
# coarse (choose [6,1])
--
dr2 = struct "{<1 1*2> <0 1 1> <0 1> 0 0 0 0}%<14 7>" $ s "bd" # 2 # coarse 8 # gain 0.95 # speed 0.9
--
chrds = stut 5 0.1 (-3/14) $ degradeBy 0.4 $ stack [n "<df7'maj7 ef6'min7 bf6'maj af6'maj>!7"]
# s "superhex" # gain 0.60 # room (choose [0.4, 0.1]) # size 0.6 # orbit 1 # release (choose [0.1, 0.4]) # accelerate (slow 12 $ range 0 0.06 $ sine)
--
chrds2 = degradeBy 0.4 $ ((1/14) ~>) $ n "bf6'min7*7" # s "superhex" # gain 0.5 # rel 0.3 # room 0.2
--
cymb = degradeBy 0.2 $ stut 3 0.2 (-1/14) $ struct "1(5,14)" $ s "dr"
# n "[19 20]/1.5" # speed 1.0 # gain 0.64 # room 0.8 # rel 0.2 # orbit 2 # shape 0.4 # pan 0.9
--
casio = degradeBy 0.2 $ s "casio*14" # gain 0.48 # pan 0.2 # shape 0.4 # n "[0 1]/2"
--
bassy = ((2/7) <~) $ struct "1" $ s "jungbass" # n 1 # speed (1.1) # gain 1.0
--
hat = stut 12 0.9 (-3/14) $ s "[[electro1*2 electro1:7] ~@6]/4" # rel 0.3 # room 0.1 # cut 1 # pan 0.4 # gain 0.92
d1
$ (1 ~>) $ every 8 (within ((5/7),(7/7)) (# coarse 8))
$ (3 ~>) $ every 8 (trunc (4/7))
$ every 16 (stut 22 0.1 (-1/21) . trunc (1/21))
$ stack [
playRest 15 2 0 $ dr1
,playRest 5 5 0 $ dr2
,playRest 5 5 5 $ bassy
,playRest 16 32 0 $ chrds
,playRest 32 16 16 $ chrds2
,playRest 4 4 0 $ cymb
,playRest 4 4 4 $ hat
,playRest 3 3 0 $ casio
]
in particular, notice how 'chrds' and 'chrds2' are playing opposite each other, as are 'cymb' and 'hat'.
Thanks for checking this out