tidal 1.0.11 → 1.0.12
raw patch · 6 files changed
+33/−5 lines, 6 files
Files
- CHANGELOG.md +6/−1
- src/Sound/Tidal/EspGrid.hs +5/−2
- src/Sound/Tidal/UI.hs +13/−0
- src/Sound/Tidal/Version.hs +1/−1
- test/Sound/Tidal/UITest.hs +7/−0
- tidal.cabal +1/−1
CHANGELOG.md view
@@ -1,6 +1,11 @@ # TidalCycles log of changes -## 1.0.11 - as yet unnamed+## 1.0.12 - 🐝⌛️🦋++* Fix ESPGrid support - @dktr0+* Add 'snowbal'' function - @XiNNiW++## 1.0.11 - Cros Bríde 2019-04-17 Alex McLean <alex@slab.org> * Add `bite` function for slicing patterns (rather than samples)
src/Sound/Tidal/EspGrid.hs view
@@ -17,7 +17,7 @@ n :: Integer <- datum_integral (d!!4) let nanos = (t1*1000000000) + t2 return $ \t -> t { - atTime = realToFrac nanos / 1000000000, + atTime = ut_to_ntpr $ realToFrac nanos / 1000000000, atCycle = fromIntegral n, cps = bpm/60, paused = on == 0 @@ -26,7 +26,10 @@ changeTempo :: MVar Tempo -> Packet -> IO () changeTempo t (Packet_Message msg) = case parseEspTempo (messageDatum msg) of - Just f -> takeMVar t >>= putMVar t . f + Just f -> do + t0 <- takeMVar t + let t1 = f t0 + putMVar t t1 Nothing -> putStrLn "Warning: Unable to parse message (likely from EspGrid) as Tempo" changeTempo _ _ = putStrLn "Serious error: Can only process Packet_Message"
src/Sound/Tidal/UI.hs view
@@ -1734,6 +1734,19 @@ swap :: Eq a => [(a, b)] -> Pattern a -> Pattern b swap things p = filterJust $ (`lookup` things) <$> p +{-+ snowball |+ snowball takes a function that can combine patterns (like '+'),+ a function that transforms a pattern (like 'slow'),+ a depth, and a starting pattern,+ it will then transform the pattern and combine it with the last transformation until the depth is reached+ this is like putting an effect (like a filter) in the feedback of a delay line+ each echo is more effected+ d1 $ note (scale "hexDorian" $ snowball (+) (slow 2 . rev) 8 "0 ~ . -1 . 5 3 4 . ~ -2") # s "gtr"+-}+snowball :: Int -> (Pattern a -> Pattern a -> Pattern a) -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a+snowball depth combinationFunction f pattern = cat $ take depth $ scanl combinationFunction pattern $ iterate f pattern+ {- @soak@ | applies a function to a pattern and cats the resulting pattern, then continues applying the function until the depth is reached
src/Sound/Tidal/Version.hs view
@@ -1,4 +1,4 @@ module Sound.Tidal.Version where tidal_version :: String-tidal_version = "1.0.11"+tidal_version = "1.0.12"
test/Sound/Tidal/UITest.hs view
@@ -179,6 +179,13 @@ (euclidFull 3 8 "bd" silence) ("bd(3,8)" :: Pattern String) + describe "snowball" $ do+ let testPattern = ("1 2 3 4"::Pattern Int)+ it "acummulates a transform version of a pattern and appends the result - addition" $ do+ compareP (Arc 0 1)+ (snowball 3 (+) (slow 2) (testPattern))+ (cat [testPattern,(testPattern+(slow 2 testPattern)),((testPattern+(slow 2 testPattern))+slow 2 (testPattern+(slow 2 testPattern)))])+ describe "soak" $ do it "applies a transform and then appends the result -- addition" $ do compareP (Arc 0 3)
tidal.cabal view
@@ -1,5 +1,5 @@ name: tidal-version: 1.0.11+version: 1.0.12 synopsis: Pattern language for improvised music -- description: homepage: http://tidalcycles.org/