diff --git a/-.ul b/-.ul new file mode 100644 index 0000000..5c0c39e --- /dev/null +++ b/-.ul @@ -0,0 +1 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/0.ul b/0.ul new file mode 100644 index 0000000..8939193 --- /dev/null +++ b/0.ul @@ -0,0 +1 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~~~~~~ \ No newline at end of file diff --git a/1.ul b/1.ul new file mode 100644 index 0000000..ccdb831 --- /dev/null +++ b/1.ul @@ -0,0 +1 @@ +~~~~~~~~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ssqqqtvy{|~cRKFDCDFKQ\}l^WOJHFGIKMOUWX[_hnvshekmigd_^eyi^XTNKIFEFGHJLLMNOOONMLKJHHKMOVZ[[]^]_^]]dtþT;1,(%$&-9OR?4-'"!&,1578:>@>962.-.2:>DLW˽ļl`ZNF>965440-+*)*+,,,,,-./../11357:J۽7"4ͮf1! #%(+4`4# ,?I1&  &.9IͽS).篪I.%!)7|T/#!-Eʹ?+! %+0<_IJ8%!2ܵF-" !(5kʻN/'"!3󺱱V3'!# &-3?򾰫<( $1t?/*#"%$##0iƷ7( $9Ȯ]9+! %'&!!%-A̱˽8*$(;̵g?6.& %%"!"###&.AۺýJ-$ ._F4+#!%&%#!!##!  %-F˷»M1("%7ܸ=.&"&)*($#$%%%$%'-9Y˹¿:+%" "*=ع]Y|M=60-*&##$&(''(+/355215775547;CTK931//39CW[I>71.+('''))))*,/366579;<:779=H^Ļ¼K=96667;DTr^LD=:61.,+,-...//1456445679::=DN]ƿzI?<;99;@J[y|jXOF?;73///1232123555557;>?>?BFLTgľeWKD?=>CKNPPQQPKC=9534567767:<<:98:=<:::;;:::>===>>?@CEHKOV[_m|utvxuvth]WRMID@=;86421/..-..../0247:=@EKVmſ_F<5.)&$#!%*.29E[ķi]cneWPSZ\Z]ĿhN@7/,)&"!&*.6B]ѽľc9+# '-6CnĶiXNKMPNJHKVnN=3-(# (2B軭ŽkJ?9.&"+8L÷ÿVE>;6/,*(%" $(*.4?Xǻpd]WNHD?:4.+*(&$$$$$$%&&&&')+.05;EPa¾j_]^[QKJIE@=<;:86654210/////024679<>?BGMU]o}umgc`_^\XSOMKHDBAA?>>?@???@@@ACEGILOUZ_iox~|{vrpmjggeb^^^][YYYXVTTTSQPOPOOOOPPQQSUWXZ\]_bgkmpx|zzwtqqonmmllkkjihggfedcccbabccbcdffggikklmoqsuy|~~~}|{|{zzzyzxxyyxwxwxvwwwvvvxvvvwwvvvxwxxyyzyz{z{||}}~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/ChangeLog.md b/ChangeLog.md new file mode 100644 index 0000000..26f90d1 --- /dev/null +++ b/ChangeLog.md @@ -0,0 +1,19 @@ +# Revision history for mmsyn6ukr-array + +## 0.1.0.0 -- 2020-12-16 + +* First version. Released on an unsuspecting world. + +## 0.1.1.0 -- 2020-12-18 + +* First version revised A. Fixed issue with wrongly transformed "з" sound (inherited from the +mmsyn2-array-0.1.0.1 package) by updating to the mmsyn2-array-0.1.1.0 package version dependency. + +## 0.2.0.0 -- 2020-12-18 + +* Second version. Added the possibility to read the Ukrainian text from the file and to read multiline texts. For this, +changed the types of the some functions and their behaviour respectively. Some documentation improvements. + +## 0.2.1.0 -- 2020-12-18 + +* Second version revised A. Fixed issue with incorrectly defined arguments in Main.hs. diff --git a/D.ul b/D.ul new file mode 100644 index 0000000..dec5736 --- /dev/null +++ b/D.ul @@ -0,0 +1,3 @@ +~~~~~~~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}}~~~~~~~~~~}}}}}}~}~~~~}||}~}~~~~~~}{yyxz{~~}|}}}|}}|~|yxwutruu||zxttqqrty{~zuxz|||}~{xw|}yvrrt{wr~~~~~~}~}~~~~~~~}}{~}~}}~~{|x|||yxxy|~zywussvzyxwzwpmkiilrxywsv}yuutwzwqmjjlmnmnqz}kbdl{~qko~xrsw|~jacjsrliimooq~mgjttmnwpjhjptrnnsuxuxwzxxyy||~~~~|}~~{z|~}ztpuoddjrllr|zm_ZVVY_jpplkmsrnd\Z^jyo`WSQRTVXZ\_lwgcjzvi]WRPQRRMF>97666766669=BFEA>==?DIKJFCCHO^oŽpMA>===;86444664/+'%%&&&'''(*.48851026:?CC?<=DUûYIC@=:50.--.-+& "'**'%$%(+/11.,,/9EUlͽlWOO\H6.,,,+)&$#"#$$#"*--*&%&*.489633;Nž]C<:71,'$###""%$!%'(''(-7Ipʾ_\`WI>6-& +?β?,$ + + #.A߾~>/)%#!$+5Fȼ`NE@@ACB@><;;<>@@>;86420011247::8544796/-+*(&$"  !"#$'*-/5aB/)$!  $&*2:=G\ïa6)" + + + &,/9NпR2% +  + + + %(-7@MԶL0&  + + + + $(-149H߾H/'# #)-/39EZC942.)&$! #&),.3=Mo¼VH@8/+*(%#"! "$&'),.28:73/-+*)'''&%%%%%%$$$$###$%&&&()+-/259=AIUqĿzaTNMKFC?><;;::998655566666677789:;<=>?ADFHJMORW\_cm~~yohb^[XVUSPONMLJJIHGGGFFECCBBBCCCCCCCCDEFGHIIKLNPTWZ]`fn{rhb^YVTPMLKHGGD@H \ No newline at end of file diff --git a/F.ul b/F.ul new file mode 100644 index 0000000..d66f4c8 --- /dev/null +++ b/F.ul @@ -0,0 +1,3 @@ +~~~~~zzvvvwrposvonmlot}tǾqjfSJND?>?<8952-./-)$'(''#!!#  !!!"" !#%(()+*,,-5;HPKMaùĽK<:8..0)$%$    (*%,HfBG஡CmǼ><%*U9%  + + " %#'19TǾӼ®%#Ut6 (+9,    !/#&3/,.Ľ¯./BE%!1,   !(=/(/UQI޳ԴT;2*,/36'&1KID/:@ű?z5/5- "#&)&.B7DD=C;@A=?>ABBCHIKLIM\VZgȼƿXH^T?N2+K-$2''",,""",#5)F";<%e@ǦԶGvE%?>2*, $" '!8%)#G#<=.B٫ע͸^K?HFD>,08?&16%6&3&+&!.$($%&$&'')3*8>-G37P9Zõݟj]JA:H7C3D1281?.@>>?>??>@@AB@DCDFCFHILMOSTWZ\_`eilpuy} \ No newline at end of file diff --git a/H.ul b/H.ul new file mode 100644 index 0000000..af5f20f --- /dev/null +++ b/H.ul @@ -0,0 +1,4 @@ +~~~~~}~~~~{|||~||~}||zxxttoommkjjjjiiijhihiiijklnoptuy|~og_\]YWUQOMKIIHGGGIKKJJIKNOSUY^ahip_OIGGB??<8633221257;:9:;>CFMZ^lhrſǿXA858642.,)'&&&&*+,///.-2;AKVail^z¿þ_7.*,-*)'#"%&)***+5?Kcj_¼4' &# ##" ",>S[D?Uϻ5 + %+09OF@Ifŵs*  +  $,<<_f<4>󽷮0 +  "-7!!%('$(.5;DZY:/0:N˿d*"(-.,-./5@_jE958CcL.$ !!$*..--278=KPI>HSSMIJLPZk¾Q=534321/-+**+,.0137<<=?ELUWTPOOS\o¿aK@>>>=;:754456689:ELLD<77;BMRH<549E[jR?99ASldSLLRXWUaPMfźĺ\MKRnjK?>BKNKC=::=??<9778;==9669>A>968AQVE97>[X?;BnȿPIWӽo׽ML̯eҼkg}KI_xE<>JW[WSL?615@RN;.+.9HL?5.+,2DA-',C^70<^Md̽Zkͺó»˴ԻνZ:F:5Y5.?ʻ0%(9v?,# $-?YD- !3{u2"&;vk<,(*/:I>-*8ˮ@17Y̽˿;=ɭ/%(1<8.*+*!$?h34F )---.-&0@%%<ǻ@7=\ǴܷĥLnտL//DD",-)5-'<7"&78)13!b_(+ϩ¥存Ct9,*,1/#%&!*̬+۠۾]Ů=)%+;K+&*(!!  'BK*!&BY=Oϳ]8)'0Nc9$$6/ '(">?'%B=1EtR_]>/)(,0/'$''#(7W{D,! ,쮬<-6Ϊ`^M9/+(&&(+-*#%-*%)# $%$*3/&%1DOH>98:HַڽkeXI>:973.*)))(%"! !#$%&')*,/4:>ABEMhžsVKD?;73/-+)'&%$"! !#$&')*-/158<@JXxaUI>;94/--+&%. \ No newline at end of file diff --git a/J.ul b/J.ul new file mode 100644 index 0000000..7dceb62 --- /dev/null +++ b/J.ul @@ -0,0 +1 @@ +~~}|y}}}zxrt}~op~}jvpx|pjioy|p}t|dr|~zw_^wVZaO~Tacqm]dX~cUndUhVTiP_VYTN|K_WRyK{YVXdpdyw[nk`krh}ͿQg_h^VF_[_OJX@f_QMVY>]C@ID?ML=\9l<;.Oj0o9Sn>\RXlI>a:@NXd̿ջɶ٩ΩNʿWo?MT7>4??:6R,7>.:,81%56+/-45(9-::)G1;:6G6k4O57+BݽȠնSߩŞC๡1U/3L%#:H'E$/)9"),"/4%"'(,+!*)2$1. 9?'9J+05-K&'8D2!,$/"9/+"!#!)-+=*'Z2?fģóžŸƬ٦@L"ש!ܸ4M&6&"]2#(6:C*%;+#A,*=&+:)d7U*_0/Ǭ.*-86BӡLļܲNGDͮI٫=ĺ9C._C7KR1><^4-<3(VM_MnLMո@j[͵ʻЯf·Ǽ÷϶þЯʿVgܿkU@LI=<<;:98889:;;=>?CGKOWbymgc`]YRLHDA?=;96420//..----../147:=AHO\ž{hYNG@<963/-*(&%$#"! !"#%'(*-068/*$ +  )4NǰP>730/-*%   '/?켮tRJFB>81,'#  '.=<:9877776666789;=?BFJOXd~woib\XTPNLJHFDBA@???????@BDEGILNRX]ep}uomkigc_][YXWUSQOONNNNNNNOOQSVWY\^aglqzzuqonmljhfedba`_^^^]]^^^^^__acdfhjlorv{~|{yxvutrqpoonnnmmmmmnnnnnooprsuvwy{|}~~}}||||{{{z{{zzzzzzzz{{{{|{|||}}~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/L.ul b/L.ul new file mode 100644 index 0000000..f25bc37 --- /dev/null +++ b/L.ul @@ -0,0 +1,6 @@ +~~~~~~~~~~~~~~~}}~}~}}}|}}}}}~~}~~~}}zzwvtrronmmljjhhgfeedededeefghiklnotv|}tmjd_]ZXVSPONLKJIHGFEEDDDDDDDEFGHIKLNPTX^douaXOKGC?=;9864310/..-------..//1358:=?FLUdaSIA=951/-+*(&%$"!  !"$&(*,.1682.+(&#!!$'*.3:CT˿[C92-($  (/8IĵY:2-'" "'-3?S͸[EMXgnaZTOLJGECA??>>========>?ABCEFHJKMORUY\^dnx}~yvspnmljjihggggfffggghhijjklmnooqstvxy{|~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..745d144 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2019-2020 OleksandrZhabenko + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/M.ul b/M.ul new file mode 100644 index 0000000..33c41ad --- /dev/null +++ b/M.ul @@ -0,0 +1 @@ +~~}}}}~}}}}~~}}~~~~~~~~~~~~~~~~~~~ymfa`aemi\WVYb|x_WTTYdl]WTW_tn_[[_nn^YVW\et{lc`bjz{f]YXY\ipgbdnj^XST[n{wx\J>82/05>YμjE:67>TιQ9104=UκE6//8LѺ9,)*.>үJ&%E,5: '즚/"%-<ׯ?.'&,A<.,/55,#!,C¬V9/.3EͰZA=C\λJ6,&" $-JF)*L5%(>«G+ #1㮣G5/3>~j=0,+/:PüC4../4 [String] +show7s = sort . nub . filter (\x -> x /= "-" && x /= "1" && x /= "0") . convertToProperUkrainian diff --git a/Main.hs b/Main.hs new file mode 100644 index 0000000..abb31e5 --- /dev/null +++ b/Main.hs @@ -0,0 +1,46 @@ +-- | +-- Module : Main +-- Copyright : (c) OleksandrZhabenko 2019-2020 +-- License : MIT +-- Maintainer : olexandr543@yahoo.com +-- +-- 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 where + +import System.Environment (getArgs) +import Melodics.Executable.Arr + +{- +-- Inspired by: https://mail.haskell.org/pipermail/beginners/2011-October/008649.html +-} + +-- | 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 'UkrainianLControl.Arr.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 () +main = do + args <- getArgs + let zs = concat . take 1 $ args + ts = concat . drop 1 . take 2 $ args + file = concat . drop 2 . take 3 $ args + onepass = if ts == "+O" then True else False + circle zs onepass file diff --git a/Map.txt b/Map.txt new file mode 100644 index 0000000..836d42b --- /dev/null +++ b/Map.txt @@ -0,0 +1,39 @@ +Sound | Corresponding | File +representation | file | duration, s, rate = 22050 Hz, 1 channel +----------------------------------------------------------------------------------------- +"-" -> "-.ul" -> 0.101995 +"0" -> "0.ul" -> 0.051020 +"1" -> "1.ul" -> 0.153016 +"а" -> "A.ul" -> 0.138231 +"б" -> "B.ul" -> 0.055918 +"в" -> "C.ul" -> 0.082268 +"г" -> "D.ul" -> 0.076825 +"д" -> "E.ul" -> 0.072063 +"дж" -> "F.ul" -> 0.048934 +"дз" -> "G.ul" -> 0.055601 +"е" -> "H.ul" -> 0.093605 +"ж" -> "I.ul" -> 0.070658 +"з" -> "J.ul" -> 0.056054 +"и" -> "K.ul" -> 0.099955 +"й" -> "L.ul" -> 0.057143 +"к" -> "M.ul" -> 0.045351 +"л" -> "N.ul" -> 0.064036 +"м" -> "O.ul" -> 0.077370 +"н" -> "P.ul" -> 0.074240 +"о" -> "Q.ul" -> 0.116463 +"п" -> "R.ul" -> 0.107302 +"р" -> "S.ul" -> 0.049206 +"с" -> "T.ul" -> 0.074603 +"сь" -> "U.ul" -> 0.074558 +"т" -> "V.ul" -> 0.110658 +"у" -> "W.ul" -> 0.109070 +"ф" -> "X.ul" -> 0.062268 +"х" -> "Y.ul" -> 0.077188 +"ц" -> "Z.ul" -> 0.053061 +"ць" -> "a.ul" -> 0.089342 +"ч" -> "b.ul" -> 0.057596 +"ш" -> "c.ul" -> 0.066077 +"ь" -> "d.ul" -> 0.020227 +"і" -> "e.ul" -> 0.094150 +"ґ" -> "f.ul" -> 0.062948 +-------------------------------------------------------------------------------------------- diff --git a/Melodics/Executable/Arr.hs b/Melodics/Executable/Arr.hs new file mode 100644 index 0000000..665360d --- /dev/null +++ b/Melodics/Executable/Arr.hs @@ -0,0 +1,98 @@ +{-# OPTIONS_HADDOCK show-extensions #-} + +-- | +-- Module : Melodics.Executable.Arr +-- Copyright : (c) OleksandrZhabenko 2019-2020 +-- License : MIT +-- Maintainer : olexandr543@yahoo.com +-- +-- 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 ( + circle + , workWithInput + , rawToSoundFile + , printInfoF + , printEnding + , recFileName +) +where + +import Data.Char (isSpace, isControl) +import Data.Maybe (isJust,fromJust) +import System.IO +import System.Process (callProcess) +import System.Directory (removeFile) +import Control.Exception (onException) +import EndOfExe (showE) +import Melodics.Ukrainian.Arr (appendULFile, convertToProperUkrainian) +import UkrainianLControl.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 () +circle zs onepass file + | onepass = onException (workWithInput zs True file 1) (printEnding zs) + | otherwise = onException (mapM_ (workWithInput zs False file) [1..]) (printEnding zs) + +printEnding :: String -> IO () +printEnding xs = do + putStr "Notice, there was (may be) CmdLineArgument exception. To avoid it, please, specify the command line argument (if needed) in the form \"ABC\"" + putStr " where A is either a letter \'f\', \'o\', \'w\' or a digit and B and C are both digits! The exception (may be) arose from " + putStrLn $ "the command line arguments " ++ show xs ++ ". Please, check also whether the SoX was installed with the support for needed codec" +{-# INLINE printEnding #-} + +-- | 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 () +workWithInput zs onepass file _ = do + [nameSF,ys] <- if null file then nameAndControl zs onepass file [1,2] else nameAndControl zs onepass file [1,3] + withBinaryFile (nameSF ++ ".ul") AppendMode (appendULFile (convertToProperUkrainian (if onepass then unwords . words $ ys else ys))) + putStrLn "The .ul file was created by the program. If there is SoX installed then it will run further. " + let ts = showE "sox" + if isJust ts + then rawToSoundFile zs nameSF (fromJust ts) + else printInfoF + +-- | Is used to retriev the user-defined file name for the record. +recFileName :: IO String +recFileName = do + putStrLn "Please, specify the name of the resulting sound file. Please, do NOT use '}' character and space or control characters!" + nameOfSoundFile <- getLine + let nameSF = filter (\x -> not (isSpace x) && not (isControl x) && x /= '}') nameOfSoundFile + return nameSF + +getCtrl :: String -> Bool -> IO String +getCtrl zs onepass = do + xs <- if onepass then getLine else getContents + let ys = take (nSymbols . fst . genControl $ zs) xs + return ys + +recFNAndCtrl :: String -> Bool -> FilePath -> Int -> IO String +recFNAndCtrl zs onepass file n + | n == 1 = recFileName + | n == 3 = readFile file + | otherwise = getCtrl zs onepass + +nameAndControl :: String -> Bool -> FilePath -> [Int] -> IO [String] +nameAndControl zs onepass file = mapM (recFNAndCtrl zs onepass file) + +-- | 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 () +rawToSoundFile zs nameSF executablePath + | null zs = do + callProcess executablePath ["-r22050","-c1", nameSF ++ ".ul", "-r22050",nameSF ++ ".wav"] + removeFile $ nameSF ++ ".ul" + | otherwise = do + let ws = snd . genControl $ zs + callProcess executablePath (if snd ws /= ".wav" then ["-r22050","-c1", nameSF ++ ".ul", "-r22050",fst ws, nameSF ++ snd ws] else ["-r22050","-c1", nameSF ++ ".ul", fst ws, nameSF ++ snd ws]) + removeFile $ nameSF ++ ".ul" + +-- | 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 () +printInfoF = do + putStr "You have a resulting file in a raw PCM format with bitrate 22050 Hz and 1 channel (mono) in the .ul format. " + putStr "You can further process it by yourself manually, otherwise, please, install SoX executable in the directory mentioned in the variable PATH and then run: " + putStrLn "\"Path_to_the_SoX_executable\" -r22050 -c1 name_of_the_file_in_ul_format_with_new._prefix name_of_the_file_in_wav_format_with_new._prefix in the terminal." diff --git a/Melodics/Ukrainian/Arr.hs b/Melodics/Ukrainian/Arr.hs new file mode 100644 index 0000000..6f7350c --- /dev/null +++ b/Melodics/Ukrainian/Arr.hs @@ -0,0 +1,71 @@ +{-# OPTIONS_HADDOCK show-extensions #-} +{-# LANGUAGE BangPatterns #-} + +-- | +-- Module : Melodics.Ukrainian.Arr +-- Copyright : (c) OleksandrZhabenko 2019-2020 +-- License : MIT +-- Maintainer : olexandr543@yahoo.com +-- +-- Functions provide functionality of a musical instrument synthesizer or for Ukrainian speech synthesis +-- especially for poets, translators and writers. +-- + +module Melodics.Ukrainian.Arr ( + appendULFile + , convertToProperUkrainian + , isUkrainian +) where + +import qualified Data.ByteString.Char8 as B +import System.IO +import CaseBi.Arr +import qualified Data.Foldable as F +import GHC.Arr +import qualified Melodics.ByteString.Ukrainian.Arr as MU (convertToProperUkrainianS,isUkrainianL) +import Paths_mmsyn6ukr_array + +{-| +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. The mapping table is given in the @Map.txt@ file. +appendULFile :: [String] -> Handle -> IO () +appendULFile xss hdl | not (null xss) = + do + dataFileList <- mapM getDataFileName + ["-.ul", "0.ul", "1.ul", "A.ul", "B.ul", "C.ul", "D.ul", "E.ul", "F.ul", "G.ul", "H.ul", + "I.ul", "J.ul", "K.ul", "L.ul", "M.ul", "N.ul", "O.ul", "P.ul", "Q.ul", "R.ul", + "S.ul", "T.ul", "U.ul", "V.ul", "W.ul", "X.ul", "Y.ul", "Z.ul", "a.ul", "b.ul", "c.ul", + "d.ul", "e.ul", "f.ul"] + dataArray0 <- mapM B.readFile $! dataFileList + let !dataArray = listArray (0,34) dataArray0 + mapM_ (\u -> + if F.all (\z -> B.length z > 0) dataArray + then let rs = tail . dropWhile (/= ' ') . takeWhile (/= '}') . show $ hdl in do + hClose hdl + closedHdl <- hIsClosed hdl + if closedHdl + then do + B.appendFile rs $ unsafeAt dataArray . getBFstLSorted' 0 [("-", 0), ("0", 1), ("1", 2), ("а", 3), ("б", 4), + ("в", 5), ("г", 6), ("д", 7), ("дж", 8), ("дз", 9), ("е", 10), ("ж", 11), ("з", 12), ("и", 13), + ("й", 14), ("к", 15), ("л", 16), ("м", 17), ("н", 18), ("о", 19), ("п", 20), ("р", 21), + ("с", 22), ("сь", 23), ("т", 24), ("у", 25), ("ф", 26), ("х", 27), ("ц", 28), ("ць", 29), + ("ч", 30), ("ш", 31), ("ь", 32), ("і", 33), ("ґ", 34)] $ u + else error "File is not closed!" + else error "Data sound file is not read!") xss + hClose hdl + | otherwise = return () + +-- | 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] +convertToProperUkrainian xs = new2OldRepresentation . MU.convertToProperUkrainianS $ xs + where new2OldRepresentation :: String -> [String] + new2OldRepresentation ys = map f $ ys + where f = getBFstLSorted' "" (zip "-01ABCDEFabcdefghijklmnopqrstuvwxyz" ["-","0","1","дз","ж","й","сь", + "ч","ш","а","б","ц","д","е","ф","ґ","г","і","дж","к","л","м","н","о","п","ь","р","с","т","у","в", + "ць","х","и","з"]) + +isUkrainian :: Char -> Bool +isUkrainian = MU.isUkrainianL diff --git a/N.ul b/N.ul new file mode 100644 index 0000000..53d8b28 --- /dev/null +++ b/N.ul @@ -0,0 +1 @@ +~~~~~~~~~~~~}~}}|{{{z{zzyzyxwxwyxxwwxzy{z|}~~~~~xqruwqmijkmjgdddb_^]]]\YXYYXXWWWWVUVWYXXZ\__`aflr{{ofc`_\XUTUQLHEEEFDBA@A@BEHIGGIKKIIJLMMMMNPQOMNPQPOQV[]^_dkqx}¿k^WRNKHFDDBA@??>===<;;:98531/.--,,++*****)*,--,-04669?IQXgɿvXLD>;963210/....-,,,+*(&#! #%%&*08:93/,+**)'&%$#! #%').9DLWݾ[J?81.,+*)'&%$" '/:?GxeNC<61.,,,*)''&$"!! #$&+4?GN\K@:4/.-,*)('&$"!!! !#%',5>DLrƷbSJC>;99874321/..--,+**)'%$$#! ! "#"!"#$%%(,.04;G[w_VRNIDBBC@=<<=<:8888765542//..-,,,----.////25778;?DGJQeohc_]ZWWVVTRQQPOMMMMMKJIJIGFFFFFEFGGGIJKKLNPRTVX]ahlx}|zywxvvutussqrrrrrrsrrsrtsuuuvwxxyz{||}}~~ \ No newline at end of file diff --git a/O.ul b/O.ul new file mode 100644 index 0000000..a798868 --- /dev/null +++ b/O.ul @@ -0,0 +1,11 @@ +~~~~~~~~~~~~~~~~}}~}~}~~~~~}~}}~}~}~~~~~}~|||{yyxxvwttronlkkjihgffeffggggghiijjkklkmoqqsw|ysnkifb_^]\[ZYXVROMLKJJIGFFEEFFGHGGHKKLLMNNOQTVX[_hune]XSOMKHFDCA?><:7543320//..../////12345789:<>?@DJS_vľp]TLD?<:8420/.,*(&#! !"#%&()*+-/26;@La˿eOG?;62/-+)'%$" !$&),/6>JjѿpNA:5/,*'%$! #',381,(%#  + + "(-6F澰aE90,($  +  +  '-6GܹW@6.*'$  + + + + + + $*/9KܽYC:3.,)&#  #',19CZԾcMB<72/,*'%#!!#&(+-18>IZǻ|[ME?;852/.,*)'%#!  !"$%'(*+-/248<@HO_žxcYRMIFC@>=;:875320///....-....//01235689:<=?ADGJNT[dy¿xnhd_]ZWUTRPONMLKJJIIHHHGGGHHHIIJKKMMOPQSUWYZ\^adglpz|zzvusrqpoonnmllkkkjkjjjjjkkkllmmnnooqqsstvvwyx{z||}~~~~ \ No newline at end of file diff --git a/P.ul b/P.ul new file mode 100644 index 0000000..4a80ad3 --- /dev/null +++ b/P.ul @@ -0,0 +1,12 @@ +~~~~~~~~~~~}~|~|}}|||||{||||{}{}|}}}}}~}}||yxuuqpmmkihfdba__^]\[[[ZZZZZ[Z[\]]^_`cdhkmqy}vomid_][XUSPNMKJHGEDB@?>>==<<<<;;;;;<<=>>?ACEHJNPU\fy¿j`ZSOKGC?=:97530.-,+*)(&%%$########$%%')*+,/147K_»_NG>:5/,)&#  "(.4>O÷`L?82/+'$ + + + + + %+3AlȹqJ@91,($ +  + + &.7N̹YE<5.*&! +  + + %+2?mĶtRD;5/+'$! #(-3=OڿlTI?:5/-*(%"!$(,04<:86430/..-,,,++++,,,--../02468:=>BFKOWa|xnf`[XVSPNMLJHGGEDCCCBBBCCCDDEFGHIKLMOQTWZ]`fmv|xuronlkihgffddbba``_`_``aabbcceeggijklmnopsuxy|}~~~~~~~~~~}~~~~}~~~~~~~~ \ No newline at end of file diff --git a/Q.ul b/Q.ul new file mode 100644 index 0000000..14a39c5 --- /dev/null +++ b/Q.ul @@ -0,0 +1 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~}~~~~~~~~}||||z{yyyzzyz{z|{}|}}~|zuqnmkkklkmlnortwwwuvuvvutsruw{{~~}zvutwwuqkieca_][ZYZZ[\]^`dglpuwxz|pd[TOMLKKKLMOQSVXZZYWUTTTSRSTX\_fmytg^ZWWVUSQPOOMJFC@?>=<;<=>@CFJMSY^fovzxzzsuÿuZKB<9876678:;;<<==<;999:;;;=@FJNRX_ins{`TMHC>;86420/.----../0247:=?BFILNPPPRTVWVVY_mſO?82/...---,--.-,+***++**+-.0369<94/,*(%""&)-06:=?BEFEB??????@EM]úG5,&"  !$&)*,-/37;?FLR^¿Q@930.+($  %)-1578898632258;>FXM3)! #%(,/5HRbýL>84/,(#"'+.14789753345679>KnϿL5+%  #%')+.17?DMbʿ^B7/-+*))(''''(('%$$%&&''(*,-/147:=BHNV^o¿]OJFB>:62/.,*(&%%%&'(*,.159=====;:7544442113688889:<===>?CHMU[_ck|¿nc[VQMJFC@>=<<;;;<=>?ABDEHJMNNOQTXZ\\]_`dhn|~lb\YWUTQOMLKKKLLKKKLMMLLKLLMNNPRUY\_dgjmqy|vqmid_][XVSQPOPPQRSUVWY[\]^`cfgiiijjjjjjknpw}|wsomkihedccefffeeeeeddcdefijllmnpsutuwz|~~|zxvtrppoonnnonooqqsstuvwxyxyyzzzzz{{||}~~~|~|}{|{{{{{{{{z{zzzz{{z{{||}|~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/R.ul b/R.ul new file mode 100644 index 0000000..9a28053 --- /dev/null +++ b/R.ul @@ -0,0 +1 @@ +~}~~~}~~~~~~~}~}}~}~}~~~~~}}}}}||yzzxxvvvvuwtwtutuuutvwvwxxxxxxxxxywxxxxvxxxzz}zqmheb_^\[[ZYXXWUTSRRRSUW[^foztroqv{}vjc^\ZXXWXZ]clzmhfeeeeeeegjpvoljhijjhc]WQOMLLKKKKKKKJJJJJJJJJJJIIIIJJKKKKKKKKKKLMOS^jb\YURPOMMKJIHHGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHIJKLMOS\ko]TOMLJIHHGGGGGGGGGHHHHHHHHHGGGGGGGGGGGGHHIJJKMNORX`ove\UQONMLKKJJIIHHHHHHGGGGGGGGGGGGGGGGGGGGHHHHIIJKKLMOPU]lzkb]XURPOONNMMMMLMLLLLLLLLKKKKKKKKKKKKKKKKLLLLMMMMNNOPQSWZ]bjsumhe`^][ZXXWUUTTSRQQPPPOOOOOOOOOOOOOPPQRSTWXY[]^`dfjlpsx{}|xusponmlkjijjhjijjjkklmmnnooppppppooonmmmllllklkllmmnposuxz|~|yywvvvuutuuuuuuwvwvvwvwuuususrqqpooooooooppqrsuvvxy||}}{|zyzzzyz{|{}}}~}}|}{|{z|zzzyzy|{}}}~}}|{zzzzxxxxzxzzz{{}}~~}}~~}}|{{|{z{z|zz|{|{{{{{|{||{{|{|z{{zyzyzzyzzzzyz{|{{}}}~}~}~}}{}{}z|}}}}}~}~}}}}}}}}}}}~}}}|~}}~~~~~~~~~~~~~~~}~}}~~}~~|~~~}~~~~~~~~~~~~}~~~~}~~~}~}~}}}~}~~~}~~~~~~~}}}}}~~~}~}~~~~~~~~~~}}~~~}}~~~~}~~}~~~~}~}~|~~~~~}~}~~~}~~}~~}~}~}}}~~~|~~}~}~}}}}~~}}~~}~}}~~~}~~~~}|~}~~~~|~~}~}~~~~~~~~~~~}}}~~}~}~~}~}~~~}~~~}}~~}}}~~}~~~~~~~} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee2eee6 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ + ***** Usage ***** + ================= + +The program can be used as a special musical instrument +or a voicing for Ukrainian text. It is not +phonetically exact and proper, but it gives +an inspiration to listen to the Ukrainian sounds more attentively. +It can be used by writers (especially poets) to compose melodic +texts. It can be used simply for the experiments. There is an +opinion that Ukrainian is a very melodic language, so you can +even not knowing it get some impression and get acquainted with +this beautiful language. There are a lot of songs in it and the +program is intended to open some part of beauty of the language itself. + +The phonetic and writing system material are from the source: + +[Solomija Buk, Ján Mačutek, Andrij Rovenchak. Some properties of +the Ukrainian writing system. Electronic resource](https://arxiv.org/ftp/arxiv/papers/0802/0802.4198.pdf) + +Uses the ukrainian-phonetics-basic-array package. + +Since the 0.2.0.0 version supports the reading from the file and multiline input. +For more information on that, please, refer to the documentation for the +Main module. + diff --git a/S.ul b/S.ul new file mode 100644 index 0000000..286b73f --- /dev/null +++ b/S.ul @@ -0,0 +1 @@ +~~~~}~}}}|}|}{}|||||||||||}}}}~~}{tnkltxokgfec^WNIC@?@BCDEIO\|zg]WROMKIFC?<:876420/.--,++******++++++,-./257:<@GMRUW^OC>?I^K;1,)'&$"&4߱]J?92-(##',.038Eƽ[=3/4?pö@0(# ,dUF;1+%!$(+,-/9La>0+(*1?pǷD3*%! (/9AOɻeTKD?;8520.-,*))('''''&&%%$$$%%%%%%&&&&&%&'()+,-.../037:=?CIRaĿ|^SMLKIE@>=<<<;:97531/.,*()/>yS7+&%)1F¿RHDFKPX[\\YQG=6225:AL]ſ{bXOLIGEDCBA@?=<:99999:::;;;;;;<<=>?ACEFHJLMOSX]eo|nf_\XTQQPOMKHG \ No newline at end of file diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/T.ul b/T.ul new file mode 100644 index 0000000..36a82d6 --- /dev/null +++ b/T.ul @@ -0,0 +1 @@ +~~}~~~~~~~~~~~~~~~~~~~~~~~}~}}~}|~~~~}~}~}}~~|{}|}~~}{~|~{}|z~w|{w|{u{sry{z{zsuvtoxzy}tv{}wzyzyvuyuvoyw~v~xw~yupwporymhz|_umttzouivtnoqc~tlxjndaiowoln~{_k|tamuc~~tq]hKlW`~jbr_gubVl~\qaK[doyakeX]ZhO_V_eircu_R]w\fw_\hoRFYRbR\btVG_JLm_^dggmdPU]S|Oe[Qxj]dNVfZsfNh[^bmJNiu_[gQzPkLXkN\μJ=fuL?NInAYkGbpBai^MRXCd»=DH]FwMAKhFlR>^[VA`]bG<`AG7F@o?wGDNh2caܽNLЭV@icGS>uAXEi^dHFBWNi8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cJigVtfѿ`˸kO=Jÿh|H?\>P2;t:?D=KL>O3EI4S6:|?[I?WkMyTLڻbk__W>I;:=5039(-.)-+),.$)/-'+/,*,:.374>;:;UK?][öλ{ƽĽMiZnJ\IIDG?R@>^UKZ_dQZ_XOOOSLGRMFGKIKJHKJKGNMKMKSLTYUW\q[cuio~}~osot|v{pnnhhgeghfiihjhhkigjighhhgjijmlnptxy~~~}}}||{{{zzyyyxxxyy{y|{}}~}~~~~~~~~~~~ \ No newline at end of file diff --git a/UkrainianLControl/Arr.hs b/UkrainianLControl/Arr.hs new file mode 100644 index 0000000..786e83f --- /dev/null +++ b/UkrainianLControl/Arr.hs @@ -0,0 +1,64 @@ +-- | +-- Module : UkrainianLControl.Arr +-- Copyright : (c) OleksandrZhabenko 2019-2020 +-- License : MIT +-- Maintainer : olexandr543@yahoo.com +-- +-- 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 ( + -- * Control the program + genControl, + -- * Security and Limits + nSymbols +) where + +import Data.Char (isDigit) +import CaseBi.Arr + +-- | 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 'System.IO.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 +nSymbols xs | null xs = 31416::Int + | otherwise = getBFstLSorted' (31416::Int) (map (\n -> (n, (10^n + 1)::Int)) [0..9]) (let temp = read xs::Int in if temp <= 9 && temp >= 0 + then temp + else error "Please, specify a digit as a command line argument for the program!") + +-- | 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)) +genControl (x:xs) | x == 'f' = ([head xs], ("-C" ++ (if (compare (tail xs) "9" /= GT) && (compare (tail xs) "0" /= LT) then take 1 . tail $ xs else "8"), ".flac")) + | x == 'o' = ([head xs], ("-C" ++ (if ((compare (tail xs) "9" /= GT) && (compare (tail xs) "0" /= LT)) then take 1 . tail $ xs else if (tail xs == "10") then "10" else "-1"), ".ogg")) + | x == 'w' = ([head xs], ("-r" ++ (if ((compare (tail xs) "4" /= GT) && (compare (tail xs) "0" /= LT)) then "11025" else "22050"), ".wav")) + | isDigit x = ([x], ("", ".wav")) + | otherwise = ("", ("", ".wav")) +genControl [] = ("", ("", ".wav")) diff --git a/V.ul b/V.ul new file mode 100644 index 0000000..6f73b0d --- /dev/null +++ b/V.ul @@ -0,0 +1 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~}}}~~~~~~~~~~}~|||}}~~~~~~~}}}}}~~~~}}~~~~}{{zzz{z|{}||{|{|{|||}}}}~~~~}|}|~|~}}|||||}}}}}~~~}|{yxwxwxxyzz|}}}||}}~~~}}}{|{|||~~|{ywuttvvy}|{zyyyzyyyyyy{|}|zzyyzz{}~|zwwwwyy}}}|zyyxxwyy{z||}~~~|{yxxvwvwxyyz||}yvtssuvx{}|yvrqpqux}wsqrv|~zvx~ue\WTSSUY]guzvvuwx{|}{wpke_\XVUTUW[_i{}xusuvyyxvqnkihikmpty|}}|{{z}|}{wtolkjkloswwunjgcchrzaYTSTX^hz|j^YVW[gxsygbfvcWPLMLLMMMLKJHHGGHILOVc~wu|v_WPMLKJJIHGGFFEEEEEEFGGJMOSW\blýl_ZVSPONLLJIHHGGGHHJKMNPTX\_flvrc]YVTRRPONMLMLKKLMMORW]erukb]YURPOOOOPRTVXZ\]_ejrunlllorwyxtnjfb```cgjnprromkklp{ymgcbcehkmlje_\XVVVX[^fmw}}zsolns{j`\ZXXYZ\]]]\[ZYYZ\_emzytrpprtxz|{xtomkjjlov}uoopw~tonot|~tolklowvmgcb`bcgkouz}|zvrqnonosvy}zurpqtw|}ywuvx{~}yvrqprtx|}vuqqrrtuuutrqoorv}wmkjlpoieeglxvkfbcflwsib_^_cho|xokijlr~|y|~wpmkihggggfhhjllmmmkihgfginx{pljjlou{~yqke`^]\]`eks~~|zxxwwutsssqqqqqrrrrrssttuuvwyy{{}|~}~~~~~~}~|}||}|{|{|{{{{zzzzyzyzzz{z{{{{{{{|{|||}}}~~~~~~~~~~~}~}}}}}}}~|~}~}~}}}}~~}~~}~~~~}~~~~~~~}~~~~~~}~~~~~~~}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/W.ul b/W.ul new file mode 100644 index 0000000..3c0f6f4 --- /dev/null +++ b/W.ul @@ -0,0 +1 @@ +~~~~~~~~~~~~~~~~~~~~}~}}}}~}~~~~~~~|}zzyyyyyxyxyvyvxwwxwxyyzxyxyyyz{{~}~|ywutrpommkkjjjkkmlnnmllllmmooqqokea^][[ZZZ[]^acfgko|tkc^ZXURONLKJIJJKKLLMNNOPRTVY[^`beghihfeb`^[YXVUUTUWZ^fnÿk\SMIEA?=<<;::99::;<=>?ADFIKNQVY\^cl}iYOLKIFDCDGKOU[_gqſfTJC><98654210/000123579;=?ADGJLOQTWZ]]]\YTPNMLKJKKMNPU[fľoXMF?<853210/.--../02468;=@DGJMQV[apvVH@=:85322359BFJKLLKJHDBAAA@?@ACFHJMT]}üvL>82.+(&$"!  "#%&(*,.159ADGJNSTTOKFA?=<;;<=>AFM[ļqI;2-)%!!$'*-/47EO[ZL=3-*(&$"!"$'+/4:@NƸJ8-'"!$'),.1589::::9755666679;=@EJSh̿K<3-)&# "%'*,/147:=BGF>7/-+*(&%%&),/7>LijF92-*'$"  !!"#$&()+,./2479;<>@CEEDC@>=====>?CGLTdȿgMA;50-+)('&%$##$$%'()*,.0368:=?CFJPZccXJ?;8641//0259>BIO_ûVE<60.,*)('''''(((()*,-./268;=?CFGHIIIHFDDEEEEGIKMOTY`tǿ^NF?;8520/.--,,,--../02468:<>@CFHKNQQLF@><<:9889<>CJS_oWLE@=;875433344556789:;<=>@CFHJJJJJJJHGFFGHHIJKMOSX]dnĿo_WPMIGECBBAA@@????@AABDFHJKLNOQRSSSTUVVUURQONMMMNPU[ex}pid^[XVTSQONMLLLLKKKKLLLMNNOOQSUVWXYZ[]]__behjmoux}~vokhda_^]\[ZZYYXXXXYYZZ[\]^^_`abcdegijkmnooqpqoopqtu{~|zwtrpnnmlkjjiiihhhiiijjjjkklmmnnooqrsuuvxx{z||}~~~}}||{|{{{{{{{{{{{|z|{||}|}|}}}}~~~~~~~~~ \ No newline at end of file diff --git a/X.ul b/X.ul new file mode 100644 index 0000000..f4ebee7 --- /dev/null +++ b/X.ul @@ -0,0 +1 @@ +}xq`_dXXURRNJLJGGBA?C>=<:<<=99<;8::;?D@CMHKOb{pƿkPPXBD<8/.*(*"##"!#" $% $"%%)*)-,//33:;;?@lZlڷȽ˳]BBX]:2:1'(D)'"$-) &$+ +""/3*.906:7;>MDG^G^ܺԦܰĽfEgnF7J98/EGBQO>4T9JHN7{;CEQBU/5/SE.D,0N3&3C*5L#1/&DNH*;ƹر[ǪEɯ˧¬̩m:HI<@::]bvv̮GFͽۭ˴EϺDUUܻ?OC̿ckRF>hI^+ʪJ˵>ϼ]lr]WH?:ͿO;>ε}U.EYWٸFACGH5,(-.)14GLOXϿytݾľv˻ɿÿ׶ǼİQsǸȹѾ̿׶¿иοfiZki^jcjeſoYo[\jkfz`enh[~\vU_mj_g]GNSyWit\j^fWNXITZi^U`QY\O_VJLKXLZM`qfOGISUOPRxSHMgaXmTPXg]ScreX\OS>>UKdT^`\N\NUNUfYr_gfmseTqjX`g_`UXRY_V^cgXZkYZWS^UtyibfWbOWh^jTogbpdgfb[QWXXURkn]b][TOZ`]T^_UTRX\^]\Z^WX\Wa[\_^hX^eXWXXQNKNQNNPTOPZ\baj{zk_hdggbla_bbbdc`gikecgdd]]]YZ[^a`acdcfcbgb_bfgglnqmnosrpoklhikllkntvy|~~~~~ \ No newline at end of file diff --git a/Y.ul b/Y.ul new file mode 100644 index 0000000..422e36d --- /dev/null +++ b/Y.ul @@ -0,0 +1 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~|||z|{|}}~~}}}||~{~}~~{zywwtvuw{|}|y~|~{wuvz{x}|}{oqmibfedgfiu~vomlnmonv}t~tohd_fnipt~nvzm}yki\\YUVVZ^v|lbVNQNMNMOUXSVgxy_ORMEGHHQTO\]ek`|xxe[fUOP]d}chbnh|twxwPISJ?EGOv]MJFCEG@BPU~_cT]OEOECKLS`pxVsRHbb_tOVFS]GXfº_MLC<7452499=?HJNd\`|hu彿]FjA4;==E@:JTE>89@=7=A]̾uJQPABEJf^OWW\PHSMJfhZLEQSbҷdFMS>EOKOL42@B`^ĺû¼\ֻžM=5;>888GWNZ|пȿiPe___L935226/6@>AMzog?C7173-6?VeUqϼ¼OB:/,+/;7<]{ֿ}}jжb?1-)$!"&..HĿ^A:98593/?FHmŷ?>=BQBJ`U~WHVX`xi[WT´S:/.,('*,/8A^ŸV@@G:128<>;:ShjνYWM@O{տľ~USauǻ_MC;78779:GLZtyYNE<@??EBJdlaZYV]yxnf]PKONOHAKPXxdKA:<>BBHUUPNRZikq]RSTPP]lnulq]SMO\^c`\]Wqk}ieXOUWVfrxvnk__Y^im_UOLOTVW[VVYVXUW[[kwkha^_]f~z~~pghjcb__gefhjqyuw}}qozvtmm{}zz{{tllsywosw{zpu}|}{z}~~|}yzz~|~|~}}~||}~~~~~}|{z{{{{}~~~~}}{{{}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/Z.ul b/Z.ul new file mode 100644 index 0000000..49de13d --- /dev/null +++ b/Z.ul @@ -0,0 +1 @@ +~~~|}~wuyrrs{{|{umqnpnuyy~yy{_l[n\Q^~_miUYqQYNNpHKFKMLGRYy}\X?DM[eTdCJ\GZz^Xkܾ[>J޾niMRWRogSMN[R\S]ɲƱǠl:¼pK>иƭǯžU];C8:?[;[c-gO=L-31H,өJܹ7NJO޿;[Ol_LJQr3?OL3v3`,=%/-=#*-oF4KƷ/99E@4-4,1@+MH&/3"K%D9.#` .0F&E3=A[9(520.*).. Z:,D0;O>.?6<9':&]-'8*?I??DF>8B@6LHRVG@EIM[PnNFrVOQEUOThJLLG>Iһٺùɽп|gtwu`YgeXJ]cVVLSVMRPEMOKJFMI@?AA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of file diff --git a/b.ul b/b.ul new file mode 100644 index 0000000..11ec0c7 --- /dev/null +++ b/b.ul @@ -0,0 +1 @@ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}~~~~~~~~}}~~}~}}~~|}~~||~~|{}|z||wx~{y||z}|vzyxzvhY]v`dpdkqm|u{un{d]`o|qoolgeiol`ZY_n~ylfegjlottnlmw~{}xzr~jivfg_OYgMIS]Vbl^hfXZj|mnqmgkph{dm`Yq^bfP]c\jP\RCLkKMwn`_]]ldR[YUSWj`UOpOModOWcYhMCXFClvO_`NjOc^=BηD3@ĶA>O>_?Hο=>=2G»z9;D9L\CRLPeLij;۱o4:˱J4@ʻH?\bJX^M\SCJKJSHgyFMϼSCnDA߻_>KǹH;LȼWGOnA3=ƮL+-bv.+;ԿO<54<'+\<.7pF;C㾼iOe;^HOйO>Lμb_wOHTu@W^;=fH@^LFVeZMJMSQLLTsgYUU[fy{i[PLN[lOJR{yPHL[lcVRW\\\ig]du`^adlcq~{{}qcjso}wvttyulkoslc`gute_`hrwqjd__emwtja^^^_chlj`ZX[ckkhfiouutw{ \ No newline at end of file diff --git a/c.ul b/c.ul new file mode 100644 index 0000000..07b0577 --- /dev/null +++ b/c.ul @@ -0,0 +1 @@ +~~~~~~~||{~{~{wwxxuow{v{onsmlokjptlnzqhnmdfg^_efoytvyl`_\\ikg~{gdoprqih}a^j~llkZ\g]^btsg^oZXh^Y\jkmZ^lwZ}zsVQkjQ^l^SXmg}ZWoc_btu^R_YQm{`M_XJC`bbt^YL_ӻ[sFbaEM\kUYSGPKVHRIQ>Uq?kOnEb_liJH@پ^U@GW?fSD\VC_j?CxlFr>=UoZ7??RA˺NRòY?fmsN@aEZH8ǯI;G?HbԽK:j<55uN8N9V4AfM?eĹO<<>tLoYѹDEt`>_p6=Hw;0P43ׯd8=QOM>$9÷L;5VC8įU?J:޻>(_@Q5)ٮL5yĹPEƻҽLJ7_c4?M:ȷB-ǟV7ݸ,Ba:QO<̯yKhճ<½RJG>MqB4PXAoUNGwtj\]NپJKkA7紵UFP[ǸoIEŮs3<̿S;8QQM̻MXɿELƸ<>PKva\gDZDBLwIEkQX@FlQQ[MKXtqK?[L@zMGHO[Zn?Hu8@_[pX>D]Q\IQ\KIOoYjWB>ZjlohQ`QUb^iRGg[Y|YKfsSgRF]q^P^y|dzldbZd\c]a^W^YM\o[Uq_\ky^_fmf`x{_e{a}_lf[il`h|}nllYYt{fk{nabhtt`_djnjfj}ida_jroZYytZbhcjxd]qxrmdglpkkps{wmoror|xnt|xt|vq{wp{{wz}~~|{}~~ \ No newline at end of file diff --git a/d.ul b/d.ul new file mode 100644 index 0000000..e863cbb --- /dev/null +++ b/d.ul @@ -0,0 +1 @@ +|m_VME?:4/,)%" $).7IڿP@71-(%# "(1;=JҾO<1*&# #&*.7Ehú^UOKFA>>>>AFJQiƻgNE?:51///012333444320/..---../137;@IVqd]ZWSOLIEB@>=:865556678:=BHMUf~umjgda_][ZZZ[\]^_bglpvz| \ No newline at end of file diff --git a/e.ul b/e.ul new file mode 100644 index 0000000..f9d24a9 --- /dev/null +++ b/e.ul @@ -0,0 +1,5 @@ +~~~~~~~~~~~~~~~~~~~~~~}~}}}}}}~~}}}~}}}~~}~~~~~~~||{||{zyz{{xyy{{ywy{||zyz|}}||}~}|{ywuutrrqpnnoqommprpooprtvwvvy||z}}}zsoomjiiiebceda`bcaaeigcbejopmjkv~w~xojecec^ZXXWUUUTSRSTSSW[[WUX^fiigdeozobYVVSOMNKGDFHFCDGFAAHOOJIKMPZjj\W`}k\RKEA???=;98656897447;>AC?<=H_jXT^noƽ\Y[YK=6331//.,)(()))**))+/599525DjMO̿qC=>=8.(%$#" $-::0,/C̺wԸw@621.*%!#(-0-)+>˾;0//-'   $:ƹG,&%&$ + +  $>5% + + $%$+]ȿ|1$  '('.xe1%  "*+*1밫Q0&!  (6OɻpGCIC4)" !!%&'.H^۸NCHUWLGB;55<@;1,+,./.*''())**)'')+,./124;Jvּ_JGIE:0+***)&#!!"""###"$&(*+.246>]μmSIB>;83/.---,++**+,---./025:=>?CL\»cUPRRLD?====<:878999::9:;=?@DFHKP^yk]VTTRMIFDEEDB@?@ABBCDEEGILMOUZ\`m{ld_^\[YUPOOPPNMMMNNOPPPQSVY\^_dkpy{sligfedb_^]]^^]\[\]^_^_`cefhknqty~{ywvurponnmmmmlkklmmmmmmopqrrtuxz{}~}}|{{zzzzzzyyyyyzyzz{{{{{||}}}}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}||} \ No newline at end of file diff --git a/f.ul b/f.ul new file mode 100644 index 0000000..4a7506c --- /dev/null +++ b/f.ul @@ -0,0 +1 @@ +~~~}~~~}~}}~|~|~}}}}}}}}}}}}}}~}~}~~|zxwtsqonmlkjhhfedca`__^^]\\\[[ZZYZZ[[\]^^__``beikor|bSMKHB=9766665430/....//146789;<=>?BHOhʿt\PG?<<;6.)''*,.///.,***,-.05:@FJQ`vżV@84234679;4-*)****+.22.+*/=_»ſƽ{G6,(())(),/366/)#!#!&-5=GZnO?::@_ųƾH3*# &+/11//3=WdH;50+% "$'**'!%*./.-.3@qǽfI?;;=:2../.-+)%! "$(.:ES\RIL_ºVC<972.+*(((*+++,-/38=;4/-,++,....158=1.10 + +library + exposed-modules: Main, Paths_mmsyn6ukr_array, Melodics.Ukrainian.Arr, Melodics.Executable.Arr, UkrainianLControl.Arr, MMSyn6Ukr.Show7s.Arr + other-modules: + other-extensions: BangPatterns + build-depends: base >=4.8 && <4.15, process >=1.4 && <1.9, mmsyn3 >=0.1.5.0 && <1, directory >= 1 && < 1.5, bytestring >=0.10 && <0.13, mmsyn2-array >=0.1.1 && <1, mmsyn5 >=0.5 && <1, ukrainian-phonetics-basic-array >=0.1.1 && <1 + -- hs-source-dirs: + default-language: Haskell2010 + +executable mmsyn6ukra + main-is: Main.hs + other-modules: Melodics.Executable.Arr, Melodics.Ukrainian.Arr, Paths_mmsyn6ukr_array, UkrainianLControl.Arr, MMSyn6Ukr.Show7s.Arr + other-extensions: BangPatterns + build-depends: base >=4.8 && <4.15, process >=1.4 && <1.9, mmsyn3 >=0.1.5.0 && <1, directory >= 1 && < 1.5, bytestring >=0.10 && <0.13, mmsyn2-array >=0.1.1 && <1, mmsyn5 >=0.5 && <1, ukrainian-phonetics-basic-array >=0.1.1 && <1 + -- hs-source-dirs: + default-language: Haskell2010