Skip to content

Instantly share code, notes, and snippets.

@triss
Created May 27, 2014 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save triss/1de097609dbe9fc4921b to your computer and use it in GitHub Desktop.
Save triss/1de097609dbe9fc4921b to your computer and use it in GitHub Desktop.
euclideanBeat :: Int -> Int -> [Int]
euclideanBeat hitSpacing length = take length (cycle ([1] ++ replicate (hitSpacing - 1) 0))
@frerich
Copy link

frerich commented May 27, 2014

euclideanBeat :: Int -> Int -> [Int]
euclideanBeat hitSpacing length = take length
                                . cycle
                                $ 1 : replicate (hitSpacing - 1) 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment