maquinitas-tidal 0.2.5 → 0.2.6
raw patch · 4 files changed
+109/−71 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Korg: mr16 :: Pattern String -> ControlPattern
- Korg: mr16MidiNote :: Num a => String -> a
- Korg: volcaBeats :: Pattern String -> ControlPattern
- Korg: volcaBeatsMidiNote :: Num a => String -> a
+ Korg.KorgBase: korgBase :: String
+ Korg.VolcaBeats: ccn_num :: Num a => String -> a
+ Korg.VolcaBeats: ccn_num_1 :: Num a => String -> a
+ Korg.VolcaBeats: ccn_num_2 :: Num a => String -> a
+ Korg.VolcaBeats: ccparam :: Show a => String -> a -> [Char]
+ Korg.VolcaBeats: midiNote :: Pattern String -> ControlPattern
+ Korg.VolcaBeats: mr16 :: Pattern String -> ControlPattern
+ Korg.VolcaBeats: mr16MidiNote :: Num a => String -> a
+ Korg.VolcaBeats: volcaBeatsMidiNote :: Num a => String -> a
- Roland: tr08MidiCC :: Num p => [Char] -> p
+ Roland: tr08MidiCC :: Num a => String -> a
Files
- maquinitas-tidal.cabal +3/−2
- src/Korg.hs +0/−69
- src/Korg/KorgBase.hs +6/−0
- src/Korg/VolcaBeats.hs +100/−0
maquinitas-tidal.cabal view
@@ -1,5 +1,5 @@ name: maquinitas-tidal-version: 0.2.5+version: 0.2.6 synopsis: library for MIDI control of hardware description: maquinitas is a library for MIDI control of hardware homepage: https://github.com/maquinitas/maquinitas-tidal@@ -14,7 +14,8 @@ cabal-version: >=1.10 library- exposed-modules: Korg+ exposed-modules: Korg.KorgBase+ Korg.VolcaBeats MFBTanzbar OtoBam Roland
− src/Korg.hs
@@ -1,69 +0,0 @@--- maquinitas-tidal--- parameters for instruments by Korg--module Korg where-- import Sound.Tidal.Params- import Sound.Tidal.Pattern-- volcaBeats :: Pattern String -> ControlPattern- volcaBeats = n . (subtract 60 . volcaBeatsMidiNote <$>)-- volcaBeatsMidiNote :: Num a => String -> a- volcaBeatsMidiNote "bd" = 36- volcaBeatsMidiNote "sd" = 38- volcaBeatsMidiNote "lt" = 43- volcaBeatsMidiNote "ht" = 50- volcaBeatsMidiNote "ch" = 42- volcaBeatsMidiNote "oh" = 46- volcaBeatsMidiNote "cp" = 39- volcaBeatsMidiNote "cl" = 75- volcaBeatsMidiNote "ag" = 67- volcaBeatsMidiNote "cr" = 49-- -- Korg MR-16 drum machine- mr16 :: Pattern String -> ControlPattern- mr16 = n . (subtract 60 . mr16MidiNote <$>)- mr16MidiNote :: Num a => String -> a- -- bass drum- mr16MidiNote "bd" = 35- -- rimshot- mr16MidiNote "rs" = 37- -- snare drum- mr16MidiNote "sd" = 38- -- clap- mr16MidiNote "cp" = 39- -- low tom- mr16MidiNote "lt" = 41- -- closed hihat- mr16MidiNote "ch" = 42- -- open hihat- mr16MidiNote "oh" = 46- -- high tom- mr16MidiNote "ht" = 47- -- crash- mr16MidiNote "cr" = 49- -- ride- mr16MidiNote "rd" = 51- -- low conga- mr16MidiNote "lc" = 52- -- high conga- mr16MidiNote "hc" = 53- -- tambourine- mr16MidiNote "ta" = 54- -- cow bell- mr16MidiNote "cb" = 56- -- timbale- mr16MidiNote "ti" = 57- -- cabasa- mr16MidiNote "ca" = 58- -- wood block- mr16MidiNote "wb" = 60- -- low agogo- mr16MidiNote "la" = 61- -- high agogo- mr16MidiNote "ha" = 63- -- metronome piano- mr16MidiNote "mp" = 64- -- metronome forte- mr16MidiNote "mf" = 65
+ src/Korg/KorgBase.hs view
@@ -0,0 +1,6 @@+-- maquinitas-tidal+-- parameters for instruments by Korg++module Korg.KorgBase where++ korgBase = "jeje"
+ src/Korg/VolcaBeats.hs view
@@ -0,0 +1,100 @@+-- maquinitas-tidal+-- parameters for instruments by Korg++module Korg.VolcaBeats where++ import Korg.KorgBase+ import Sound.Tidal.Params+ import Sound.Tidal.Pattern ++ midiNote :: Pattern String -> ControlPattern+ midiNote = n . (subtract 60 . volcaBeatsMidiNote <$>)++ volcaBeatsMidiNote :: Num a => String -> a+ volcaBeatsMidiNote "bd" = 36+ volcaBeatsMidiNote "sd" = 38+ volcaBeatsMidiNote "lt" = 43+ volcaBeatsMidiNote "ht" = 50+ volcaBeatsMidiNote "ch" = 42+ volcaBeatsMidiNote "oh" = 46+ volcaBeatsMidiNote "cp" = 39+ volcaBeatsMidiNote "cl" = 75+ volcaBeatsMidiNote "ag" = 67+ volcaBeatsMidiNote "cr" = 49++ -- Korg MR-16 drum machine+ mr16 :: Pattern String -> ControlPattern+ mr16 = n . (subtract 60 . mr16MidiNote <$>)+ mr16MidiNote :: Num a => String -> a+ -- bass drum+ mr16MidiNote "bd" = 35+ -- rimshot+ mr16MidiNote "rs" = 37+ -- snare drum+ mr16MidiNote "sd" = 38+ -- clap+ mr16MidiNote "cp" = 39+ -- low tom+ mr16MidiNote "lt" = 41 + -- closed hihat+ mr16MidiNote "ch" = 42+ -- open hihat+ mr16MidiNote "oh" = 46+ -- high tom+ mr16MidiNote "ht" = 47+ -- crash+ mr16MidiNote "cr" = 49+ -- ride+ mr16MidiNote "rd" = 51+ -- low conga+ mr16MidiNote "lc" = 52+ -- high conga+ mr16MidiNote "hc" = 53+ -- tambourine+ mr16MidiNote "ta" = 54+ -- cow bell+ mr16MidiNote "cb" = 56+ -- timbale+ mr16MidiNote "ti" = 57+ -- cabasa+ mr16MidiNote "ca" = 58+ -- wood block+ mr16MidiNote "wb" = 60+ -- low agogo+ mr16MidiNote "la" = 61+ -- high agogo+ mr16MidiNote "ha" = 63+ -- metronome piano+ mr16MidiNote "mp" = 64+ -- metronome forte+ mr16MidiNote "mf" = 65+++ -- ccv xx # ccn yy+ -- ccn: cc param number+ -- ccv: cc value (0 to 127)++ ccn_num_1 m =+ ([ 1 | m == "aa" ] +++ [ 2 | m == "bb" ] +++ [ 3 | m == "cc" ] +++ [ 4 | m == "dd" ] +++ [ 5 ])!!0++ ccn_num_2 m+ | m == "aa" = 1+ | m == "bb" = 2+ | m == "cc" = 3+ | m == "dd" = 4+ | otherwise = 5+ + -- ccn_num :: Pattern String -> ControlPattern+ ccn_num m =+ case m of+ "aa" -> 1+ "bb" -> 2+ "cc" -> 3+ "dd" -> 4+ _ -> 5+ + ccparam m v = "ccv " ++ (show v) ++ " # ccn " ++ (show (ccn_num m))