packages feed

dobutokO2 0.17.0.0 → 0.17.1.0

raw patch · 3 files changed

+44/−10 lines, 3 files

Files

CHANGELOG.md view
@@ -162,3 +162,8 @@  * Seventeenth version. Added a few functions ('reverbE', 'reverb1E' etc.) to work with SoX effects to DobutokO.Sound.IntermediateF module. Added some additional information in a dobutokO2.cabal file.++## 0.17.1.0 -- 2020-03-25++* Seventeenth version revised A. Fixed issues with being not compiled and duplicate export in 'DobutokO.Sound.IntermediateF'. Added two new functions 'soxE' and+'soxE1'. 
DobutokO/Sound/IntermediateF.hs view
@@ -40,11 +40,15 @@   , playCollect1Dec   , playCollectDec   , replaceWithHQs-  -- *** SoX effects application+  -- ** SoX effects application+  -- *** With \"reverb\" as the first   , reverbE-  , reverbW1E+  , reverbWE   , reverb1E   , reverbW1E+  -- *** Generalized+  , soxE+  , soxE1 ) where  import Control.Concurrent (myThreadId,forkIO,threadDelay,killThread)@@ -292,36 +296,61 @@   (code,_,_) <- readProcessWithExitCode (fromJust (showE "sox")) ([file,file ++ "reverb.wav","reverb"] ++ arggs) ""   case code of     ExitSuccess -> do renameFile (file ++ "reverb.wav") file-    - -> do+    _ -> do        removeFile $ file ++ "reverb.wav"        putStrLn $ "DobutokO.Sound.IntermediateF.reverbE: file \"" ++ file ++ "\" has not been successful. The file has not been changed at all. " --- | The same as 'reverbE', but at the end file is being mixed to obtain mono audio.+-- | The same as 'reverbE', but at the end file is being mixed to obtain mono audio. The name of the temporary file is ((name-of-the-file) ++ \"reverb1.wav\"). reverb1E :: FilePath -> [String] -> IO () reverb1E file arggs = do   (code,_,_) <- readProcessWithExitCode (fromJust (showE "sox")) ([file,file ++ "reverb1.wav","reverb"] ++ arggs ++ ["channels","1"]) ""   case code of     ExitSuccess -> do renameFile (file ++ "reverb1.wav") file-    - -> do+    _ -> do        removeFile $ file ++ "reverb1.wav"        putStrLn $ "DobutokO.Sound.IntermediateF.reverb1E: file \"" ++ file ++ "\" has not been successful. The file has not been changed at all. " --- | The same as 'reverbE', but uses \"reverb -w\" effect instead of \"reverb\". Please, for more information, refer to SoX documentation.+-- | The same as 'reverbE', but uses \"reverb -w\" effect instead of \"reverb\". The name of the temporary file is+-- ((name-of-the-file) ++ \"reverbW.wav\"). Please, for more information, refer to SoX documentation. reverbWE :: FilePath -> [String] -> IO () reverbWE file arggs = do   (code,_,_) <- readProcessWithExitCode (fromJust (showE "sox")) ([file,file ++ "reverbW.wav","reverb","-w"] ++ arggs) ""   case code of     ExitSuccess -> do renameFile (file ++ "reverbW.wav") file-    - -> do+    _ -> do        removeFile $ file ++ "reverbW.wav"        putStrLn $ "DobutokO.Sound.IntermediateF.reverbWE: file \"" ++ file ++ "\" has not been successful. The file has not been changed at all. " --- | The same as 'reverbWE', but at the end file is being mixed to obtain mono audio. +-- | The same as 'reverbWE', but at the end file is being mixed to obtain mono audio. The name of the temporary file is ((name-of-the-file) ++ \"reverbW1.wav\"). reverbW1E :: FilePath -> [String] -> IO () reverbW1E file arggs = do   (code,_,_) <- readProcessWithExitCode (fromJust (showE "sox")) ([file,file ++ "reverbW1.wav","reverb","-w"] ++ arggs ++ ["channels","1"]) ""   case code of     ExitSuccess -> do renameFile (file ++ "reverbW1.wav") file-    - -> do+    _ -> do        removeFile $ file ++ "reverbW1.wav"        putStrLn $ "DobutokO.Sound.IntermediateF.reverbW1E: file \"" ++ file ++ "\" has not been successful. The file has not been changed at all. "++-- | Takes a filename to be applied a SoX chain of effects (or just one) as list of 'String' (the second argument). Produces the temporary+-- new file with the name ((name-of-the-file) ++ \"effects.wav\"), which then is removed. +--+-- The syntaxis is that every separate literal for SoX must be a new element in the list. If you plan to create again mono audio in the end of processment, +-- then probably use 'soxE1' function instead. Please, for more information, refer to SoX documentation.+soxE :: FilePath -> [String] -> IO ()+soxE file arggs = do+  (code,_,_) <- readProcessWithExitCode (fromJust (showE "sox")) ([file,file ++ "effects.wav"] ++ arggs) ""+  case code of+    ExitSuccess -> do renameFile (file ++ "effects.wav") file+    _ -> do+       removeFile $ file ++ "effects.wav"+       putStrLn $ "DobutokO.Sound.IntermediateF.soxE: file \"" ++ file ++ "\" has not been successful. The file has not been changed at all. "++-- | The same as 'soxE', but at the end file is being mixed to obtain mono audio. +soxE1 :: FilePath -> [String] -> IO ()+soxE1 file arggs = do+  (code,_,_) <- readProcessWithExitCode (fromJust (showE "sox")) ([file,file ++ "effects.wav"] ++ arggs ++ ["channels","1"]) ""+  case code of+    ExitSuccess -> do renameFile (file ++ "effects.wav") file+    _ -> do+       removeFile $ file ++ "effects.wav"+       putStrLn $ "DobutokO.Sound.IntermediateF.soxE1: file \"" ++ file ++ "\" has not been successful. The file has not been changed at all. "
dobutokO2.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                dobutokO2-version:             0.17.0.0+version:             0.17.1.0 synopsis:            A program and a library to create experimental music from a mono audio and a Ukrainian text description:         It can also create a timbre for the notes. Uses SoX inside. homepage:            https://hackage.haskell.org/package/dobutokO2