mmsyn6ukr 0.4.0.0 → 0.4.0.1
raw patch · 4 files changed
+15/−12 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Main.hs +4/−4
- Melodics/Ukrainian.hs +6/−7
- mmsyn6ukr.cabal +1/−1
ChangeLog.md view
@@ -42,3 +42,7 @@ ## 0.4.0.0 -- 2019-12-05 * Fourth version. Fixed issues with the sound conversions. Now they works properly.++## 0.4.0.1 -- 2019-12-06++* Fourth version revised A. Better documentated. Some minor code changes.
Main.hs view
@@ -15,12 +15,12 @@ ) where import Data.Maybe (isJust,fromJust)-import System.IO -import System.Environment+import System.IO+import System.Environment (getArgs) import System.Process-import EndOfExe+import EndOfExe (showE) import Paths_mmsyn6ukr-import Melodics.Ukrainian+import Melodics.Ukrainian (appendS16LEFile, nSymbols, convertToProperUkrainian) {- -- Inspired by: https://mail.haskell.org/pipermail/beginners/2011-October/008649.html
Melodics/Ukrainian.hs view
@@ -35,7 +35,6 @@ data1 <- B.readFile file let dataN = B.drop 44 data1 in return dataN - -- | The function that actually produces a .raw file. appendS16LEFile :: V.Vector String -> Handle -> IO () appendS16LEFile xs hdl | not (V.null xs) = @@ -64,7 +63,7 @@ | otherwise = return () -- | The function that converts a written Ukrainian text into the sounding in the program phonetical respesentation. --- It is not exact phonetically but you can make for yourself a general imression of the Ukrainian sounding.+-- It is not exact phonetically but you can make for yourself a general impression of the Ukrainian sounding. convertToProperUkrainian :: String -> V.Vector String convertToProperUkrainian ys = toVector . correctA . applyChanges . createTuplesByAnalysis . changeJotted . secondConv . wasFstConverted . filterUkr $ ys @@ -125,9 +124,6 @@ | otherwise = x:changeJotted (y:z:zs) changeJotted xs = xs -isNotVowel :: Char -> Bool-isNotVowel = getBFst' (True, V.fromList $ zip "\1072\1077\1080\1086\1091\1102\1103\1108\1110\1111" (repeat False))- applyChanges :: [(String, Triple)] -> [(String, Triple)] applyChanges (z:t:zs) | snd z == T = getBFst' ((fst z, Z), V.fromList . zip ["\1075","\1076","\1076\1079","\1078","\1079","\1082","\1085\1090",@@ -306,15 +302,18 @@ k = length ks takeFromFT_ :: Int -> [(String, Triple)] -> String-takeFromFT_ n ts = takeFromFT n (filter (\(xs, y) -> (xs /= "1" && xs /= "0")) ts)+takeFromFT_ n ts = takeFromFT n (filter (\(xs, _) -> (xs /= "1" && xs /= "0")) ts) toVector :: [(String, Triple)] -> V.Vector String-toVector ts = V.fromList . mapI2 (\x -> not . null . fst $ x) fst (\y -> []) $ ts+toVector ts = V.fromList . mapI2 (\x -> not . null . fst $ x) fst (\_ -> []) $ ts isUkrainian :: Char -> Bool isUkrainian y | (y >= '\1040' && y <= '\1065') || (y >= '\1070' && y <= '\1097') = True | otherwise = getBFst' (False, V.fromList . map (\x -> (x, True)) $ "'-\700\1028\1030\1031\1068\1100\1102\1103\1108\1110\1111\1168\1169\8217") y +-- | Function that converts the first command line argument given, which is a digit in the range @[0..9]@, +-- to the upper bound of number of symbols that the 'Main.main' function reads from the @stdin@ for sounding.+-- The default value (no / some other input) is 31416. nSymbols :: String -> Int nSymbols xs | null xs = 31416::Int | otherwise = getBFst' (31416::Int, V.generate 10 (\n -> (n, (10^n + 1)::Int))) (let temp = read xs::Int in if temp <= 9 && temp >= 1
mmsyn6ukr.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: mmsyn6ukr-version: 0.4.0.0+version: 0.4.0.1 synopsis: A musical instrument synthesizer or a tool for Ukrainian language listening description: A program can be used as a musical instrument synthesizer or for Ukrainian speech synthesis especially for poets and writers homepage: https://hackage.haskell.org/package/mmsyn6ukr