dobutokO2 0.16.0.0 → 0.17.0.0
raw patch · 4 files changed
+69/−2 lines, 4 files
Files
- CHANGELOG.md +5/−0
- DobutokO/Sound/Executable.hs +7/−0
- DobutokO/Sound/IntermediateF.hs +55/−0
- dobutokO2.cabal +2/−2
CHANGELOG.md view
@@ -157,3 +157,8 @@ * Sixteenth version. Changed dependency version for directory package. Some documentation improvements for README.markdown file. Added a new module DobutokO.Sound.IntermediateF to work with intermediate files. Changed the names of the some functions in DobutokO.Sound module and its exports.++## 0.17.0.0 -- 2020-03-25++* 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.
DobutokO/Sound/Executable.hs view
@@ -224,6 +224,13 @@ dobutokO2H9 _ _ _ = pAnR_ {-# INLINE dobutokO2H9 #-} +dobutokO2H99 :: Bool -> String -> FilePath -> IO ()+dobutokO2H99 exist2 args file = do+ undefined+{-# INLINE dobutokO2H99 #-}+++ isDataStr :: String -> Bool isDataStr = null . filter (== '@')
DobutokO/Sound/IntermediateF.hs view
@@ -40,6 +40,11 @@ , playCollect1Dec , playCollectDec , replaceWithHQs+ -- *** SoX effects application+ , reverbE+ , reverbW1E+ , reverb1E+ , reverbW1E ) where import Control.Concurrent (myThreadId,forkIO,threadDelay,killThread)@@ -53,6 +58,7 @@ import EndOfExe (showE) import System.Process (readProcessWithExitCode) import Data.Maybe (fromJust)+import System.Exit (ExitCode (ExitSuccess)) -- | Gets sizes of the \"result\*.wav\" files in the current directory. getFileRSizes :: IO (V.Vector Integer)@@ -270,3 +276,52 @@ pAnR_ = do vec <- playAMrk pAnR2 vec++----------------------------------------------------------------------------------------------------------------++-- | Takes a filename to be applied a SoX \"reverb" effect with parameters of list of 'String' (the second argument). Produces the temporary+-- new file with the name ((name-of-the-file) ++ \"reverb.wav\"), which then is removed. Please, remember that for the mono audio+-- the after applied function file is stereo with 2 channels.+--+-- Besides, you can specify other SoX effects after reverberation in a list of 'String'. The syntaxis is that every separate literal must be+-- a new element in the list. If you plan to create again mono audio in the end of processment, then probably use 'reverb1E' funcion instead. +-- If you would like to use instead of \"reverb\" its modification \"reverb -w\" effect (refer to SoX documentation), then probably it is more+-- convenient to use 'reverbWE' function.+reverbE :: FilePath -> [String] -> IO ()+reverbE file arggs = do+ (code,_,_) <- readProcessWithExitCode (fromJust (showE "sox")) ([file,file ++ "reverb.wav","reverb"] ++ arggs) ""+ case code of+ ExitSuccess -> do renameFile (file ++ "reverb.wav") file+ - -> 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.+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+ 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.+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+ 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. +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+ removeFile $ file ++ "reverbW1.wav"+ putStrLn $ "DobutokO.Sound.IntermediateF.reverbW1E: file \"" ++ file ++ "\" has not been successful. The file has not been changed at all. "
dobutokO2.cabal view
@@ -2,9 +2,9 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: dobutokO2-version: 0.16.0.0+version: 0.17.0.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+description: It can also create a timbre for the notes. Uses SoX inside. homepage: https://hackage.haskell.org/package/dobutokO2 license: MIT license-file: LICENSE