phonetic-languages-simplified-generalized-properties-array 0.3.0.0 → 0.4.0.0
raw patch · 3 files changed
+73/−36 lines, 3 filesdep ~phonetic-languages-phonetics-basicsdep ~phonetic-languages-rhythmicityPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: phonetic-languages-phonetics-basics, phonetic-languages-rhythmicity
API changes (from Hackage documentation)
Files
- ChangeLog.md +6/−0
- Phonetic/Languages/Array/General/PropertiesSyllablesG2.hs +65/−34
- phonetic-languages-simplified-generalized-properties-array.cabal +2/−2
ChangeLog.md view
@@ -27,3 +27,9 @@ ## 0.3.0.0 -- 2021-07-21 * Third version. Added the "w" and "x" lines support to the properties. ++## 0.4.0.0 -- 2021-07-28++* Fourth version. Added new properties ("c"-, "u"-, "v"-, "s"- and "t"-lines) to the module Phonetic.Languages.Array.General.PropertiesSyllablesG2.+Some code improvements (reduced duplication).+Changed the dependency boundaries for phonetic-languages-rhythmicity and phonetic-languages-phonetics-basics.
Phonetic/Languages/Array/General/PropertiesSyllablesG2.hs view
@@ -49,6 +49,7 @@ import Languages.Rhythmicity import Languages.Rhythmicity.Factor import Rhythmicity.TwoFourth+import Rhythmicity.PolyRhythm import Data.Phonetic.Languages.Base import Data.Phonetic.Languages.Syllables import Data.Maybe (isNothing,fromMaybe)@@ -221,42 +222,67 @@ -> Double rhythmicity k choice h CF0 | choice `elem` ["0z","02z","03z","04z"] = rhythmicity0Fi f k- | take 1 choice == "w" = case choice of- "w01" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 1 1 4) (Rhythm 1 1 2) . mconcat)- "w02" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 1 1 4) (Rhythm 1 1 2) . mconcat)- "w03" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 1 1 4) (Rhythm 1 1 2) . mconcat)- "w04" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 1 1 4) (Rhythm 1 1 2) . mconcat)- "w11" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 1 0 4) (Rhythm 2 1 1) . mconcat)- "w12" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 1 0 4) (Rhythm 2 1 1) . mconcat)- "w13" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 1 0 4) (Rhythm 2 1 1) . mconcat)- "w14" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 1 0 4) (Rhythm 2 1 1) . mconcat)- "w21" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 1 4) (Rhythm 1 2 1) . mconcat)- "w22" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 1 4) (Rhythm 1 2 1) . mconcat)- "w23" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 1 4) (Rhythm 1 2 1) . mconcat)- "w24" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 1 4) (Rhythm 1 2 1) . mconcat)- "w31" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)- "w32" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)- "w33" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)- "w34" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)+ | take 1 choice == "w" = case take 2 choice of+ "w0" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 1 1 4) (Rhythm 1 1 2) . mconcat)+ "w1" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 1 0 4) (Rhythm 2 1 1) . mconcat)+ "w2" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 1 4) (Rhythm 1 2 1) . mconcat)+ "w3" -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat) _ -> rhythmicityG f (rhythmicityABC0 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)- | take 1 choice == "x" = case choice of- "x01" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 1 1 4) (Rhythm 1 1 2) . mconcat)- "x02" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 1 1 4) (Rhythm 1 1 2) . mconcat)- "x03" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 1 1 4) (Rhythm 1 1 2) . mconcat)- "x04" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 1 1 4) (Rhythm 1 1 2) . mconcat)- "x11" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 1 0 4) (Rhythm 2 1 1) . mconcat)- "x12" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 1 0 4) (Rhythm 2 1 1) . mconcat)- "x13" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 1 0 4) (Rhythm 2 1 1) . mconcat)- "x14" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 1 0 4) (Rhythm 2 1 1) . mconcat)- "x21" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 1 4) (Rhythm 1 2 1) . mconcat)- "x22" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 1 4) (Rhythm 1 2 1) . mconcat)- "x23" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 1 4) (Rhythm 1 2 1) . mconcat)- "x24" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 1 4) (Rhythm 1 2 1) . mconcat)- "x31" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)- "x32" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)- "x33" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)- "x34" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)+ | take 1 choice == "x" = case take 2 choice of+ "x0" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 1 1 4) (Rhythm 1 1 2) . mconcat)+ "x1" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 1 0 4) (Rhythm 2 1 1) . mconcat)+ "x2" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 1 4) (Rhythm 1 2 1) . mconcat)+ "x3" -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat) _ -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)+ | take 1 choice == "c" = let just_probe = readRhythmicity choice in+ case just_probe of+ Just (P1 ch rh _) -> rhythmicityG f (rhythmicityABC 1.0 2.0 0.125 ch rh . mconcat)+ Just (P2 ch rh r _) -> rhythmicityG f (rhythmicityPoly 1.0 r ch rh . mconcat)+ _ -> rhythmicity0i f+ | take 1 choice == "u" =+ case take 2 choice of+ "u0" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,True,True] 5) (PolyRhythm [1,2,1,1]) . mconcat)+ "u1" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,True,False] 5) (PolyRhythm [1,2,1,1]) . mconcat)+ "u2" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,False,True] 5) (PolyRhythm [1,2,1,1]) . mconcat)+ "u3" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,False,False] 5) (PolyRhythm [1,2,1,1]) . mconcat)+ "u4" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,True,True] 5) (PolyRhythm [2,1,1,1]) . mconcat)+ "u5" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,True,False] 5) (PolyRhythm [2,1,1,1]) . mconcat)+ "u6" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,False,True] 5) (PolyRhythm [2,1,1,1]) . mconcat)+ "u7" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,False,False] 5) (PolyRhythm [2,1,1,1]) . mconcat)+ _ -> rhythmicity0i f+ | take 1 choice == "v" =+ case take 2 choice of+ "v0" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,True,True] 5) (PolyRhythm [1,2,1,1]) . mconcat)+ "v1" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,True,False] 5) (PolyRhythm [1,2,1,1]) . mconcat)+ "v2" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,False,True] 5) (PolyRhythm [1,2,1,1]) . mconcat)+ "v3" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,False,False] 5) (PolyRhythm [1,2,1,1]) . mconcat)+ "v4" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,True,True] 5) (PolyRhythm [2,1,1,1]) . mconcat)+ "v5" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,True,False] 5) (PolyRhythm [2,1,1,1]) . mconcat)+ "v6" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,False,True] 5) (PolyRhythm [2,1,1,1]) . mconcat)+ "v7" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,False,False] 5) (PolyRhythm [2,1,1,1]) . mconcat)+ _ -> rhythmicity0i f+ | take 1 choice == "s" =+ case take 2 choice of+ "s0" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,True,True] 6) (PolyRhythm [1,2,1,2]) . mconcat)+ "s1" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,True,False] 6) (PolyRhythm [1,2,1,2]) . mconcat)+ "s2" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,False,True] 6) (PolyRhythm [1,2,1,2]) . mconcat)+ "s3" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,False,False] 6) (PolyRhythm [1,2,1,2]) . mconcat)+ "s4" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,True,True] 6) (PolyRhythm [2,1,1,2]) . mconcat)+ "s5" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,True,False] 6) (PolyRhythm [2,1,1,2]) . mconcat)+ "s6" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,False,True] 6) (PolyRhythm [2,1,1,2]) . mconcat)+ "s7" -> rhythmicityG f (rhythmicityPoly 1.0 4 (PolyCh [True,False,False] 6) (PolyRhythm [2,1,1,2]) . mconcat)+ _ -> rhythmicity0i f+ | take 1 choice == "t" =+ case take 2 choice of+ "t0" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,True,True] 6) (PolyRhythm [1,2,1,2]) . mconcat)+ "t1" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,True,False] 6) (PolyRhythm [1,2,1,2]) . mconcat)+ "t2" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,False,True] 6) (PolyRhythm [1,2,1,2]) . mconcat)+ "t3" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,False,False] 6) (PolyRhythm [1,2,1,2]) . mconcat)+ "t4" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,True,True] 6) (PolyRhythm [2,1,1,2]) . mconcat)+ "t5" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,True,False] 6) (PolyRhythm [2,1,1,2]) . mconcat)+ "t6" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,False,True] 6) (PolyRhythm [2,1,1,2]) . mconcat)+ "t7" -> rhythmicityG f (rhythmicityPoly0 1.0 4 (PolyCh [True,False,False] 6) (PolyRhythm [2,1,1,2]) . mconcat)+ _ -> rhythmicity0i f | otherwise = rhythmicity0i f where f = h k choice rhythmicity k choice h (CF2 x y)@@ -297,5 +323,10 @@ "x33" -> rhythmicityG f (rhythmicityABC 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) (Ch 0 0 4) (Rhythm 1 1 2) . mconcat) "x34" -> rhythmicityG f (rhythmicityABC 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) (Ch 0 0 4) (Rhythm 1 1 2) . mconcat) _ -> rhythmicityG f (rhythmicityABC 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) (Ch 0 0 4) (Rhythm 1 1 2) . mconcat)+ | take 1 choice == "c" = rhythmicity k choice h CF0+ | take 1 choice == "u" = rhythmicity k choice h CF0+ | take 1 choice == "v" = rhythmicity k choice h CF0+ | take 1 choice == "s" = rhythmicity k choice h CF0+ | take 1 choice == "t" = rhythmicity k choice h CF0 | otherwise = rhythmicityKi f (fromMaybe 1.0 x) (fromMaybe 1.0 y) where f = h k choice
phonetic-languages-simplified-generalized-properties-array.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/ name: phonetic-languages-simplified-generalized-properties-array-version: 0.3.0.0+version: 0.4.0.0 synopsis: Some 'properties' of the phonetic languages approach text. description: Generalizes the functionality of the https://hackage.haskell.org/package/phonetic-languages-simplified-properties-array homepage: https://hackage.haskell.org/package/phonetic-languages-simplified-generalized-properties-array@@ -21,6 +21,6 @@ exposed-modules: Phonetic.Languages.Array.General.PropertiesFuncRepG2, Phonetic.Languages.Array.General.PropertiesSyllablesG2 -- other-modules: other-extensions: CPP, BangPatterns- build-depends: base >=4.8 && <4.15, phonetic-languages-simplified-base >=0.2 && <1, phonetic-languages-rhythmicity >=0.3.2 && <1, phonetic-languages-phonetics-basics >=0.7 && <1+ build-depends: base >=4.8 && <4.15, phonetic-languages-simplified-base >=0.2 && <1, phonetic-languages-rhythmicity >=0.5 && <1, phonetic-languages-phonetics-basics >=0.8.1 && <1 -- hs-source-dirs: default-language: Haskell2010