Permalink
Browse files

Merge branch 'master' of github.com:yaxu/smooth

  • Loading branch information...
2 parents 003cfae + 8a0eb58 commit 722829d0351ffa913e52af0c46b4b4bded895fc2 @yaxu committed Mar 13, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 Pattern.hs
View
@@ -84,6 +84,11 @@ class Patternable p where
instance Patternable [] where
toPattern xs = Cycle ps
where
+<<<<<<< HEAD
+ n = length xs
+ ps = zipWith mkArc xs [0..]
+ mkArc x i = Arc (Atom x) ((fromIntegral i) / (fromIntegral n)) Nothing
+=======
ps = map (\x -> Arc {pattern = Atom $ xs !! x,
onset = (fromIntegral x) %
(fromIntegral l),
@@ -92,6 +97,7 @@ instance Patternable [] where
}
) [0 .. l - 1]
l = length xs
+>>>>>>> b19758be4822b9ce98811259887619554c8717c9
{-size :: Pattern a -> Double
size (Atom {}) = 1

0 comments on commit 722829d

Please sign in to comment.