rhythmic-sequences 0.2.0.1 → 0.2.1.0
raw patch · 3 files changed
+12/−6 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- rhythmic-sequences.cabal +1/−1
- src/Rhythmicity/MarkerSeqs.hs +6/−5
CHANGELOG.md view
@@ -31,3 +31,8 @@ * Second version revised A. Some documentation improvement. +## 0.2.1.9 -- 2023-03-11++* Second version revised B. Changed the defaults for the new functions. Added the possibility to+ parse the '-' sign into the negative second parameter in HashCorrections.+
rhythmic-sequences.cabal view
@@ -2,7 +2,7 @@ name: rhythmic-sequences -- The package version.-version: 0.2.0.1+version: 0.2.1.0 -- A short (one-line) description of the package. synopsis:
src/Rhythmicity/MarkerSeqs.hs view
@@ -146,7 +146,7 @@ hashList (H xs _) = xs `mappend` cycle [0] {-# INLINE hashList #-} --- | If you would like to specify just your own values then specify the 'String' \"3...\" where+-- | If you would like to specify just your own values then specify the 'String' \"0...\" where -- instead of dots specify some digits that are the beginning of the ['Int8'] list in -- 'HashCorrections'. -- Caution: @@ -157,13 +157,14 @@ -- -- in general case. The default value is @H [0,0..] 0@. readHashCorrections :: String -> HashCorrections-readHashCorrections xs = if length ys > 1 then let (ts,us) = splitAt 1 ys in H (map (\x -> read [x]::Int8) us) (read ts::Int8) else H [0,0..] 0+readHashCorrections xs = if length ys > 1 then let (ts,us) = splitAt 1 ys in H (map (\x -> read [x]::Int8) us) (if sgn then (-(read ts::Int8)) else (read ts::Int8)) else H [0,0..] 0 where ys = filter (\x -> isDigit x) xs+ sgn = any (== '-') xs --- | This is used to provide the second and the third argument to 'countHashesG' function. The--- default value is @(2,[2,1])@ that should be related to disyllables metrical feet.+-- | This is used to provide the second and the third arguments to 'countHashesG' function. The+-- default value is @(4,[4,3])@ that should be related to disyllables metrical feet. grouppingR :: String -> (Int8, [Int8])-grouppingR xs = if length ys > 1 then let (ts,us) = splitAt 1 ys in (read ts::Int8, map (\x -> read [x]::Int8) us) else (2,[2,1])+grouppingR xs = if length ys > 1 then let (ts,us) = splitAt 1 ys in (read ts::Int8, map (\x -> read [x]::Int8) us) else (4,[4,3]) where ys = take 8 . filter (\x -> isDigit x) $ xs -- | General implementation of the hash-based algorithm to evaluate the level of rhythmicity