Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Maintainer : olexandr543@yahoo.com
A program and a library to modify the amplitude of the sound representations for the Ukrainian language created by mmsyn7ukr package or somehow otherwise.
Synopsis
- changeVolume :: FilePath -> IO ()
- specifyVol :: FilePath -> IO ()
- changeVol2 :: FilePath -> String -> Double -> IO ()
- changeVol3 :: FilePath -> (String, String) -> IO ()
- changeVol4 :: FilePath -> (String, String) -> IO ()
Documentation
changeVolume :: FilePath -> IO () Source #
Function changeVolume
is used to change the amplitude of the sound.
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 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
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.
specifyVol :: FilePath -> IO () Source #
Function specifyVol
is used internally in the changeVolume
to get the String
and to apply the needed change.
changeVol2 :: FilePath -> String -> Double -> IO () Source #
Function changeVol2
is used internally in the specifyVol
in case of decreasing of the sound.
changeVol3 :: FilePath -> (String, String) -> IO () Source #
Function changeVol3
is used internally in the specifyVol
in case of working with the maximum amplitude.
changeVol4 :: FilePath -> (String, String) -> IO () Source #
Function changeVol4
is used internally in the specifyVol
in case of working with the minimum amplitude.