packages feed

tidal 0.4.9 → 0.4.10

raw patch · 4 files changed

+19/−17 lines, 4 files

Files

Sound/Tidal/Strategies.hs view
@@ -12,7 +12,6 @@ import Sound.Tidal.Time import Sound.Tidal.Utils import qualified Sound.OSC.FD as OSC.FD-import Sound.OSC.Datum  stutter n t p = stack $ map (\i -> (t * (fromIntegral i)) ~> p) [0 .. (n-1)] @@ -119,14 +118,12 @@ scale :: (Functor f, Num b) => b -> b -> f b -> f b scale from to p = ((+ from) . (* (to-from))) <$> p - chop :: Int -> OscPattern -> OscPattern-chop n p = Pattern $ \a -> concatMap f $ arcCycles a-     where f a = concatMap chopEvent (arc p a)-           chopEvent (a,a',v) = map (newEvent v) $ filter ((isIn a') . fst) (chopArc a n)-           chopArc :: Arc -> Int -> [Arc]-           chopArc (s, e) n = map (\i -> ((s + d*(fromIntegral i)), s + d*(fromIntegral $ i+1))) [0 .. n-1]-                   where d = e - s-           newEvent :: OscMap -> Arc -> Event OscMap-           newEvent v a = (a,a,Map.insert (param dirt "begin") (Just $ OSC.FD.float 0) v)+chop n p = Pattern $ \queryA -> concatMap (f queryA) $ arcCycles queryA+     where f queryA a = concatMap (chopEvent queryA) (arc p a)+           chopEvent (queryS, queryE) (a,a',v) = map (newEvent v) $ filter (\(_, (s,e)) -> not $ or [e < queryS, s >= queryE]) (enumerate $ chopArc a n)+           newEvent :: OscMap -> (Int, Arc) -> Event OscMap+           newEvent v (i, a) = (a,a,Map.insert (param dirt "end") (Just $ OSC.FD.float ((fromIntegral $ i+1)/(fromIntegral n))) $ Map.insert (param dirt "begin") (Just $ OSC.FD.float ((fromIntegral i)/(fromIntegral n))) v) +chopArc :: Arc -> Int -> [Arc]+chopArc (s, e) n = map (\i -> ((s + (e-s)*(fromIntegral i/fromIntegral n)), s + (e-s)*((fromIntegral $ i+1)/fromIntegral n))) [0 .. n-1]
doc/tidal.md view
@@ -176,17 +176,19 @@  # Tempo -You can change the beats per second (bps) like this:+You can change the cycles per second (cps) like this:  ~~~~ {.haskell}-bps 1+cps 0.5 ~~~~ -If you prefer to think in beats per minute, simply divide by 60+The above would give a rate of one cycle every two seconds. If you prefer to think in cycles per minute, simply divide by 60:  ~~~~ {.haskell}-bps (140 / 60)+cps (30 / 60) ~~~~++If you wish to think in terms of 'beats' rather than cycles, then decide how many beats per cycle you expect to work with, and divide accordingly.  # Samples 
tidal.cabal view
@@ -1,5 +1,5 @@ name:                tidal-version:             0.4.9+version:             0.4.10 synopsis:            Pattern language for improvised music -- description:          homepage:            http://yaxu.org/tidal/
tidal.el view
@@ -57,8 +57,8 @@   (tidal-send-string ":set prompt \"\"")   (tidal-send-string ":module Sound.Tidal.Context") ;  (tidal-send-string "import Volca.Beat")-  (tidal-send-string "import Volca.Key")-  (tidal-send-string "(note, [portamento, expression, voice, octave, detune, vcoegint, kcutoff, vcfegint, lforate, lfopitchint, lfocutoffint, attack, decay, sustain, dtime , dfeedback], keystop) <- keystart")+;  (tidal-send-string "import Volca.Key")+;  (tidal-send-string "(note, [portamento, expression, voice, octave, detune, vcoegint, kcutoff, vcfegint, lforate, lfopitchint, lfocutoffint, attack, decay, sustain, dtime , dfeedback], keystop) <- keystart") ;  (tidal-send-string "(drum, [clapSpeed, clavesSpeed, agogoSpeed, crashSpeed, stutterTime, stutterDepth, tomDecay, clhatDecay, ophatDecay, hatGrain], beatstop) <- startbeat")   (tidal-send-string "d1 <- dirtStream")   (tidal-send-string "d2 <- dirtStream")@@ -136,6 +136,9 @@   (tidal-send-string "now' <- getNow")   (tidal-send-string "let now = nextSam now'")   (tidal-send-string "let retrig = (now ~>)")+  (tidal-send-string "let fadeOut n = spread' (degradeBy) (retrig $ slow n $ envL)")+  (tidal-send-string "let fadeIn n = spread' (degradeBy) (retrig $ slow n $ (1-) <$> envL)")+   )  (defun tidal-run-line ()