Skip to content

Instantly share code, notes, and snippets.

@kindohm
Created October 30, 2017 17:50
Show Gist options
  • Save kindohm/3e13c2ca28a842f94efa077847afc1b5 to your computer and use it in GitHub Desktop.
Save kindohm/3e13c2ca28a842f94efa077847afc1b5 to your computer and use it in GitHub Desktop.
tidal l-systems
-- calum's code
let lsys n r s = p ("{" ++ lindenmayer n r s ++ "}%8")
let inverse 0 = 1
let inverse 1 = 0
let pat = lsys 2 "1:1 1 ~,0:0,~:~ ~ 1 0 ~" "1 1 1 0 ~"
d1 $ gain pat $ s "bd"
d2 $ gain (inverse <$> pat) $ s "sn"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment