mmsyn7l 0.9.0.0 → 0.9.1.0
raw patch · 7 files changed
+87/−83 lines, 7 filesdep ~basedep ~mmsyn2-arraydep ~mmsyn3PVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, mmsyn2-array, mmsyn3, mmsyn7ukr-common, process
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- LICENSE +1/−1
- MMSyn7l.hs +5/−6
- Main.hs +4/−5
- README.markdown +0/−64
- README.md +64/−0
- mmsyn7l.cabal +7/−7
CHANGELOG.md view
@@ -93,3 +93,9 @@ ## 0.9.0.0 -- 2021-02-15 * Ninth version. Removed vector-related dependencies. Some code improvements.++## 0.9.1.0 -- 2022-08-16++* Ninth version revised. Updated the dependencies to support the newer GHC-9* serios. Some minor +code improvements.+
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2020-2021 OleksandrZhabenko+Copyright (c) 2020-2022 Oleksandr Zhabenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
MMSyn7l.hs view
@@ -1,6 +1,6 @@ -- | -- Module : MMSyn7l--- Copyright : (c) OleksandrZhabenko 2020-2021+-- Copyright : (c) OleksandrZhabenko 2020-2022 -- License : MIT -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com@@ -17,7 +17,6 @@ import Data.Char (toUpper, isDigit) import qualified Sound.SoXBasics as SB import qualified Sound.SoXBasics1 as SB1---import qualified Data.Vector as V import Data.Maybe (isJust) import Control.Exception (onException) import CaseBi.Arr (getBFstL')@@ -148,7 +147,7 @@ coefA = 0.0001 * fromIntegral (read ys::Int) ratio = 1.0 + (delta / ampl) * coefA SB1.volS file (ratio * ampl)- else catchEnd (StrangeAnswer "SoXBasics1" "volS")+ else catchEnd (StrangeAnswer "Sound.SoXBasics1" "volS") -- | Function 'changeVol4' is used internally in the 'specifyVol' in case of working with the minimum amplitude. changeVol4 :: FilePath -> (String, String) -> IO ()@@ -165,7 +164,7 @@ coefA = 0.0001 * fromIntegral (read ys::Int) ratio = 1.0 + (delta / ampl) * coefA SB1.volS file (ratio * ampl)- else catchEnd (StrangeAnswer "SoXBasics1" "volS")+ else catchEnd (StrangeAnswer "Sound.SoXBasics1" "volS") -- | Works with the \"result*.wav\" files in the current directory: it adjusts volume levels for the sequence of them starting from the -- first argument in a list and ending with the second one (if specified). If there is no first -- all such files are adjusted; if there is no second one -- @@ -275,7 +274,7 @@ case code of ExitSuccess -> removeFile file _ -> do- putStrLn $ "DobutokO.Sound.IntermediateF.wavToFlac: " ++ herr+ putStrLn $ "MMSyn7l.wavToFlac: " ++ herr exi <- doesFileExist $ take (length file - 3) file ++ "flac" if exi then removeFile (take (length file - 3) file ++ "flac") >> error "" else error ""@@ -291,7 +290,7 @@ case code of ExitSuccess -> removeFile file _ -> do- putStrLn $ "DobutokO.Sound.IntermediateF.flacToWav: " ++ herr+ putStrLn $ "MMSyn7l.flacToWav: " ++ herr exi <- doesFileExist $ take (length file - 4) file ++ "wav" if exi then removeFile (take (length file - 4) file ++ "wav") >> error "" else error ""
Main.hs view
@@ -1,12 +1,12 @@ -- | -- Module : Main--- Copyright : (c) OleksandrZhabenko 2020-2021+-- Copyright : (c) OleksandrZhabenko 2020-2022 -- License : MIT -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com ----- A program and a library to modify the amplitudes of the sound representations for --- the Ukrainian language created by mmsyn7ukr package or somehow otherwise. Besides+-- A program and a library to modify the amplitudes of the sound representations +-- created by mmsyn7ukr or mmsyn7ukr-array package or somehow otherwise. Besides -- it can be used to adjust volume for the sequential \"result*.wav\" files. -- @@ -14,7 +14,6 @@ import Control.Exception (onException) import MMSyn7l (changeVolume,adjustVolRes)---import qualified Data.Vector as V import CaseBi.Arr (getBFstL') import System.Environment (getArgs) import Parser.ReplaceP (replaceP, replaceP4)@@ -50,7 +49,7 @@ putStrLn "given sound representations. If not specified, the program modifies the amplitudes for all non-pause Ukrainian sounds representations." putStrLn "" ("-v":_) -> do- putStrLn "mmsyn7l version: 0.9.0.0"+ putStrLn "mmsyn7l version: 0.9.1.0" putStrLn "" ("-r":_) -> adjustVolRes . drop 1 $ args _ -> do
− README.markdown
@@ -1,64 +0,0 @@- ***** Usage Notes *****- =======================--For the proper proceeding you specify a String, which consists of 4 -digits (and it may be preceded by a symbol "-"). If the String -begins with the "-", then a sound amplitude decreases, otherwise -the amplitude increases. The level of increase / decrease is -determined by the magnitude of the absolute value of integer numbers. -The greater is the number -- the greater is the amplitude change. -The count begins with "0000" and ends with "9999" (the sign is not -taken into consideration). If there is less than 4 digits in a String, -then the String is equivalent to that one with the appropriate number -of zeroes preceding to fulfill to the 4 needed digits (for example, -"657" is equivalent to "0657", "-2" is equivalent to "-0002" etc.). -In such a case, for the Strings without the initial sign "-" (the -sound increases) an interval between the maximum by modulus value -of the amlitude (which is represented by the parts of 1) and 1.0 -is divided into 10 equal parts (starting a count from 0) and then -that one of them is selected, which has a number determined by the -first digit in the String writing. Then (if specified further) -the interval between this amplitude value and a value, which -corresponds to the selection on the previous step the next -first digit in the writing (for example, after "4" -- "5", -after "7" --"8" etc.), greater by 1 than the actually selected one, -is also divided again into 10 equal parts and that one is selected, -which corresponds to the number determined by the second digit in the -String writing (again beginning with "0" and ending with "9") and so on -until the 4th level. The greater exactness is not needed because our -hearing ability hardly distinguish such a subtle sound changes. If -the String has as a first element the "-" Char (the sound decreases), -then everything is analogously the same, but an interval between the -maximum by modulus amplitude value and 0.0 is divided into 10 equal parts -and so on.-- ***** Command Line Arguments *****- ==================================- -If you specify a command line argument (other than "-h", "-r", or "-v"),-it must be a sorted list of the Ukrainian sounds representations,-which can be obtained by using the mmsyn7s package. For more information,-please, refer to:-[mmsyn7s](https://hackage.haskell.org/package/mmsyn7s).--In such a case, the program will modify only the amplitudes for-those Ukrainian sounds representations, which are in the list.-Otherwise, the program will modify the amplitudes for all non-silent Ukrainian-sounds representations in the current directory.--The "-h" command line argument is used for the help informational message.--The "-v" command line argument is used for the version number.--The "-r" command line argument is used to work with "result*.wav" files to adjust-their volume. You can additionally specify the numbers for the first and for-the last files to be adjusted.-- ***** Library Functions to Edit Sound *****- ===========================================--Since the 0.5.0.0 version from DobutokO.Sound.IntermediateF module (dobutokO2 package) -some functions were moved here. They are in MMSyn7l module. This was done to allow -their usage without the necessity to install dobutokO2 package (just using mmsyn7* -series). Added new functions that use the moved ones.-
+ README.md view
@@ -0,0 +1,64 @@+ ***** Usage Notes *****+ =======================++For the proper proceeding you specify a String, which consists of 4 +digits (and it may be preceded by a symbol "-"). If the String +begins with the "-", then a sound amplitude decreases, otherwise +the amplitude increases. The level of increase / decrease is +determined by the magnitude of the absolute value of integer numbers. +The greater is the number -- the greater is the amplitude change. +The count begins with "0000" and ends with "9999" (the sign is not +taken into consideration). If there is less than 4 digits in a String, +then the String is equivalent to that one with the appropriate number +of zeroes preceding to fulfill to the 4 needed digits (for example, +"657" is equivalent to "0657", "-2" is equivalent to "-0002" etc.). +In such a case, for the Strings without the initial sign "-" (the +sound increases) an interval between the maximum by modulus value +of the amlitude (which is represented by the parts of 1) and 1.0 +is divided into 10 equal parts (starting a count from 0) and then +that one of them is selected, which has a number determined by the +first digit in the String writing. Then (if specified further) +the interval between this amplitude value and a value, which +corresponds to the selection on the previous step the next +first digit in the writing (for example, after "4" -- "5", +after "7" --"8" etc.), greater by 1 than the actually selected one, +is also divided again into 10 equal parts and that one is selected, +which corresponds to the number determined by the second digit in the +String writing (again beginning with "0" and ending with "9") and so on +until the 4th level. The greater exactness is not needed because our +hearing ability hardly distinguish such a subtle sound changes. If +the String has as a first element the "-" Char (the sound decreases), +then everything is analogously the same, but an interval between the +maximum by modulus amplitude value and 0.0 is divided into 10 equal parts +and so on.++ ***** Command Line Arguments *****+ ==================================+ +If you specify a command line argument (other than "-h", "-r", or "-v"),+it must be a sorted list of the Ukrainian sounds representations,+which can be obtained by using the mmsyn7s package. For more information,+please, refer to:+[mmsyn7s](https://hackage.haskell.org/package/mmsyn7s).++In such a case, the program will modify only the amplitudes for+those Ukrainian sounds representations, which are in the list.+Otherwise, the program will modify the amplitudes for all non-silent Ukrainian+sounds representations in the current directory.++The "-h" command line argument is used for the help informational message.++The "-v" command line argument is used for the version number.++The "-r" command line argument is used to work with "result*.wav" files to adjust+their volume. You can additionally specify the numbers for the first and for+the last files to be adjusted.++ ***** Library Functions to Edit Sound *****+ ===========================================++Since the 0.5.0.0 version from DobutokO.Sound.IntermediateF module (dobutokO2 package) +some functions were moved here. They are in MMSyn7l module. This was done to allow +their usage without the necessity to install dobutokO2 package (just using mmsyn7* +series). Added new functions that use the moved ones.+
mmsyn7l.cabal view
@@ -2,25 +2,25 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: mmsyn7l-version: 0.9.0.0-synopsis: Modifies the amplitudes of the Ukrainian sounds representations created by mmsyn7ukr package.-description: A program and a library to modify the amplitudes of the Ukrainian sounds representations created by mmsyn7ukr package or somehow otherwise.+version: 0.9.1.0+synopsis: Modifies the amplitudes of the sounds representations created by mmsyn7ukr-array and mmsyn7ukr packages.+description: A program and a library to modify the amplitudes of the sounds representations. Can be used for Ukrainian sound or some other ones. homepage: https://hackage.haskell.org/package/mmsyn7l license: MIT license-file: LICENSE-author: (c) OleksandrZhabenko 2020-2021+author: (c) OleksandrZhabenko 2020-2022 maintainer: olexandr543@yahoo.com -- copyright: category: Sound build-type: Simple-extra-source-files: CHANGELOG.md, README.markdown+extra-source-files: CHANGELOG.md, README.md cabal-version: >=1.10 library exposed-modules: Main, MMSyn7l -- other-modules: -- other-extensions:- build-depends: base >=4.7 && <4.15, mmsyn7ukr-common >=0.1.1 && <1, mmsyn2-array >=0.1.1 && <1, directory >=1.2.7 && <2, process >=1.4 && <1.9, mmsyn3 >=0.1.5 && <1+ build-depends: base >=4.7 && <5, mmsyn7ukr-common ==0.2.0.0, mmsyn2-array ==0.3.0.0, directory >=1.2.7 && <2, process >=1.4 && <2, mmsyn3 ==0.1.6.0 -- hs-source-dirs: default-language: Haskell2010 @@ -28,6 +28,6 @@ main-is: Main.hs other-modules: MMSyn7l -- other-extensions:- build-depends: base >=4.7 && <4.15, mmsyn7ukr-common >=0.1.1 && <1, mmsyn2-array >=0.1.1 && <1, directory >=1.2.7 && <2, process >=1.4 && <1.9, mmsyn3 >=0.1.5 && <1+ build-depends: base >=4.7 && <5, mmsyn7ukr-common ==0.2.0.0, mmsyn2-array ==0.3.0.0, directory >=1.2.7 && <2, process >=1.4 && <2, mmsyn3 ==0.1.6.0 -- hs-source-dirs: default-language: Haskell2010