Copyright | (c) OleksandrZhabenko 2020-2021 |
---|---|
License | MIT |
Maintainer | olexandr543@yahoo.com |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Helps to create experimental music from a file (or its part) and a Ukrainian text. It can also generate a timbre for the notes. Uses SoX inside.
Synopsis
- qwerty2dvorak :: String -> String
- dvorak2qwerty :: String -> String
- input2BL :: IO String
- input2BLN :: Int -> IO String
- input2BLMN :: Int -> Int -> IO String
- readFile2BL :: FilePath -> IO String
- readFile2BLN :: Int -> FilePath -> IO String
- readFile2BLMN :: Int -> Int -> FilePath -> IO String
- readFile2BLGen :: String -> FilePath -> IO String
- readFile2BLGenN :: Int -> String -> FilePath -> IO String
- readFile2BLGenMN :: Int -> Int -> String -> FilePath -> IO String
- readFileDoubles :: FilePath -> IO [Int]
- readFileDoublesN :: Int -> FilePath -> IO [Int]
- readFileDoublesMN :: Int -> Int -> FilePath -> IO [Int]
- readFileDoublesGen :: String -> FilePath -> IO [Int]
- readFileDoublesGenN :: Int -> String -> FilePath -> IO [Int]
- readFileDoublesGenMN :: Int -> Int -> String -> FilePath -> IO [Int]
- takeDoubles :: String -> [Int]
- hashStr2 :: Char -> Char -> Int
- convH :: String -> (String -> String) -> String -> String
Working with input and files
qwerty2dvorak :: String -> String Source #
Converts a string of lowercase ASCII letters being typed on the QWERTY keyboard layout into corresponding Dvorak keyboard layout.
dvorak2qwerty :: String -> String Source #
Vice versa to qwerty2dvorak
.
input2BL :: IO String Source #
Get contents into lazy String
with filtering of all characters that are not a lower case ascii letters.
readFile2BL :: FilePath -> IO String Source #
Usual way the function readFile2BLGen
is used. The text in a file being read is treated as a properly typed (entered) one. So there is no
keyboard layout conversion at all.
readFile2BLN :: Int -> FilePath -> IO String Source #
Like readFile2BL
, but reads only first n
symbols specified with the first Int
argument.
readFile2BLMN :: Int -> Int -> FilePath -> IO String Source #
Like readFile2BL
, but reads only first n
symbols specified with the second Int
argument dropping before this the first m
symbols specified
with the first Int
argument.
readFile2BLGen :: String -> FilePath -> IO String Source #
Reads a given file into a lazy String
with filtering of all characters that are not a lower case ascii letters. It has additional
first command line argument to control the way of treating letters: as being typed (entered) properly (null String
), or needed to be converted
from qwerty to dvorak layout ("q" String
), or vice versa (otherwise).
readFile2BLGenN :: Int -> String -> FilePath -> IO String Source #
Like readFile2BLGen
, but reads only first n
symbols specified with the first Int
argument.
readFile2BLGenMN :: Int -> Int -> String -> FilePath -> IO String Source #
Like readFile2BLGen
, but reads only first n
symbols specified with the second Int
argument dropping before this the first m
symbols specified
with the first Int
argument.
Conversions
readFileDoubles :: FilePath -> IO [Int] Source #
Usual way the function readFileDoublesGen
is used. The text in a file being read is treated as a properly typed (entered) one. So there is no
keyboard layout conversion at all.
readFileDoublesN :: Int -> FilePath -> IO [Int] Source #
Like readFileDoubles
, but returns only first n
elements of the list specified with the first Int
argument.
readFileDoublesMN :: Int -> Int -> FilePath -> IO [Int] Source #
Like readFileDoubles
, but returns only first n
elements of the list specified with the second Int
argument
dropping before this the first m
elements specified with the first Int
argument.
readFileDoublesGen :: String -> FilePath -> IO [Int] Source #
After reading a file into a filtered lazy String
(see, readFile2BLGen
) converts the resulting String
into a list
of Int
. The arguments have the same meaning as for readFile2BLGen
.
readFileDoublesGenN :: Int -> String -> FilePath -> IO [Int] Source #
Like readFileDoublesGen
, but returns only first n
elements of the list specified with the first Int
argument.
readFileDoublesGenMN :: Int -> Int -> String -> FilePath -> IO [Int] Source #
Like readFileDoublesGen
, but returns only first n
symbols specified with the second Int
argument dropping before this the first m
symbols specified
with the first Int
argument.