the only thing i don't like so much about this, is that it r
has two arguments, this is an easy fix though if one prefers the parameter grouping notation:
let
r :: Pattern String -> Pattern a -> Pattern a
r x p = do
(n, i) <- fmap split x
_r n i p
where split :: String -> (String, String)
split s = (\(x,y) -> (x, if y == "" then y else tail y)) $ (break (==':') s)
then you can write r "<funk7c:hh afro1a:hh afro1b:hh>" $ s "efmhhclose" # gain 0.9,
1 Like
Hi. I'm late to this party, and just want to add two comments:
- when I was reading
setI "i" $ 0 -- i = hihat
setI "s" $ 10 -- s = snare
setI "k" $ 4 -- k = kick
I thought - wait, I know those letters ... cf. The SKI Combinator Calculus a universal formal system
- describing (drum) patterns is one goal, another ist deriving them (from basic patterns, by transformations that make them more interesting). I found this reference Nick Collins: Algorithmic Composition Methods for Breakbeat Science, 2001
https://composerprogrammer.com/research/acmethodsforbbsci.pdf (probably I found it someplace on this very forum here ...)
2 Likes