mmsyn7h 0.2.1.0 → 0.2.2.0
raw patch · 3 files changed
+17/−6 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +5/−0
- MMSyn7h.hs +11/−5
- mmsyn7h.cabal +1/−1
ChangeLog.md view
@@ -11,3 +11,8 @@ ## 0.2.1.0 -- 2019-12-25 * Second version revised A. Program now is a library and a executable, it has another module structure. Some minor documentation improvements.++## 0.2.1.0 -- 2019-12-28++* Second version revised B. Fixed an issue with the null command line arguments and with playing created file.+
MMSyn7h.hs view
@@ -55,22 +55,28 @@ withBinaryFile (nameSF ++ ".raw") AppendMode (appendS16LEFile (convertToProperUkrainian ys)) putStrLn "The .raw file was created by the program. It will be processed further. " let ts = fromJust (showE "sox") in do+ let ws = snd . genControl . concat $ args _ <- readProcessWithExitCode ts ["-r22050","-c1","-L","-esigned-integer","-b16", nameSF ++ ".raw", - fst . snd . genControl . concat $ args, nameSF ++ (snd . snd . genControl . concat $ args)] ""+ fst ws, nameSF ++ snd ws] "" removeFile $ nameSF ++ ".raw" if isJust . showE $ "play" then do - _ <- readProcessWithExitCode (fromJust . showE $ "play") [nameSF ++ (snd . snd . genControl . concat $ args)] ""+ _ <- readProcessWithExitCode (fromJust . showE $ "play") [nameSF ++ snd ws] "" cleanCreatedSoundFs else error "SoX play is not installed properly in the system. Please, install it properly and execute the program again." else do+ let ws = snd . genControl . concat $ args let ys = take (nSymbols (let zs = take 1 args in if null zs then [] else fst . genControl . head $ zs)) xs in withBinaryFile (nameSF ++ ".raw") AppendMode (appendS16LEFile (convertToProperUkrainian ys)) putStrLn "The .raw file was created by the program. It will be processed further. " let ts = fromJust (showE "sox") in do- _ <- readProcessWithExitCode ts ["-r22050","-c1","-L","-esigned-integer","-b16", nameSF ++ ".raw", - fst . snd . genControl . concat $ args, nameSF ++ (snd . snd . genControl . concat $ args)] ""- removeFile $ nameSF ++ ".raw")+ _ <- readProcessWithExitCode ts (case fst ws of + "" -> ["-r22050","-c1","-L","-esigned-integer","-b16", nameSF ++ ".raw", nameSF ++ snd ws]+ _ -> ["-r22050","-c1","-L","-esigned-integer","-b16", nameSF ++ ".raw", fst ws, nameSF ++ snd ws]) ""+ removeFile $ nameSF ++ ".raw"+ if isJust . showE $ "play"+ then readProcessWithExitCode (fromJust . showE $ "play") [nameSF ++ snd ws] "" >> return ()+ else error "SoX play is not installed properly in the system. Please, install it properly and execute the program again.") -- | The function that actually produces a .raw file. The mapping table is given in the @Map.txt@ file, but the sound duration differs. appendS16LEFile :: V.Vector String -> Handle -> IO ()
mmsyn7h.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: mmsyn7h-version: 0.2.1.0+version: 0.2.2.0 synopsis: A program and a library that produces a sound recording specified by the Ukrainian text. description: A program and a library that are used with mmsyn7ukr (or separately) and are similar to mmsyn6ukr executable. The program uses the data files in the current directory instead of ones in the system defined directories. It reads Ukrainian text with the given by data files sounds. homepage: https://hackage.haskell.org/package/mmsyn7h