Skip to content
Browse files

striateO

  • Loading branch information...
1 parent 2471f3b commit bf46c566cff2a926b89ce4579e10fe2dedc4d7ec @yaxu committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 Dirt.hs
View
4 Dirt.hs
@@ -46,3 +46,7 @@ striate :: OscPattern -> Int -> OscPattern
striate p n = cat $ map (\x -> off (fromIntegral x) p) [0 .. n-1]
where off i p = p ~~ begin (Atom (fromIntegral i / fromIntegral n)) ~~ end (Atom (fromIntegral (i+1) / 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) ~~ end (Atom $ (fromIntegral (i+1) / fromIntegral n) + o)
+

0 comments on commit bf46c56

Please sign in to comment.
Something went wrong with that request. Please try again.