mmsyn6ukr-0.8.0.0: A musical instrument synthesizer or a tool for Ukrainian language listening

Copyright(c) OleksandrZhabenko 2019-2020
LicenseMIT
Maintainerolexandr543@yahoo.com
Safe HaskellNone
LanguageHaskell2010

UkrainianLControl

Contents

Description

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.

Synopsis

Control the program

genControl :: String -> (String, (String, String)) Source #

Function that prepares arguments for the controlling functions for the executable mmsyn6ukr. 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 .raw 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).

Security and Limits

nSymbols :: String -> Int Source #

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 mmsyn6ukr 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).