hey friends! I've been experimenting with bgold 's awesome markovPat .. trying to figure out how to use it with chords.
It works great with single notes or sounds;
this works fine:
p "bass" $ n (fmap ([0,4,7,11]!!) $ markovPat 32 1 [[4,1,0,0], [1,0,0.5,0.25], [1,0,0.5,0.25], [1,0,0,0]]) # thru
as does this:
p "drums" $ loopFirst $ (9 ~>) $ s (fmap (["bd", "808hh", "808ohh", "808sd", "~"]!!)
$ markovPat 16 2
[[2,4,1,0.5,3,0.5], -- bd
[3,8,1,1,0.1,0.1], -- hh
[3,7,0,0,2,1], -- ohh
[1,0,0,0,0.2,0.8], -- sd
[1,0.5,0.1,0,0.8,0.8], --rest
[2,3,1,1,0.5,0.8] -- cvb
]) # cut 89
but this does not:
d1 $ n (fmap (["c'maj","e'min","a'min"]!!) $ markovPat 8 1 [[3,5,2], [4,4,2], [0,1,0]]) # thru
(thru
is midi output)
I get an error like this:
<interactive>:21270:16: error:
β’ No instance for (Data.String.IsString Double)
arising from the literal β"c'maj"β
β’ In the expression: "c'maj"
In the first argument of β(!!)β, namely
β["c'maj", "e'min", "a'min"]β
In the first argument of βfmapβ, namely
β(["c'maj", "e'min", "a'min"] !!)β
any ideas? thanks!