packages feed

tidal 1.7.5 → 1.7.6

raw patch · 5 files changed

+31/−18 lines, 5 filesdep ~hosc

Dependency ranges changed: hosc

Files

CHANGELOG.md view
@@ -1,5 +1,10 @@ # TidalCycles log of changes +## 1.7.6 - Tunnocks+   * Fix dot shorthand in int patterns so floating point numbers raise an error @ndr-brt+   * Support factors in ratio shorthand for rational patterns @ndr-brt+   * support hosc 0.19 @yaxu+ ## 1.7.5 - Dalbeattie    * Minor change to _splice so that it respects if the speed parameter was already declared @onthepeakofnormal    * Some tests for chords @cleary
src/Sound/Tidal/ParseBP.hs view
@@ -439,7 +439,7 @@  pDouble :: MyParser (TPat Double) pDouble = wrapPos $ do s <- sign-                       f <- choice [intOrFloat, pRatioChar, parseNote] <?> "float"+                       f <- choice [fromRational <$> pRatio, intOrFloat, parseNote] <?> "float"                        let v = applySign s f                        do TPat_Stack . map (TPat_Atom Nothing . (+ v)) <$> parseChord                          <|> return (TPat_Atom Nothing v)@@ -453,7 +453,7 @@                                         do TPat_Stack . map (TPat_Atom Nothing . (+ v)) <$> parseChord                                            <|> return (TPat_Atom Nothing v)                                      <|> do TPat_Stack . map (TPat_Atom Nothing) <$> parseChord-                                     <|> do TPat_Atom Nothing <$> pRatioChar+                                     <|> do TPat_Atom Nothing . fromRational <$> pRatio  pBool :: MyParser (TPat Bool) pBool = wrapPos $ do oneOf "t1"@@ -464,13 +464,12 @@  parseIntNote  :: Integral i => MyParser i parseIntNote = do s <- sign-                  i <- choice [integer, parseNote]-                  return $ applySign s $ fromIntegral i--parseInt :: MyParser Int-parseInt = do s <- sign-              i <- integer-              return $ applySign s $ fromIntegral i+                  d <- choice [intOrFloat, parseNote]+                  if isInt d+                    then return $ applySign s $ round d+                    else fail "not an integer"+                where+                  isInt x = x == fromInteger (round x)  pIntegral :: Integral a => MyParser (TPat a) pIntegral = wrapPos $ do i <- parseIntNote@@ -564,6 +563,9 @@                         <|> return (TPat_Atom Nothing 0)                    return (a, b, c) +pRational :: MyParser (TPat Rational)+pRational = wrapPos $ TPat_Atom Nothing <$> pRatio+ pRatio :: MyParser Rational pRatio = do    s <- sign@@ -586,7 +588,7 @@   return $ applySign s r  pRatioChar :: Fractional a => MyParser a-pRatioChar = do char 'w'+pRatioChar = do char 'w';                 return 1              <|> do char 'h'                     return 0.5@@ -602,6 +604,3 @@                     return 0.2              <|> do char 'x'                     return (1/6)--pRational :: MyParser (TPat Rational)-pRational = wrapPos $ TPat_Atom Nothing <$> pRatio
src/Sound/Tidal/Version.hs view
@@ -21,7 +21,7 @@ -}  tidal_version :: String-tidal_version = "1.7.5"+tidal_version = "1.7.6"  tidal_status :: IO () tidal_status = tidal_status_string >>= putStrLn 
test/Sound/Tidal/ParseTest.hs view
@@ -2,11 +2,13 @@  module Sound.Tidal.ParseTest where -import TestUtils import Test.Microspec+import TestUtils+import Control.Exception  import Prelude hiding ((<*), (*>)) +import Sound.Tidal.ExceptionsTest (shouldThrow, anyException) import Sound.Tidal.Core import Sound.Tidal.Pattern import Sound.Tidal.UI (_degradeBy)@@ -139,6 +141,10 @@         compareP (Arc 0 1)           ("h -h" :: Pattern Double)           ("0.5 -0.5" :: Pattern Double)+      it "can parse multiplied ratio shorthands" $ do+        compareP (Arc 0 1)+          ("3h -2q 1.5q" :: Pattern Double)+          ("1.5 -0.5 0.375" :: Pattern Double)       it "doesn't crash on zeroes (1)" $ do         compareP (Arc 0 2)           ("cp/0" :: Pattern String)@@ -151,4 +157,7 @@         compareP (Arc 0 2)           ("cp(5,c)" :: Pattern String)           (silence)-    where degradeByDefault = _degradeBy 0.5  +      it "can't parse a floating point number as int" $ do+        evaluate ("1.5" :: Pattern Int)+          `shouldThrow` anyException+    where degradeByDefault = _degradeBy 0.5
tidal.cabal view
@@ -1,5 +1,5 @@ name:                tidal-version:             1.7.5+version:             1.7.6 synopsis:            Pattern language for improvised music description:         Tidal is a domain specific language for live coding patterns. homepage:            http://tidalcycles.org/@@ -52,7 +52,7 @@       base >=4.8 && <5     , containers < 0.7     , colour < 2.4-    , hosc >= 0.17 && < 0.19+    , hosc >= 0.17 && < 0.20     , text < 1.3     , parsec >= 3.1.12 && < 3.2     , network < 3.2