You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rands :: Fractional a => Int -> Pattern [a]
rands k = Pattern $ \(State a@(Arc s e) _)
-> [Event (Context []) Nothing a (map realToFrac $ (timeToRands ((e + s)/2) k :: [Double]))]
randrun' :: Int -> Pattern Int
randrun' n = segment 1 (rands n) >>= \ rs ->
let go [] [] = []
go (r:rs) xs =
let i = floor (r * fromIntegral (length xs))
(pre, p:ost) = splitAt i xs
in p : go rs (pre <> ost)
in fastcat $ map pure $ go rs [0 .. n-1]
The text was updated successfully, but these errors were encountered:
see discussion at https://club.tidalcycles.org/t/randomness-at-the-beginnings-of-time-function-randrun/5060/2
possible alternate implementation
The text was updated successfully, but these errors were encountered: