Created
June 12, 2018 19:50
-
-
Save kindohm/f91dbdcff4ed9fbd83ed5524f1eef8bd to your computer and use it in GitHub Desktop.
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
| let discretise = _discretise | |
| rip a b p = within (0.25, 0.75) (slow 2 . rev . stut 8 a b) p | |
| rip' a b c d e p = within (a, b) (slow 2 . rev . stut c d e) p | |
| spike p = ((# delaytime (scale 0.001 0.3 $ slow 7.1 sine1)) . (# delayfeedback (scale 0.7 0.99 $ slow 6.71 sine1))) $ p | |
| spike' p = (# delay "0.3") $ spike $ p | |
| ghost'' a f p = superimpose (((a/2 + a*2) ~>) . f) $ superimpose (((a + a/2) ~>) . f) $ p | |
| ghost' a p = ghost'' a ((|*| gain "0.7") . (|=| end "0.2") . (|*| speed "1.25")) p | |
| ghost p = ghost' 0.125 p | |
| jit start amount p = within (start, (start + 0.5)) (trunc (amount)) p | |
| gtfo p = (const $ sound "~") p | |
| gtfo' p = (const $ midinote "~") p | |
| gtfom = gtfo' | |
| gtfo2 = gtfo' | |
| shift p = (1 <~) p | |
| shift' x p = (x <~) p | |
| choose xs = (xs !!) <$> (irand $ fromIntegral $ length xs) | |
| one p = stut' 1 (0.125/2) (|*| gain "1") $ p | |
| one' p = rarely (stut' 1 (0.125/2) (|*| gain "1")) $ shift' 1024 $ p | |
| one'' p = sometimes (stut' 1 (0.125/2) (|*| gain "1")) $ shift' 1024 $ p | |
| rep n p = stut' (n-1) (0.125*3) (|*| gain "1") $ p | |
| rep' n p = stut' (n-1) (0.125/2*3) (|*| gain "1") $ p | |
| rep'' n p = stut' (n-1) (0.125/4*3) (|*| gain "1") $ p | |
| beginend bpat durpat = (begin bpat) # (end $ (+) <$> bpat <*> durpat) | |
| mpent = [0, 3, 5, 7, 10, 12] | |
| pent = [0, 2, 4, 7, 9, 12] | |
| inverse 1 = 0 | |
| inverse 0 = 1 | |
| inverse 11 = 0 | |
| inverse 10 = 1 | |
| inv 1 = 0 | |
| inv 0 = 1 | |
| inv 11 = 0 | |
| inv 10 = 1 | |
| bpm x = bps (x/120) | |
| brakk samps = ((|=| unit "c") . (|=| speed "8")) $ sound (samples samps (irand 30)) | |
| brakk4 samps = ((|=| unit "c") . (|=| speed "4")) $ sound (samples samps (irand 30)) | |
| move p = foldEvery [3,4] (0.25 <~) $ p | |
| move'' p = foldEvery [2,3] (0.25 <~) $ p | |
| move' p = foldEvery [3,4] (0.25 ~>) $ p | |
| move''' p = foldEvery [2,3] (0.25 ~>) $ p | |
| delays = [(1/512), (1/256), (1/128), (1/64), (1/32), (1/16), (1/8)] | |
| randDelay p = ((|=| delay (scale 0.5 0.7 $ shift' 5001 $ rand)) . (|=| delaytime (shift' 5002 $ choose delays)) . (|=| delayfeedback (scale 0.5 0.9 $ shift' 5003 $ rand))) $ p | |
| crumble = slow 2 $ sound "[k*16 ~]/2 ~" # n (run 32) | |
| crushit p = (|=| crush (scale 3 8 $ slow 1.1 tri)) $ p | |
| replicator text1 = [putStr (text1) | x <- replicate 500 text1] | |
| flood text2 = sequence_(replicator text2) | |
| replicator' n text1 = [putStr (text1) | x <- replicate n text1] | |
| flood' n text2 = sequence_(replicator' n text2) | |
| sbank bank pat = s (flip (++) <$> pat <*> bank) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment