-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A musical instrument synthesizer or a tool for Ukrainian language listening -- -- A program can be used as a musical instrument synthesizer or for -- Ukrainian speech synthesis especially for poets and writers. Uses -- arrays and .ul RAW sound file formats and SoX inside. Since the -- 0.2.0.0 version it supports reading from the file and multiline input. @package mmsyn6ukr-array @version 0.3.2.0 module Paths_mmsyn6ukr_array version :: Version getBinDir :: IO FilePath getLibDir :: IO FilePath getDynLibDir :: IO FilePath getDataDir :: IO FilePath getLibexecDir :: IO FilePath getDataFileName :: FilePath -> IO FilePath getSysconfDir :: IO FilePath -- | Functions provide functionality of a musical instrument synthesizer or -- for Ukrainian speech synthesis especially for poets, translators and -- writers. module Melodics.Ukrainian.Arr -- | The first version has been initially inspired by: -- https://mail.haskell.org/pipermail/beginners/2011-October/008649.html -- -- The function that actually produces a .raw file. Since 0.3.0.0 version -- changed the type. appendULFile :: FlowSound -> Handle -> IO () -- | The function that converts a written Ukrainian text into the sounding -- in the program phonetical respesentation. It is not exact phonetically -- but you can make for yourself a general impression of the Ukrainian -- sounding. convertToProperUkrainian :: String -> [String] isUkrainian :: Char -> Bool -- | Can be used to show a sorted list of the Ukrainian sounds -- representations that for mmsyn7 series of programs. Is taken from the -- mmsyn7s package. module MMSyn6Ukr.Show7s.Arr -- | Function takes a Ukrainian text being a String and returns a -- sorted list of the Ukrainian sounds representations that can be used -- further in mmsyn7 series of programs. show7s :: String -> [String] -- | A program and a library that can be used as a musical instrument -- synthesizer or for Ukrainian speech synthesis especially for poets, -- translators and writers. module UkrainianLControl.Arr -- | Function that prepares arguments for the controlling functions for the -- executable mmsyn6ukra. It takes a first command line argument -- and makes an analysis to produce a set of String. The first -- resulting String is an argument to nSymbols function, -- the first in the inner tuple is an argument to the compression level -- for the comressed formats and the last one is the resulting file -- extension. The default value (no command line arguments) is ("", -- ("", ".wav")). Please, specify the command line argument (if -- needed) in the form "ABC"" where A is either a letter 'f', 'o', 'w' or -- a digit and B and C are both digits (or something equivalent, see -- below). -- -- Their meaning: -- -- A: -- -- 'f' -> native FLAC format with compression from 0 (least) to 8 -- (best compression ratio) specified by the third characters; '9' is -- equivalent to '8'. This format is optional so, please, check whether -- it is supported by your SoX binaries. If no, install the SoX with -- support for the format. For more information, please, refer to the -- sox documentation. -- -- 'o' -> Ogg Vorbis format with compression from -1 (best) to 10 -- (least) specified by the characters after the first two characters. -- The default value is "-1". This format is optional so, please, check -- whether it is supported by your SoX binaries. If no, install the SoX -- with support for the format. For more information, please, refer to -- the sox documentation. -- -- 'w' -> WAV format with two options for rate - 11025 Hz if the third -- character is less than '5' and greater than '0' and otherwise 22050 Hz -- (the default one also for no command line arguments). -- -- If A is a digit, then it is used accordingly to nSymbols -- function and SoX (if properly installed) quickly converts the .ul file -- to the default .wav with 22050 Hz rate. -- -- To obtain the best compression ratio, please specify something like -- "o9-1" or "o5-1" (or similar). For the best lossless compression - -- "f98" or "f58" (or similar). -- -- For more information, please, see the sox manuals (e. g. for -- soxformat). genControl :: String -> (String, (String, String)) -- | Function that converts the first digit in the command line argument -- (starting the argument or being the second one after the letter -- character) given, which is a digit in the range [0..9] -- (providing an ascending approximately exponential scale with a basis -- of 10 starting from 2 and ending at 1000000001), to the upper bound of -- number of symbols that the main function of the -- mmsyn6ukra executable reads from the stdin for -- sounding. The default resulting value (no input) is 31416. If there is -- another first command line argument then the program terminates with -- the informational message. Using the command line argument is done for -- the security reasons: because of performative writing to the resulting -- file(s) there is a need to limit the used memory. For most cases it is -- enough to use the default value. If you have enough resources and a -- large Ukrainian text amount then specify the higher values (5 or a -- greater one). nSymbols :: String -> Int -- | A program and a library that can be used as a musical instrument -- synthesizer or for Ukrainian speech synthesis especially for poets, -- translators and writers. module Melodics.Executable.Arr -- | Is used to repeat the cycle of creation of the sound files in the -- current directory for the mmsyn6ukr executable. circle :: String -> Bool -> FilePath -> IO () -- | Interactively creates sound files in the current directory for the -- Ukrainian text input. Is used internally in the circle workWithInput :: String -> Bool -> FilePath -> Int -> IO () -- | Converts RAW sound to the sound file of the needed format in the -- current directory accordingly to the genControl for the first -- String argument. Is used internally in the -- workWithInput. rawToSoundFile :: String -> String -> FilePath -> IO () -- | Prints informational message about ending of the possible for the -- given data program operation on sound files. Is used internally in the -- workWithInput. Is used internally in the workWithInput. printInfoF :: IO () printEnding :: String -> IO () -- | Is used to retriev the user-defined file name for the record. recFileName :: IO String -- | A program and a library that can be used as a musical instrument -- synthesizer or for Ukrainian speech synthesis especially for poets, -- translators and writers. module Main -- | The function creates a raw .ul sound file with bitrate 22050 Hz 1 mono -- channel and tries to automatically convert it to the .wav, .ogg, or -- .flac file with the same parameters specified by the first command -- line argument (for more details see: genControl function) -- using the system binary SoX (this is done for one circle of running, -- afterwards it is repeated with the same command line arguments. To -- stop execution, please, interrupt the program e. g. with Ctrl + C on -- many Unix platforms). So actually, it can create multiple sound files, -- all in the same format options specified by the first command line -- argument accordingly to the genControl function. -- -- If SoX binaries are not installed properly, the program makes ending -- informational message for the user. -- -- The first command line argument is the genControl -- specification. -- -- The second command line argument (if specified) must be in the form -- "+O" and then if specified denotes that the program cycle runs only -- once and exits after creating the single converted sound file. If -- specified, then the program reads not the line of the input, but the -- contents and, therefore, it can use multiline contents (e. g., -- poetry). -- -- The third command line argument is the filepath to the file with the -- Ukrainian text that instead of the user input provided otherwise into -- the prompting line on the terminal is read to be converted. -- -- The best comression ratio is with the .ogg files, but they lose some -- quality so be careful if you need it. main :: IO ()