Copyright | (c) OleksandrZhabenko 2020 |
---|---|
License | MIT |
Stability | Experimental |
Safe Haskell | None |
Language | Haskell2010 |
Maintainer : olexandr543@yahoo.com
A program and a library to create experimental music from a mono audio and a Ukrainian text. Can work with both WAV and FLAC files if your SoX installation supports FLAC.
Synopsis
- takeDoubles :: ByteString -> Vector Int
- qwerty2dvorak :: ByteString -> ByteString
- dvorak2qwerty :: ByteString -> ByteString
- hashStr2 :: Char -> Char -> Int
- input2BL :: IO ByteString
- readFile2BLGen :: String -> FilePath -> IO ByteString
- convH :: String -> (ByteString -> ByteString) -> ByteString -> ByteString
- readFile2BL :: FilePath -> IO ByteString
- readFileDoublesGen :: String -> FilePath -> IO (Vector Int)
- readFileDoubles :: FilePath -> IO (Vector Int)
Documentation
takeDoubles :: ByteString -> Vector Int Source #
Converts a lazy ByteString
into a Vector
of Int
using hashStr2
.
qwerty2dvorak :: ByteString -> ByteString Source #
Converts a string of lowercase ASCII letters being typed on the QWERTY keyboard layout into corresponding Dvorak keyboard layout.
dvorak2qwerty :: ByteString -> ByteString Source #
Vice versa to qwerty2dvorak
.
hashStr2 :: Char -> Char -> Int Source #
Hashes two lower case ascii characters. Is used for controlling frequencies and operators.
input2BL :: IO ByteString Source #
Get contents into lazy ByteString
with filtering of all characters that are not a lower case ascii letters.
readFile2BLGen :: String -> FilePath -> IO ByteString Source #
Reads a given file into a lazy ByteString
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).
convH :: String -> (ByteString -> ByteString) -> ByteString -> ByteString Source #
Auxiliary function to define how is a ByteString
treated, see readFile2BLGen
.
readFile2BL :: FilePath -> IO ByteString 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.
readFileDoublesGen :: String -> FilePath -> IO (Vector Int) Source #
After reading a file into a filtered lazy ByteString
(see, readFile2BLGen
) converts the resulting ByteString
into a Vector
of Int
. The arguments have the same meaning as for readFile2BLGen
.
readFileDoubles :: FilePath -> IO (Vector 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.