Created
October 30, 2017 17:50
-
-
Save kindohm/3e13c2ca28a842f94efa077847afc1b5 to your computer and use it in GitHub Desktop.
tidal l-systems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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