mmsyn7l 0.1.0.1 → 0.1.1.0
raw patch · 4 files changed
+34/−18 lines, 4 files
Files
- CHANGELOG.md +4/−0
- MMSyn7l.hs +16/−8
- README +12/−8
- mmsyn7l.cabal +2/−2
CHANGELOG.md view
@@ -7,3 +7,7 @@ ## 0.1.0.1 -- 2020-01-07 * First version revised A. Some documentation minor improvements. ++## 0.1.1.0 -- 2020-01-08++* First version revised B. Fixed an issue with the wrong amplitude level recognition.
MMSyn7l.hs view
@@ -26,7 +26,11 @@ -- 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). In such a case, for the @String@s without the +-- 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 @String@s 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 @@ -64,7 +68,11 @@ putStr "determined by the magnitude of the absolute value of integer numbers. " putStr "The greater is the number -- the greater is the amplitude change. " putStr "The count begins with \"0000\" and ends with \"9999\" (the sign is not "- putStr "taken into consideration). In such a case, for the Strings without the "+ putStr "taken into consideration). If there is less than 4 digits in a String, "+ putStr "then the String is equivalent to that one with the appropriate number "+ putStr "of zeroes preceding to fulfill to the 4 needed digits (for example, "+ putStr "\"657\" is equivalent to \"0657\", \"-2\" is equivalent to \"-0002\" etc.). "+ putStr "In such a case, for the Strings without the " putStr "initial sign \"-\" (the sound increases) an interval between the " putStr "maximum by modulus value of the amlitude (which is represented by the " putStr "parts of 1) and 1.0 is divided into 10 equal parts (starting a count "@@ -99,12 +107,12 @@ else changeVol4 file (change0, originalStr) -- | Function 'changeVol2' is used internally in the 'specifyVol' in case of decreasing of the sound.-changeVol2 :: FilePath -> String -> IO ()-changeVol2 file xs = do +changeVol2 :: FilePath -> String -> Double -> IO ()+changeVol2 file xs ampl = do let ys = take 4 . filter isDigit $ xs coefA = 0.0001 * fromIntegral (read ys::Int) ratio = 1.0 - coefA- volS file ratio+ volS file (ratio * ampl) removeFile file renameFile ("8." ++ file) file @@ -117,12 +125,12 @@ let delta = 1.0 - ampl xs = filter (\x -> isDigit x || x == '-') change0 if take 1 xs == "-" - then changeVol2 file xs+ then changeVol2 file xs ampl else do let ys = take 4 . takeWhile (isDigit) $ xs coefA = 0.0001 * fromIntegral (read ys::Int) ratio = 1.0 + (delta / ampl) * coefA- volS file ratio+ volS file (ratio * ampl) removeFile file renameFile ("8." ++ file) file else error "SoXBasics: the volS function gave a strange result!"@@ -141,7 +149,7 @@ let ys = take 4 . filter isDigit $ xs coefA = 0.0001 * fromIntegral (read ys::Int) ratio = 1.0 + (delta / ampl) * coefA- volS file ratio+ volS file (ratio * ampl) removeFile file renameFile ("8." ++ file) file else error "SoXBasic: the volS function gave a strange result!"
README view
@@ -5,14 +5,18 @@ 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). 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 +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,
mmsyn7l.cabal view
@@ -2,8 +2,8 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: mmsyn7l-version: 0.1.0.1-synopsis: A program and a library to modify the amplitude of the sound representations for the Ukrainian language created by mmsyn7ukr package.+version: 0.1.1.0+synopsis: Modifies the amplitude of the sound representations for the Ukrainian language created by mmsyn7ukr package. description: A program and a library to modify the amplitude of the sound representations for the Ukrainian language created by mmsyn7ukr package or somehow otherwise. homepage: https://hackage.haskell.org/package/mmsyn7l license: MIT