Skip to content

Commit

Permalink
rename cutgroup to cut, and make dirtStream which is the same as dirt…
Browse files Browse the repository at this point in the history
…stream but without a pointless parameter
  • Loading branch information
yaxu committed Feb 7, 2014
1 parent 358aa19 commit 09b3c94
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
13 changes: 8 additions & 5 deletions Sound/Tidal/Dirt.hs
Expand Up @@ -34,7 +34,7 @@ dirt = OscShape {path = "/play",
F "shape" (Just 0),
I "kriole" (Just 0),
F "gain" (Just 0),
I "cutgroup" (Just 0)
I "cut" (Just (0))
],
timestamp = True
}
Expand All @@ -49,7 +49,11 @@ kriole = OscShape {path = "/trigger",
}

dirtstart name = start "127.0.0.1" 7771 dirt
dirtstream name = stream "127.0.0.1" 7771 dirt
dirtStream = stream "127.0.0.1" 7771 dirt

-- disused parameter..
dirtstream _ = dirtStream

kstream name = stream "127.0.0.1" 6040 kriole

doubledirt = do remote <- stream "178.77.72.138" 7777 dirt
Expand Down Expand Up @@ -102,8 +106,8 @@ accellerate = makeF dirt "accellerate"
shape = makeF dirt "shape"
gain = makeF dirt "gain"

cutgroup :: Pattern Int -> OscPattern
cutgroup = makeI dirt "cutgroup"
cut :: Pattern Int -> OscPattern
cut = makeI dirt "cut"

ksymbol = makeF kriole "ksymbol"
kpitch = makeF kriole "kpitch"
Expand All @@ -123,7 +127,6 @@ striate' n f p = cat $ map (\x -> off (fromIntegral x) p) [0 .. n-1]
where off i p = p |+| begin (atom (slot * i) :: Pattern Double) |+| end (atom ((slot * i) + f) :: Pattern Double)
slot = (1 - f) / (fromIntegral n)


striateO :: OscPattern -> Int -> Double -> OscPattern
striateO p n o = cat $ map (\x -> off (fromIntegral x) p) [0 .. n-1]
where off i p = p |+| begin ((atom $ (fromIntegral i / fromIntegral n) + o) :: Pattern Double) |+| end ((atom $ (fromIntegral (i+1) / fromIntegral n) + o) :: Pattern Double)
Expand Down
18 changes: 9 additions & 9 deletions tidal.el
Expand Up @@ -56,15 +56,15 @@
(tidal-see-output))
(tidal-send-string ":set prompt \"\"")
(tidal-send-string ":module Sound.Tidal.Context")
(tidal-send-string "d1 <- dirtstream \"d1\"")
(tidal-send-string "d2 <- dirtstream \"d2\"")
(tidal-send-string "d3 <- dirtstream \"d3\"")
(tidal-send-string "d4 <- dirtstream \"d4\"")
(tidal-send-string "d5 <- dirtstream \"d5\"")
(tidal-send-string "d6 <- dirtstream \"d6\"")
(tidal-send-string "d7 <- dirtstream \"d7\"")
(tidal-send-string "d8 <- dirtstream \"d8\"")
(tidal-send-string "d9 <- dirtstream \"d9\"")
(tidal-send-string "d1 <- dirtStream")
(tidal-send-string "d2 <- dirtStream")
(tidal-send-string "d3 <- dirtStream")
(tidal-send-string "d4 <- dirtStream")
(tidal-send-string "d5 <- dirtStream")
(tidal-send-string "d6 <- dirtStream")
(tidal-send-string "d7 <- dirtStream")
(tidal-send-string "d8 <- dirtStream")
(tidal-send-string "d9 <- dirtStream")
(tidal-send-string "bps <- bpsSetter")
(tidal-send-string "let hush = mapM_ ($ silence) [d1,d2,d3,d4,d5,d6,d7,d8,d9]")
(tidal-send-string ":set prompt \"tidal> \"")
Expand Down

0 comments on commit 09b3c94

Please sign in to comment.