module Korg.VolcaBeats where
import Korg.KorgBase
import qualified Sound.Tidal.Params
import Sound.Tidal.Pattern
midiNote :: Pattern String -> ControlPattern
midiNote :: Pattern String -> ControlPattern
midiNote = Pattern Note -> ControlPattern
Sound.Tidal.Params.n forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Num a => a -> a -> a
subtract Note
60 forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Num a => String -> a
volcaBeatsMidiNote forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>)
volcaBeatsMidiNote :: Num a => String -> a
volcaBeatsMidiNote :: forall a. Num a => String -> a
volcaBeatsMidiNote String
m =
case String
m of
String
"bd" -> a
36
String
"sd" -> a
38
String
"lt" -> a
43
String
"ht" -> a
50
String
"ch" -> a
42
String
"oh" -> a
46
String
"cp" -> a
39
String
"cl" -> a
75
String
"ag" -> a
67
String
"cr" -> a
49
String
_ -> a
0
mr16 :: Pattern String -> ControlPattern
mr16 :: Pattern String -> ControlPattern
mr16 = Pattern Note -> ControlPattern
Sound.Tidal.Params.n forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Num a => a -> a -> a
subtract Note
60 forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Num a => String -> a
mr16MidiNote forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>)
mr16MidiNote :: Num a => String -> a
mr16MidiNote :: forall a. Num a => String -> a
mr16MidiNote String
m =
case String
m of
String
"bd" -> a
35
String
"rs" -> a
37
String
"sd" -> a
38
String
"cp" -> a
39
String
"lt" -> a
41
String
"ch" -> a
42
String
"oh" -> a
46
String
"ht" -> a
47
String
"cr" -> a
49
String
"rd" -> a
51
String
"lc" -> a
52
String
"hc" -> a
53
String
"ta" -> a
54
String
"cb" -> a
56
String
"ti" -> a
57
String
"ca" -> a
58
String
"wb" -> a
60
String
"la" -> a
61
String
"ha" -> a
63
String
"mp" -> a
64
String
"mf" -> a
65
String
_ -> a
0
midiCC :: Pattern String -> ControlPattern
midiCC :: Pattern String -> ControlPattern
midiCC = Pattern Note -> ControlPattern
Sound.Tidal.Params.n forall b c a. (b -> c) -> (a -> b) -> a -> c
. (forall a. Num a => String -> a
volcaBeatsControlChange forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$>)
volcaBeatsControlChange :: Num a => String -> a
volcaBeatsControlChange :: forall a. Num a => String -> a
volcaBeatsControlChange String
m =
case String
m of
String
"kickLevel" -> a
40
String
"snareLevel" -> a
41
String
"loTomLevel" -> a
42
String
"hiTomLevel" -> a
43
String
"clHatLevel" -> a
44
String
"opHatLevel" -> a
45
String
"clapLevel" -> a
46
String
"clavesLevel" -> a
47
String
"agogoLevel" -> a
48
String
"crashLevel" -> a
49
String
"clapSpeed" -> a
50
String
"clavesSpeed" -> a
51
String
"agogoSpeed" -> a
52
String
"crashSpeed" -> a
53
String
"stutterTime" -> a
54
String
"stutterDepth" -> a
55
String
"tomDecay" -> a
56
String
"closedHatDecay" -> a
57
String
"openHatDecay" -> a
58
String
"hatGrain" -> a
59
String
_ -> a
0