dobutokO2 0.39.0.1 → 0.39.1.0
raw patch · 3 files changed
+41/−17 lines, 3 filesdep ~basedep ~directorydep ~mmsyn2PVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, directory, mmsyn2, mmsyn3, mmsyn6ukr, mmsyn7s, mmsyn7ukr, process
API changes (from Hackage documentation)
+ DobutokO.Sound.Functional: isListParams :: [Int] -> Params -> Bool
+ DobutokO.Sound.Functional: isStrParams :: String -> Params -> Bool
Files
- CHANGELOG.md +7/−0
- DobutokO/Sound/Functional.hs +31/−14
- dobutokO2.cabal +3/−3
CHANGELOG.md view
@@ -367,3 +367,10 @@ ## 0.39.0.1 -- 2020-05-08 * Thirty-ninth version revised A. Some documentation improvements.++## 0.39.1.0 -- 2020-05-14++* Fortieth version. Changed bounds for the dependencies so that now also GHC 8.10* series are supported. Added new predicates to work with Params +to DobutokO.Sound.Functional module for better access to inner structure of it. Changed also a volume and durations of the sounds taken from +the loudness and durations respectively of the Ukrainian sounds representations in the mmsyn6ukr package accordingly to that ones of the new. +Some documentation improvements.
DobutokO/Sound/Functional.hs view
@@ -206,6 +206,8 @@ , elemP , elemCloseP , showD+ , isStrParams+ , isListParams -- ** Application of the Params , overSoXSynthGen2FDN_SG4GPar , overSoXSynthGen2FDN_SG6GPar@@ -1344,27 +1346,27 @@ -- | A conversion to the 'Double' that is used inside 'str2Durations'. str2Durat1 :: String -> Double-str2Durat1 = getBFst' ((-0.153016), V.fromList [("-", (-0.101995)), ("0", (-0.051020)), ("1", (-0.153016)), ("а", 0.138231), ("б", 0.057098), - ("в", 0.082268), ("г", 0.076825), ("д", 0.072063), ("дж", 0.048934), ("дз", 0.055601), ("е", 0.093605), ("ж", 0.070612), ("з", 0.056054), - ("и", 0.099955), ("й", 0.057143), ("к", 0.045397), ("л", 0.064036), ("м", 0.077370), ("н", 0.074240), ("о", 0.116463), ("п", 0.071837), +str2Durat1 = getBFst' ((-0.153016), V.fromList [("-", (-0.101995)), ("0", (-0.051020)), ("1", (-0.153016)), ("а", 0.138231), ("б", 0.057143), + ("в", 0.082268), ("г", 0.076825), ("д", 0.072063), ("дж", 0.048934), ("дз", 0.055601), ("е", 0.093605), ("ж", 0.070658), ("з", 0.056054), + ("и", 0.099955), ("й", 0.057143), ("к", 0.045351), ("л", 0.064036), ("м", 0.077370), ("н", 0.074240), ("о", 0.116463), ("п", 0.134830), ("р", 0.049206), ("с", 0.074603), ("сь", 0.074558), ("т", 0.110658), ("у", 0.109070), ("ф", 0.062268), ("х", 0.077188), ("ц", 0.053061), - ("ць", 0.089342), ("ч", 0.057551), ("ш", 0.066077), ("ь", 0.020227), ("і", 0.094150), ("ґ", 0.062948)])+ ("ць", 0.089342), ("ч", 0.057596), ("ш", 0.066077), ("ь", 0.020227), ("і", 0.094150), ("ґ", 0.062948)]) -- | A full conversion to the 'Strengths' from a Ukrainian text. str2Volume :: String -> Strengths-str2Volume = V.map (getBFst' (0.0, V.fromList [("а", 0.890533), ("б", 0.718872), ("в", (-0.630859)), ("г", (-0.757599)), ("д", (-0.624176)), - ("дж", 0.768127), ("дз", (-0.731262)), ("е", (-0.742523)), ("ж", (-0.837921)), ("з", (-0.528870)), ("и", (-0.770935)), ("й", (-0.708008)), - ("к", 0.886139), ("л", 0.572632), ("м", (-0.782349)), ("н", (-0.797607)), ("о", (-0.579559)), ("п", (-0.212402)), ("р", 0.651062), - ("с", 0.155640), ("сь", (-0.207764)), ("т", 0.304413), ("у", 0.718262), ("ф", (-0.374359)), ("х", (-0.251160)), ("ц", (-0.392365)), - ("ць", 0.381348), ("ч", 0.242615), ("ш", 0.251221), ("ь", 0.495483), ("і", 0.682709), ("ґ", 0.557098)])) . convertToProperUkrainian+str2Volume = V.map (getBFst' (0.0, V.fromList [("а", 0.890533), ("б", 0.211334), ("в", (-0.630859)), ("г", (-0.757599)), ("д", 0.884613), ("дж", 0.768127), + ("дз", (-0.731262)), ("е", (-0.742523)), ("ж", (-0.588959)), ("з", (-0.528870)), ("и", 0.770935), ("й", (-0.708008)), ("к", (-0.443085)), + ("л", 0.572632), ("м", (-0.782349)), ("н", (-0.797607)), ("о", (-0.579559)), ("п", 0.124908), ("р", 0.647369), ("с", 0.155640), ("сь", (-0.207764)), + ("т", -0.304443), ("у", 0.718262), ("ф", (-0.374359)), ("х", (-0.251160)), ("ц", (-0.392365)), ("ць", 0.381348), ("ч", (-0.189240)), + ("ш", 0.251221), ("ь", 0.495483), ("і", (-0.682709)), ("ґ", 0.557098)])) . convertToProperUkrainian -- | A conversion to the 'Double' that is used inside 'str2Volume'. str2Vol1 :: String -> Double-str2Vol1 = getBFst' (0.0, V.fromList [("а", 0.890533), ("б", 0.718872), ("в", (-0.630859)), ("г", (-0.757599)), ("д", (-0.624176)), - ("дж", 0.768127), ("дз", (-0.731262)), ("е", (-0.742523)), ("ж", (-0.837921)), ("з", (-0.528870)), ("и", (-0.770935)), ("й", (-0.708008)), - ("к", 0.886139), ("л", 0.572632), ("м", (-0.782349)), ("н", (-0.797607)), ("о", (-0.579559)), ("п", (-0.212402)), ("р", 0.651062), - ("с", 0.155640), ("сь", (-0.207764)), ("т", 0.304413), ("у", 0.718262), ("ф", (-0.374359)), ("х", (-0.251160)), ("ц", (-0.392365)), - ("ць", 0.381348), ("ч", 0.242615), ("ш", 0.251221), ("ь", 0.495483), ("і", 0.682709), ("ґ", 0.557098)]) . V.unsafeHead . convertToProperUkrainian+str2Vol1 = getBFst' (0.0, V.fromList [("а", 0.890533), ("б", 0.211334), ("в", (-0.630859)), ("г", (-0.757599)), ("д", 0.884613), ("дж", 0.768127), + ("дз", (-0.731262)), ("е", (-0.742523)), ("ж", (-0.588959)), ("з", (-0.528870)), ("и", 0.770935), ("й", (-0.708008)), ("к", (-0.443085)), + ("л", 0.572632), ("м", (-0.782349)), ("н", (-0.797607)), ("о", (-0.579559)), ("п", 0.124908), ("р", 0.647369), ("с", 0.155640), ("сь", (-0.207764)), + ("т", -0.304443), ("у", 0.718262), ("ф", (-0.374359)), ("х", (-0.251160)), ("ц", (-0.392365)), ("ць", 0.381348), ("ч", (-0.189240)), + ("ш", 0.251221), ("ь", 0.495483), ("і", (-0.682709)), ("ґ", 0.557098)]) . V.unsafeHead . convertToProperUkrainian -- | For the given non-existing 'FilePath' for a sound file supported by SoX generates a silence of the specified duration and quality (see, -- 'soxBasicParams').@@ -2421,3 +2423,18 @@ | otherwise = putStrLn "Zero length of the sound! " V.imapM_ (\j zz -> h42 j zz) . V.zip4 v v2 vD $ vS +-- | Check whether for the given arguments there are the notes and whether 'String' is a name signature for the scale in 'Params' (can they be used +-- together to correspond to a non-empty set of notes).+isStrParams :: String -> Params -> Bool+isStrParams xs (P2s x y zs) = if isJust (filterInParams (P2s x y zs)) then xs == zs else False+isStrParams xs (P3sf x y z zs) = if isJust (filterInParams (P3sf x y z zs)) then xs == zs else False+isStrParams xs (P4lsf x y z ts zs) = if isJust (filterInParams (P4lsf x y z ts zs)) then xs == zs else False+isStrParams xs (P32sf x y z zs ys) = if isJust (filterInParams (P32sf x y z zs ys)) then (xs == zs || xs == ys || xs == (ys ++ " " ++ zs)) else False+isStrParams _ _ = False++-- | Check whether for the given arguments there are the notes and whether list of 'Int' is a part of the constructed 'Params' (can they be used +-- together to correspond to a non-empty set of notes).+isListParams :: [Int] -> Params -> Bool+isListParams xs (P4lsf x y z ts zs) = if isJust (filterInParams (P4lsf x y z ts zs)) then xs == ts else False+isListParams xs (P3lf x y zs) = if isJust (filterInParams (P3lf x y zs)) then xs == zs else False+isListParams _ _ = False
dobutokO2.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: dobutokO2-version: 0.39.0.1+version: 0.39.1.0 synopsis: Helps to create experimental music from a file (or its part) and a Ukrainian text. description: It can also generate a timbre for the notes. Uses SoX inside. homepage: https://hackage.haskell.org/package/dobutokO2@@ -20,7 +20,7 @@ exposed-modules: Main, DobutokO.Sound, DobutokO.Sound.Functional, DobutokO.Sound.Executable, DobutokO.Sound.IntermediateF, DobutokO.Sound.ParseList, DobutokO.Sound.Keyboard -- other-modules: -- other-extensions:- build-depends: base >=4.7 && <4.14, bytestring >= 0.10.6 && <1, vector >=0.11 && <0.14, process >=1.4 && <1.8, mmsyn3 >=0.1.4 && <1, mmsyn7s >=0.6.6 && <1, directory >=1.2.7 && <1.6, mmsyn7ukr >=0.15.3 && <1, mmsyn2 >=0.1.7 && <1, mmsyn6ukr >=0.6.3.1 && <1+ build-depends: base >=4.7 && <4.15, bytestring >= 0.10.6 && <1, vector >=0.11 && <0.14, process >=1.4 && <1.9, mmsyn3 >=0.1.5 && <1, mmsyn7s >=0.6.7 && <1, directory >=1.2.7 && <1.7, mmsyn7ukr >=0.15.4 && <1, mmsyn2 >=0.1.8 && <1, mmsyn6ukr >=0.7.2 && <1 -- hs-source-dirs: default-language: Haskell2010 @@ -28,7 +28,7 @@ main-is: Main.hs -- other-modules: -- other-extensions:- build-depends: base >=4.7 && <4.14, bytestring >= 0.10.6 && <1, vector >=0.11 && <0.14, process >=1.4 && <1.8, mmsyn3 >=0.1.4 && <1, mmsyn7s >=0.6.6 && <1, directory >=1.2.7 && <1.6, mmsyn7ukr >=0.15.3 && <1, mmsyn2 >=0.1.7 && <1, mmsyn6ukr >=0.6.3.1 && <1+ build-depends: base >=4.7 && <4.15, bytestring >= 0.10.6 && <1, vector >=0.11 && <0.14, process >=1.4 && <1.9, mmsyn3 >=0.1.5 && <1, mmsyn7s >=0.6.7 && <1, directory >=1.2.7 && <1.7, mmsyn7ukr >=0.15.4 && <1, mmsyn2 >=0.1.8 && <1, mmsyn6ukr >=0.7.2 && <1 -- hs-source-dirs: default-language: Haskell2010