packages feed

mmsyn7ukr-common 0.2.0.0 → 0.3.0.0

raw patch · 7 files changed

+33/−38 lines, 7 filesdep +end-of-exedep −mmsyn3dep ~base

Dependencies added: end-of-exe

Dependencies removed: mmsyn3

Dependency ranges changed: base

Files

ChangeLog.md view
@@ -14,3 +14,7 @@  * Second version. Updated the dependencies to support the latest GHC-9.* series. +## 0.3.0.0 -- 2024-12-19++* Third version. Added git repository and bug-tracker. Updated the dependencies.+
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2019-2022 Oleksandr Zhabenko+Copyright (c) 2019-2022, 2024 Oleksandr Zhabenko  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
Parser/ReplaceP.hs view
@@ -1,9 +1,9 @@ -- | -- Module      :  Parser.ReplaceP--- Copyright   :  (c) OleksandrZhabenko 2020-2021+-- Copyright   :  (c) OleksandrZhabenko 2020-2021, 2024 -- License     :  MIT -- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com+-- Maintainer  :  oleksandr.zhabenko@yahoo.com -- -- This module provides some basic parsing functions for some special used 'Show' representation. --
Sound/Control/Exception/FinalException.hs view
@@ -3,10 +3,10 @@  -- | -- Module      :  Sound.Control.Exception.FinalException--- Copyright   :  (c) OleksandrZhabenko 2020-2021+-- Copyright   :  (c) OleksandrZhabenko 2020-2021, 2024 -- License     :  MIT -- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com+-- Maintainer  :  oleksandr.zhabenko@yahoo.com -- -- Exceptions for the other modules. --
Sound/SoXBasics.hs view
@@ -1,12 +1,12 @@-{-# LANGUAGE CPP #-}+-- {-# LANGUAGE CPP #-} {-# OPTIONS_HADDOCK show-extensions #-}  -- | -- Module      :  Sound.SoXBasics--- Copyright   :  (c) OleksandrZhabenko 2019-2021+-- Copyright   :  (c) OleksandrZhabenko 2019-2021, 2024 -- License     :  MIT -- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com+-- Maintainer  :  olexandr.zhabenko@yahoo.com -- -- A program and a library that can be used as a simple basic interface to some SoX functionality. --@@ -55,33 +55,23 @@ import Data.Char import System.Process import System.IO-import EndOfExe+import EndOfExe2 import System.Exit import Control.Concurrent (threadDelay) import Control.Exception (onException) import System.Info (os) import Sound.Control.Exception.FinalException--#ifdef __GLASGOW_HASKELL__-#if __GLASGOW_HASKELL__>=710-/* code that applies only to GHC 7.10.* and higher versions */ import GHC.Base (mconcat)-#endif-#endif-#ifdef __GLASGOW_HASKELL__-#if __GLASGOW_HASKELL__==708-/* code that applies only to GHC 7.8.* */-mconcat = concat-#endif-#endif  -- | Function 'maxAbs' allows to choose a maximum by absolute value if the values are written as 'String'. Bool 'True' corresponds to maximum value, 'False' - to minimum value maxAbs :: (String, String) -> (String, Bool) maxAbs (xs, ys) | null xs || null ys = ([], False)-                | head xs == '-' && head ys == '-' = if compare xs ys /= LT then (xs, False) else (ys, False)-                | head xs /= '-' && head ys /= '-' = if compare xs ys == GT then (xs, True) else (ys, True)-                | head xs == '-' && head ys /= '-' = if compare (tail xs) ys /= LT then (xs, False) else (ys, True)-                | otherwise = if compare xs (tail ys) == GT then (xs, True) else (ys, False)+                | hx == "-" && hy == "-" = if compare xs ys /= LT then (xs, False) else (ys, False)+                | hx /= "-" && hy /= "-" = if compare xs ys == GT then (xs, True) else (ys, True)+                | hx == "-" && hy /= "-" = if compare (drop 1 xs) ys /= LT then (xs, False) else (ys, True)+                | otherwise = if compare xs (drop 1 ys) == GT then (xs, True) else (ys, False)+            where hx = take 1 xs+                  hy = take 1 ys  ulAccessParameters :: [String] ulAccessParameters = ["-r22050","-c1"]@@ -148,7 +138,7 @@ getMaxAG ul file (lowerbound, upperbound) = if isJust (showE "sox")   then do     (_, _, herr) <- soxOpG1 ul [] file [] ["trim", show lowerbound ++ "s", "=" ++ show upperbound ++ "s", "stat"]-    let zs = lines herr in return (let u = (words $ zs !! 3) !! 2 in if head u == '-' then take 9 u else take 8 u)+    let zs = lines herr in return (let u = (words $ zs !! 3) !! 2 in if take 1 u == "-" then take 9 u else take 8 u)   else do     catchEnd ExecutableNotProperlyInstalled     return []@@ -158,7 +148,7 @@ getMinAG ul file (lowerbound, upperbound) = if isJust (showE "sox")   then do     (_, _, herr1) <- soxOpG1 ul [] file [] ["trim", show lowerbound ++ "s", "=" ++ show upperbound ++ "s", "stat"]-    let zs = lines herr1 in return (let u = (words $ zs !! 4) !! 2 in if head u == '-' then take 9 u else take 8 u)+    let zs = lines herr1 in return (let u = (words $ zs !! 4) !! 2 in if take 1 u == "-" then take 9 u else take 8 u)   else do     catchEnd ExecutableNotProperlyInstalled     return []@@ -508,7 +498,7 @@     (code, _, _) <- soxOpG ul [] file10 [] file20 ["vol", showFFloat Nothing ampl $ show 0, "amplitude"]     twoExceptions1File code file20 (NotCreatedWithEffect "vol") (InitialFileNotChanged fileA)   else catchEnd ExecutableNotProperlyInstalled-      where (file10, file20) = applyExts2 ul fileA ("8." ++ tail fileA)+      where (file10, file20) = applyExts2 ul fileA ("8." ++ drop 1 fileA)  -- | Function 'sincAG' uses a \"sinc\" effect with @-a 50 -I 0.07k-11k@ band-pass filter for the audio file given. sincAG :: ULencode -> FilePath -> IO ()
Sound/SoXBasics1.hs view
@@ -1,9 +1,9 @@ -- | -- Module      :  Sound.SoXBasics1--- Copyright   :  (c) OleksandrZhabenko 2020+-- Copyright   :  (c) OleksandrZhabenko 2020, 2024 -- License     :  MIT -- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com+-- Maintainer  :  oleksandr.zhabenko@yahoo.com -- -- A program and a library that can be used as a simple basic interface to some SoX functionality. -- This module differs from the "Sound.SoXBasics" that the resulting files@@ -45,7 +45,7 @@ import Data.Maybe (isJust, fromJust) import Numeric import System.Process-import EndOfExe+import EndOfExe2 import System.Exit import qualified Sound.SoXBasics as SB (ULencode(..), SoundFileExts(..), soxOpG, soxOpG1,   ulAccessParameters, ulResultParameters, doubleCleanCheck, presenseCheck, secondFileClean,@@ -280,8 +280,8 @@     amplMax <- SB.selMAG (getULFromExt fileB) fileB (0, upp) True     amplMin <- SB.selMAG (getULFromExt fileB) fileB (0, upp) False     let ampl = read (fst . SB.maxAbs $ (amplMax, amplMin))::Float-    (code, _, _) <- SB.soxOpG (getULFromExt fileA) [] fileA [] ("8." ++ tail fileA) ["vol", showFFloat Nothing ampl $ show 0, "amplitude"]-    twoExceptions2Files code fileA ("8." ++ tail fileA) (NotCreatedWithEffect "vol") (InitialFileNotChanged fileA)+    (code, _, _) <- SB.soxOpG (getULFromExt fileA) [] fileA [] ("8." ++ drop 1 fileA) ["vol", showFFloat Nothing ampl $ show 0, "amplitude"]+    twoExceptions2Files code fileA ("8." ++ drop 1 fileA) (NotCreatedWithEffect "vol") (InitialFileNotChanged fileA)   else catchEnd ExecutableNotProperlyInstalled  -- | Function 'sincA' uses a \"sinc\" effect with @-a 50 -I 0.07k-11k@ band-pass filter for the audio file given. While being
mmsyn7ukr-common.cabal view
@@ -2,15 +2,16 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                mmsyn7ukr-common-version:             0.2.0.0+version:             0.3.0.0 synopsis:            Some common for mmsyn7ukr and mmsyn7ukr-array functionality using SoX. description:         A program and a library that can be used as a simple basic interface to some SoX functionality. homepage:            https://hackage.haskell.org/package/mmsyn7ukr-common+bug-reports:         https://github.com/Oleksandr-Zhabenko/mmsyn7ukr-common/issues license:             MIT license-file:        LICENSE author:              OleksandrZhabenko-maintainer:          olexandr543@yahoo.com-copyright:           (c) Oleksandr Zhabenko 2019-2022+maintainer:          olexandr.zhabenko@yahoo.com+copyright:           (c) Oleksandr Zhabenko 2019-2022, 2024 category:            Language, Sound build-type:          Simple extra-source-files:  ChangeLog.md, README.md@@ -19,7 +20,7 @@ library   exposed-modules:     Sound.SoXBasics, Sound.SoXBasics1, Parser.ReplaceP, Sound.Control.Exception.FinalException   -- other-modules:-  other-extensions:    CPP, DeriveDataTypeable-  build-depends:       base >=4.7 && <5, process >=1.4 && <2, directory >=1.2.5 && <2, mmsyn3 ==0.1.6.0+  other-extensions:    +  build-depends:       base >=4.13 && <5, process >=1.4 && <2, directory >=1.2.5 && <2, end-of-exe ==0.1.2.0   -- hs-source-dirs:   default-language:    Haskell2010